From 66f815f4f02ddf33921e878458e4dc46f47ab653 Mon Sep 17 00:00:00 2001 From: MaxOvs19 Date: Mon, 23 Oct 2023 16:42:12 +0300 Subject: [PATCH] Update my task --- src/assets/images/downloadExel.svg | 12 ++ src/assets/images/statusTimeTask.svg | 12 ++ src/pages/Tracker/Tracker.jsx | 164 ++++++++++++++++----------- src/pages/Tracker/tracker.scss | 138 +++++++++++++++++++++- 4 files changed, 255 insertions(+), 71 deletions(-) create mode 100644 src/assets/images/downloadExel.svg create mode 100644 src/assets/images/statusTimeTask.svg diff --git a/src/assets/images/downloadExel.svg b/src/assets/images/downloadExel.svg new file mode 100644 index 00000000..e2b10ca2 --- /dev/null +++ b/src/assets/images/downloadExel.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/assets/images/statusTimeTask.svg b/src/assets/images/statusTimeTask.svg new file mode 100644 index 00000000..34d66a32 --- /dev/null +++ b/src/assets/images/statusTimeTask.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/pages/Tracker/Tracker.jsx b/src/pages/Tracker/Tracker.jsx index db011d83..fb615197 100644 --- a/src/pages/Tracker/Tracker.jsx +++ b/src/pages/Tracker/Tracker.jsx @@ -27,13 +27,15 @@ import addProjectImg from "assets/icons/addProjectImg.svg"; import archiveTrackerProjects from "assets/icons/archiveTrackerProjects.svg"; import arrowViewReport from "assets/icons/arrows/arrowViewReport.svg"; import filterIcon from "assets/icons/filterIcon.svg"; +import plus from "assets/icons/plus.svg"; import search from "assets/icons/serchIcon.png"; import project from "assets/icons/trackerProject.svg"; import tasks from "assets/icons/trackerTasks.svg"; import archive from "assets/images/archiveIcon.png"; import mockAvatar from "assets/images/avatarMok.png"; -import avatarMok from "assets/images/avatarMok.png"; +import downloadExel from "assets/images/downloadExel.svg"; import noProjects from "assets/images/noProjects.png"; +import statusTimeTask from "assets/images/statusTimeTask.svg"; import "./tracker.scss"; @@ -123,6 +125,14 @@ export const Tracker = () => { ); } + function toggleDescTask(e) { + e.target.closest("img").classList.toggle("open-desc-item"); + e.target + .closest("td") + .querySelector(".taskList__table__name-project") + .classList.toggle("hide-desc"); + } + return (
@@ -286,6 +296,7 @@ export const Tracker = () => {
+ {loader && } @@ -298,78 +309,93 @@ export const Tracker = () => { - - - - - - - - - - - - - - - + {!loader && ( + <> + {Boolean(filteredAllTasks.length) && + filteredAllTasks.map((task, index) => { + return ( + + + + + + + + ); + })} + + )}
-
- Разработка трекера # -
-
-

Проект:

-

Туман

-
-
-
In Progress
-
14ч 25 мин13.09.202020.09.2020
-
- Разработка трекера # -
-
-

Проект:

-

Туман

-
-
-
In Progress
-
14ч 25 мин13.09.202020.09.2020
+
+ {task.title} +
{ + toggleDescTask(e); + }} + > + # +
+
+
+

Проект:

+

+ {projects.map((project) => { + if (project.id == task.project_id) { + return project.name; + } + })} +

+
+
+
+ {task.status == 1 ? "Active" : "Close"} +
+
+ {task.timers.map((item) => { + let time = new Date(item.deltaSeconds * 1000) + .toISOString() + .slice(11, 19); + return `${time}`; + })} + + {new Date(task.created_at).toLocaleDateString()} + + {new Date(task.dead_line).toLocaleDateString()} +
- {loader && } - {!loader && ( -
- {Boolean(filteredAllTasks.length) && - filteredAllTasks.map((task) => { - return ( -
-
-
{task.title}
-

-

-
- avatar -
-

{task.user.fio}

- {getCorrectDate(task.created_at)} -
-
-
- ); - })} +
+
+

Учет моего рабочего времени за день

+

+ Задач выполнено:

{2}

+

- )} +
+

Общее время:

+

{"4 ч 34 мин"}

+
+
+
+ # +

Сверка пройдена

+
+
+ # +

Скачать Exel отчет

+
+
+
+ +
+ + Закрыть сегоднящний день + +

+ Нажимая кнопку - “Закрыть сегодняшний день” - вы отправляете + потрачеенное время на сверку +

+