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,21 +436,24 @@ export const Tracker = () => {
</div> </div>
</div> </div>
<div className="archive__title-table">
<p>Задача</p>
<p>Потраченное время</p>
<p>Дата окончания</p>
</div>
<div className="archive__tasksWrapper">
{loader && <Loader style="green" />} {loader && <Loader style="green" />}
<table className="archive__table">
<thead>
<tr>
<th>Задача</th>
<th>Потраченное время</th>
<th>Дата окончания</th>
</tr>
</thead>
<tbody>
{!loader && ( {!loader && (
<> <>
{Boolean(filterCompleteTasks.length) ? ( {Boolean(filterCompleteTasks.length) ? (
filterCompleteTasks.map((task, index) => { filterCompleteTasks.map((task, index) => {
return ( return (
<div className="archive__completeTask" key={index}> <tr>
<div className="archive__completeTask__description"> <td className="archive__completeTask__description">
<p className="completeTask__title"> <p className="completeTask__title">
{task.title} {task.title}
</p> </p>
@ -460,24 +463,27 @@ export const Tracker = () => {
__html: task.description, __html: task.description,
}} }}
/> />
</div> </td>
<div className="archive__completeTask__time"> <td className="archive__completeTask__time">
<p> <p>
{task.timers.map((item) => { {task.timers.length == 0
let time = new Date(item.deltaSeconds * 1000) ? "-"
: task.timers.map((item) => {
let time = new Date(
item.deltaSeconds * 1000
)
.toISOString() .toISOString()
.slice(11, 19); .slice(11, 19);
return `${time}`; return `${time}`;
})} })}
</p> </p>
</div> </td>
<div className="archive__completeTask__info"> <td className="archive__completeTask__info">
<div className="archive__completeTask__info__project"> <div>
{/*<span>Проект</span>*/}
<p>{getCorrectDate(task.updated_at)}</p> <p>{getCorrectDate(task.updated_at)}</p>
</div> </div>
</div> </td>
</div> </tr>
); );
}) })
) : ( ) : (
@ -487,7 +493,8 @@ export const Tracker = () => {
)} )}
</> </>
)} )}
</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;
justify-content: space-between;
background: #f1f1f1;
color: #5b6871;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
thead {
background: #f1f1f1;
color: #5b6871;
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;