Fixed archive

This commit is contained in:
MaxOvs19 2023-10-23 17:26:47 +03:00
parent 66f815f4f0
commit e670e2a9a7
2 changed files with 108 additions and 71 deletions

View File

@ -436,58 +436,65 @@ export const Tracker = () => {
</div> </div>
</div> </div>
<div className="archive__title-table"> {loader && <Loader style="green" />}
<p>Задача</p> <table className="archive__table">
<p>Потраченное время</p> <thead>
<p>Дата окончания</p> <tr>
</div> <th>Задача</th>
<th>Потраченное время</th>
<th>Дата окончания</th>
</tr>
</thead>
<div className="archive__tasksWrapper"> <tbody>
{loader && <Loader style="green" />} {!loader && (
{!loader && ( <>
<> {Boolean(filterCompleteTasks.length) ? (
{Boolean(filterCompleteTasks.length) ? ( filterCompleteTasks.map((task, index) => {
filterCompleteTasks.map((task, index) => { return (
return ( <tr>
<div className="archive__completeTask" key={index}> <td className="archive__completeTask__description">
<div className="archive__completeTask__description"> <p className="completeTask__title">
<p className="completeTask__title"> {task.title}
{task.title} </p>
</p> <p
<p className="date"
className="date" dangerouslySetInnerHTML={{
dangerouslySetInnerHTML={{ __html: task.description,
__html: task.description, }}
}} />
/> </td>
</div> <td className="archive__completeTask__time">
<div className="archive__completeTask__time"> <p>
<p> {task.timers.length == 0
{task.timers.map((item) => { ? "-"
let time = new Date(item.deltaSeconds * 1000) : task.timers.map((item) => {
.toISOString() let time = new Date(
.slice(11, 19); item.deltaSeconds * 1000
return `${time}`; )
})} .toISOString()
</p> .slice(11, 19);
</div> return `${time}`;
<div className="archive__completeTask__info"> })}
<div className="archive__completeTask__info__project"> </p>
{/*<span>Проект</span>*/} </td>
<p>{getCorrectDate(task.updated_at)}</p> <td className="archive__completeTask__info">
</div> <div>
</div> <p>{getCorrectDate(task.updated_at)}</p>
</div> </div>
); </td>
}) </tr>
) : ( );
<div className="archive__noItem"> })
<p>В данном месяце у вас не было задач</p> ) : (
</div> <div className="archive__noItem">
)} <p>В данном месяце у вас не было задач</p>
</> </div>
)} )}
</div> </>
)}
</tbody>
</table>
</div> </div>
<div className="archive__projects"> <div className="archive__projects">
<div className="archive__projects-title"> <div className="archive__projects-title">

View File

@ -1672,21 +1672,58 @@
@media (max-width: 450px) { @media (max-width: 450px) {
flex-wrap: wrap; flex-wrap: wrap;
} }
}
&-table { &__table {
margin: 29px 0 0 0; margin: 29px 0 0 0;
height: 67px; height: 67px;
display: flex; width: 100%;
align-items: center; font-size: 14px;
justify-content: space-between; font-weight: 400;
thead {
background: #f1f1f1; background: #f1f1f1;
color: #5b6871; color: #5b6871;
font-size: 14px;
font-weight: 400;
border-radius: 12px; border-radius: 12px;
padding-left: 15px; height: 65px;
padding-right: 15px; background: #f1f1f1;
margin-right: -6px; color: #5b6871;
th {
&:first-child {
padding-left: 10px;
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
}
&:last-child {
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
}
}
}
tbody {
color: #000;
tr {
background-color: white;
&:nth-child(2n) {
background-color: rgba(241, 241, 241, 0.23);
}
}
td {
height: 65px;
border-bottom: 1px solid rgba(241, 241, 241, 1);
&:first-child {
max-width: 275px;
padding-left: 10px;
color: #111112;
font-size: 17px;
font-weight: 700;
}
}
} }
} }
@ -1727,17 +1764,10 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
transition: all 0.3s ease;
background: #f1f1f1; background: #f1f1f1;
border-radius: 12px; border-radius: 12px;
padding: 12px 15px 7px 16px; padding: 12px 15px 7px 16px;
&:hover {
transform: scale(0.99);
box-shadow: 4px 4px 8px 0px rgba(34, 60, 80, 0.11);
transition: 0.4s;
}
p { p {
max-width: 420px; max-width: 420px;
overflow: hidden; overflow: hidden;
@ -1819,8 +1849,8 @@
} }
&__description { &__description {
width: 70px; width: 270px;
max-width: 70px; max-width: 270px;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;