Fixed archive

This commit is contained in:
MaxOvs19
2023-12-04 18:31:13 +03:00
parent 154fb0dfa6
commit 6ff18fe751
7 changed files with 77 additions and 94 deletions

View File

@ -1,37 +1,36 @@
import React from "react";
import ReactPaginate from "react-paginate";
import AllMyTasksItem from "@components/Common/AllMyTasksItem/AllMyTasksItem";
import { getCorrectDate } from "@components/Calendar/calendarHelper";
import ArchiveTasksItem from "@components/Common/AllMyTasksItem/ArchiveTasksItem";
const ArchiveTableTracker = ({ filterCompleteTasks, projects, loader }) => {
import "./archiveTableTracker.scss";
const ArchiveTableTracker = ({ filterCompleteTasks, loader }) => {
return (
<>
<table className="archive__table">
<thead>
<tr>
<th>Задача</th>
<th>Потраченное время</th>
<th>Дата окончания</th>
</tr>
</thead>
<tbody>
{!loader && (
<>
{Boolean(filterCompleteTasks.length) ? (
filterCompleteTasks.map((task, index) => {
<AllMyTasksItem task={task} projects={projects} />;
})
) : (
<div className="archive__noItem">
<p>В данном месяце у вас не было задач</p>
</div>
)}
</>
)}
</tbody>
</table>
</>
<table className="archive__table">
<thead>
<tr>
<th>Задача</th>
<th>Потраченное время</th>
<th>Дата окончания</th>
</tr>
</thead>
<tbody>
{!loader && (
<>
{Boolean(filterCompleteTasks.length) ? (
filterCompleteTasks.map((task, index) => {
return <ArchiveTasksItem task={task} index={index} />;
})
) : (
<div className="archive__noItem">
<p>В данном месяце у вас не было задач</p>
</div>
)}
</>
)}
</tbody>
</table>
);
};