diff --git a/src/components/ProfileCalendar/ProfileCalendarComponent.js b/src/components/ProfileCalendar/ProfileCalendarComponent.js index e895ed6c..afbaa894 100644 --- a/src/components/ProfileCalendar/ProfileCalendarComponent.js +++ b/src/components/ProfileCalendar/ProfileCalendarComponent.js @@ -70,7 +70,7 @@ export const ProfileCalendarComponent = React.memo(({value, setValueHandler, rep

Мои отчеты:

- {month} - {totalHours} {hourOfNum(totalHours)} + {month} {totalHours} {hourOfNum(totalHours)}

diff --git a/src/components/ReportForm/ReportForm.js b/src/components/ReportForm/ReportForm.js index 9fbb2e88..20a6e550 100644 --- a/src/components/ReportForm/ReportForm.js +++ b/src/components/ReportForm/ReportForm.js @@ -18,7 +18,6 @@ import {getReportDate} from '../../redux/reportSlice' import calendarIcon from '../../images/calendar_icon.png' import ellipse from '../../images/ellipse.png' import remove from '../../images/remove.png' -import addIcon from '../../images/addIcon.png' import arrow from "../../images/right-arrow.png"; import './reportForm.scss' @@ -191,7 +190,7 @@ const ReportForm = () => { })}
- +

+

Добавить еще
diff --git a/src/components/ReportForm/reportForm.scss b/src/components/ReportForm/reportForm.scss index 62a29881..d0f12e7c 100644 --- a/src/components/ReportForm/reportForm.scss +++ b/src/components/ReportForm/reportForm.scss @@ -189,6 +189,8 @@ img { cursor: pointer; + width: 23px; + height: 23px; } } @@ -273,6 +275,21 @@ &__form-add { margin-left: 28px; + display: flex; + align-items: center; + + .addMore { + display: flex; + align-items: center; + justify-content: center; + color: #4CAF50; + width: 38px; + height: 38px; + background: #E8E8E8; + margin-bottom: 0; + border-radius: 50px; + font-size: 32px; + } span { font-family: 'GT Eesti Pro Display'; diff --git a/src/components/UI/ModalProject/ModalProject.js b/src/components/UI/ModalProject/ModalProject.js new file mode 100644 index 00000000..d4c48e86 --- /dev/null +++ b/src/components/UI/ModalProject/ModalProject.js @@ -0,0 +1,27 @@ +import React from "react"; + +import "./ModalProject.scss"; + +export const ModalProject = ({ active, setActive }) => { + return ( +
setActive(false)} + > +
e.stopPropagation()} + > +
+

Укажите название проекта:

+
+ +
+
+ +
+
+ ); +}; + +export default ModalProject; diff --git a/src/components/UI/ModalProject/ModalProject.scss b/src/components/UI/ModalProject/ModalProject.scss new file mode 100644 index 00000000..3d62134d --- /dev/null +++ b/src/components/UI/ModalProject/ModalProject.scss @@ -0,0 +1,57 @@ +.modal-project { + z-index: 9; + height: 100%; + width: 100%; + background-color: rgba(0, 0, 0, 0.11); + position: fixed; + top: 0; + left: 0; + display: flex; + align-items: center; + justify-content: center; + transform: scale(0); +} + +.modal-project.active { + transform: scale(1); +} + +.modal-project__content { + padding: 15px; + background: #ffffff; + border: 1px solid #dde2e4; + border-radius: 8px; + display: flex; + flex-direction: column; + align-items: center; + + .title-project { + display: flex; + align-items: center; + flex-direction: column; + + .input-container { + width: 220px; + height: 25px; + border-radius: 44px; + border: 1px solid #d1d1d1; + } + + h4 { + margin-bottom: 10px; + } + } + + .name-project { + margin-left: 10px; + border: none; + outline: none; + height: 100%; + width: 90%; + font-size: 14px; + } + + .create-project { + margin: 15px 0 0 0; + } +} diff --git a/src/components/UI/ModalTiket/ModalTiket.js b/src/components/UI/ModalTiket/ModalTiket.js new file mode 100644 index 00000000..46bd6f1a --- /dev/null +++ b/src/components/UI/ModalTiket/ModalTiket.js @@ -0,0 +1,111 @@ +import React, { useState } from "react"; +import "./ModalTiket.scss"; + +import creatorMock from "../../../images/avatarMoсkCreator.png"; +import avatarMock1 from "../../../images/avatarMoсk1.png"; +import avatarMock2 from "../../../images/avatarMoсk2.png"; +import category from "../../../images/category.png"; +import comments from "../../../images/commentsBoard.svg"; +import watch from "../../../images/watch.png"; +import files from "../../../images/filesBoard.svg"; +import task from "../../../images/tasksMock.png"; +import arrow from "../../../images/arrowStart.png"; + +export const ModalTiket = ({ active, setActive }) => { + const [tiket] = useState({ + name: "Разработка трекера", + code: "PR - 2245", + creator: "Василий Тарасов", + descriptions: + "На многих страницах сайта отсутствуют или некорректно заполнены метатеги Description. Это может негативно повлиять на представление сайта в результатах поиска.Необходимо исправить все страницы где есть ошибки или отсутствует Title и Description.", + }); + + const [workers] = useState([ + { + name: "Дмитрий Рогов", + avatar: avatarMock2, + }, + { + name: "Марина Серова", + avatar: avatarMock1, + }, + ]); + + return ( +
setActive(false)} + > +
e.stopPropagation()} + > +
+ + + + + + +
+
+

+ + Проект: {tiket.name} +

+
+
{tiket.code}
+
+

{tiket.descriptions}

+ +

{tiket.descriptions}

+
+
+

+ + {0} + Коментариев +

+

+ + {0} + Файлов +

+
+
+
+
+ {tiket.code} +

Создатель : {tiket.creator}

+
+ {workers.map((worker, index) => { + return ( +
+ +

{worker.name}

+
+ ); + })} +
+ +
+ + Добавить участников +
+ +
+ + Длительность : +

{"8:30:22"}

+
+ + +
+
+
+ ); +}; + +export default ModalTiket; diff --git a/src/components/UI/ModalTiket/ModalTiket.scss b/src/components/UI/ModalTiket/ModalTiket.scss new file mode 100644 index 00000000..a2c74a53 --- /dev/null +++ b/src/components/UI/ModalTiket/ModalTiket.scss @@ -0,0 +1,199 @@ +.modal-tiket { + z-index: 9; + height: 100%; + width: 100%; + background-color: rgba(0, 0, 0, 0.11); + position: fixed; + top: 0; + left: 0; + display: flex; + align-items: center; + justify-content: center; + transform: scale(0); +} + +.modal-tiket.active { + transform: scale(1); +} + +.modal-tiket__content { + background: #ffffff; + border: 1px solid #dde2e4; + border-radius: 8px; + display: flex; + flex-direction: row; + + .author { + padding: 25px 0 0 0; + border-radius: 8px 0 0 8px; + display: flex; + flex-direction: column; + align-items: center; + width: 76px; + background: #fbfbfb; + + a { + margin-bottom: 16px; + } + } + + .content { + display: flex; + flex-direction: column; + width: 600px; + margin: 26px 0 0 21px; + + .title-project { + font-family: "LabGrotesque", sans-serif; + display: flex; + align-items: center; + font-weight: 700; + font-size: 16px; + + &__category { + margin-right: 17px; + } + } + + &__task { + margin-top: 22px; + padding: 18px; + + h5 { + font-family: "Inter", sans-serif; + font-weight: 500; + font-style: normal; + font-size: 16px; + line-height: 24px; + + color: #1a1919; + } + } + + &__description { + p { + font-weight: 400; + font-size: 14px; + line-height: 140%; + color: #252c32; + text-align: justify; + } + + .image-task { + margin: 0 0 20px 0; + } + } + + &__communication { + display: flex; + flex-direction: row; + margin: 29px 0 0 -5px; + + .comment { + width: 100px; + justify-content: space-evenly; + } + + .comment, + .file { + display: flex; + align-items: center; + } + + .file { + justify-content: space-between; + margin-left: 20px; + width: 70px; + } + } + } + + .workers { + border-left: 1px solid #f1f1f1; + width: 300px; + padding: 40px; + + span { + font-family: "Inter", sans-serif; + font-weight: 500; + font-size: 11px; + color: #807777; + } + + .add-worker { + display: flex; + align-items: center; + + span { + color: #000000; + font-size: 12px; + line-height: 32px; + margin-left: 17px; + font-style: normal; + font-weight: 400; + } + + button { + cursor: pointer; + background: #8bcc60; + border-radius: 44px; + width: 33px; + height: 33px; + display: flex; + justify-content: center; + align-items: center; + border: none; + color: white; + font-size: 17px; + } + } + + .start { + margin-top: 25px; + width: 151px; + height: 40px; + border: none; + color: white; + background: #1458dd; + border-radius: 44px; + + img { + margin-left: 10px; + } + } + + .time { + display: flex; + align-items: center; + justify-content: space-between; + font-size: 12px; + margin-top: 20px; + width: 160px; + + p { + color: #000000; + margin: 0; + } + } + + &__creator { + font-size: 14px; + line-height: 32px; + font-weight: 500; + color: #2d4a17; + } + + .worker { + display: flex; + flex-direction: row; + align-items: center; + margin-bottom: 15px; + + p { + margin: 0 0 0 11px; + font-size: 12px; + color: #807777; + } + } + } +} diff --git a/src/images/arrowStart.png b/src/images/arrowStart.png new file mode 100644 index 00000000..fe784765 Binary files /dev/null and b/src/images/arrowStart.png differ diff --git a/src/images/avatarMoсk1.png b/src/images/avatarMoсk1.png new file mode 100644 index 00000000..467e1de2 Binary files /dev/null and b/src/images/avatarMoсk1.png differ diff --git a/src/images/avatarMoсk2.png b/src/images/avatarMoсk2.png new file mode 100644 index 00000000..e51856fe Binary files /dev/null and b/src/images/avatarMoсk2.png differ diff --git a/src/images/avatarMoсkCreator.png b/src/images/avatarMoсkCreator.png new file mode 100644 index 00000000..9841cf0b Binary files /dev/null and b/src/images/avatarMoсkCreator.png differ diff --git a/src/images/category.png b/src/images/category.png new file mode 100644 index 00000000..98b4fa64 Binary files /dev/null and b/src/images/category.png differ diff --git a/src/images/remove.png b/src/images/remove.png index add364b7..23f7c9aa 100644 Binary files a/src/images/remove.png and b/src/images/remove.png differ diff --git a/src/images/search.svg b/src/images/search.svg new file mode 100644 index 00000000..148455f9 --- /dev/null +++ b/src/images/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/images/tasksMock.png b/src/images/tasksMock.png new file mode 100644 index 00000000..a2b736ca Binary files /dev/null and b/src/images/tasksMock.png differ diff --git a/src/images/watch.png b/src/images/watch.png new file mode 100644 index 00000000..5cbc3aef Binary files /dev/null and b/src/images/watch.png differ diff --git a/src/pages/Tracker/Tracker.js b/src/pages/Tracker/Tracker.js index 64aac06f..6ee734d7 100644 --- a/src/pages/Tracker/Tracker.js +++ b/src/pages/Tracker/Tracker.js @@ -1,230 +1,520 @@ -import React, {useState} from 'react'; +import React, { useState } from "react"; -import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; -import {Footer} from '../../components/Footer/Footer' +import { ProfileHeader } from "../../components/ProfileHeader/ProfileHeader"; +import { Footer } from "../../components/Footer/Footer"; -import project from '../../images/trackerProject.svg' -import tasks from '../../images/trackerTasks.svg' -import archive from '../../images/archiveTracker.svg' -import avatarTest from '../../images/AvatarTest .png' -import selectArrow from '../../images/select.svg' -import commentsBoard from '../../images/commentsBoard.svg' -import filesBoard from '../../images/filesBoard.svg' +import ModalTiket from "../../components/UI/ModalTiket/ModalTiket"; +import ModalProject from "../../components/UI/ModalProject/ModalProject"; -import './tracker.scss' +import project from "../../images/trackerProject.svg"; +import tasks from "../../images/trackerTasks.svg"; +import archive from "../../images/archiveTracker.svg"; +import avatarTest from "../../images/AvatarTest .png"; +import selectArrow from "../../images/select.svg"; +import commentsBoard from "../../images/commentsBoard.svg"; +import filesBoard from "../../images/filesBoard.svg"; +import search from "../../images/search.svg" + +import "./tracker.scss"; export const Tracker = () => { + const [toggleTab, setToggleTab] = useState(1); + const [projects] = useState([ + { + name: "Разработка трекера", + count: 4, + }, + { + name: "Кинотеатр", + count: 4, + }, + { + name: "Проект страхование", + count: 4, + }, + ]); + const [tabTaskMok, setTabTaskMok] = useState([ + { + name: "Открытые", + open: false, + tasks: [ + { + task: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + comments: 12, + files: 0, + avatarCreated: avatarTest, + avatarDo: avatarTest, + id: 1 + }, + { + task: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + comments: 12, + files: 0, + avatarCreated: avatarTest, + avatarDo: avatarTest, + id: 2 + }, + ], + }, + { + name: "В процессе", + open: false, + tasks: [ + { + task: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + comments: 12, + files: 0, + avatarCreated: avatarTest, + avatarDo: avatarTest, + id: 3 + }, + ], + }, + { + name: "На проверке", + open: false, + tasks: [ + { + task: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + comments: 12, + files: 0, + avatarCreated: avatarTest, + avatarDo: avatarTest, + id: 4 + }, + { + task: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + comments: 12, + files: 0, + avatarCreated: avatarTest, + avatarDo: avatarTest, + id: 5 + }, + { + task: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + comments: 12, + files: 0, + avatarCreated: avatarTest, + avatarDo: avatarTest, + id: 6 + }, + { + task: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + comments: 12, + files: 0, + avatarCreated: avatarTest, + avatarDo: avatarTest, + id: 9 + }, + ], + }, + { + name: "Готово", + open: false, + tasks: [ + { + task: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + comments: 12, + files: 0, + avatarCreated: avatarTest, + avatarDo: avatarTest, + id: 7 + }, + { + task: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + comments: 12, + files: 0, + avatarCreated: avatarTest, + avatarDo: avatarTest, + id: 8 + }, + ], + }, + ]); - const [toggleTab, setToggleTab] = useState(1) - const [projects] = useState([ - { - name: 'Разработка трекера', - count: 4 - }, - { - name: 'Кинотеатр', - count: 4 - }, - { - name: 'Проект страхование', - count: 4 - } - ]) - const [tabTaskMok] = useState([ - { - name: 'Открытые', - tasks: [ - { - task: 'PR - 2245', - description: 'Сверстать часть таблицы. Сверстать часть таблицы', - comments: 12, - files: 0, - avatarCreated: avatarTest, - avatarDo: avatarTest - }, - { - task: 'PR - 2245', - description: 'Сверстать часть таблицы. Сверстать часть таблицы', - comments: 12, - files: 0, - avatarCreated: avatarTest, - avatarDo: avatarTest - } - ] - }, - { - name: 'В процессе', - tasks: [ - { - task: 'PR - 2245', - description: 'Сверстать часть таблицы. Сверстать часть таблицы', - comments: 12, - files: 0, - avatarCreated: avatarTest, - avatarDo: avatarTest - } - ] - }, - { - name: 'На проверке', - tasks: [ - { - task: 'PR - 2245', - description: 'Сверстать часть таблицы. Сверстать часть таблицы', - comments: 12, - files: 0, - avatarCreated: avatarTest, - avatarDo: avatarTest - }, - { - task: 'PR - 2245', - description: 'Сверстать часть таблицы. Сверстать часть таблицы', - comments: 12, - files: 0, - avatarCreated: avatarTest, - avatarDo: avatarTest - }, - { - task: 'PR - 2245', - description: 'Сверстать часть таблицы. Сверстать часть таблицы', - comments: 12, - files: 0, - avatarCreated: avatarTest, - avatarDo: avatarTest - } - ] - }, - { - name: 'Готово', - tasks: [ - { - task: 'PR - 2245', - description: 'Сверстать часть таблицы. Сверстать часть таблицы', - comments: 12, - files: 0, - avatarCreated: avatarTest, - avatarDo: avatarTest - }, - { - task: 'PR - 2245', - description: 'Сверстать часть таблицы. Сверстать часть таблицы', - comments: 12, - files: 0, - avatarCreated: avatarTest, - avatarDo: avatarTest - } - ] - } - ]) + const [completeTasks] = useState([ + { + name: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PR - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PK - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PE - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PA - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PB - 2245", + description: "Верстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PC - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PD - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + { + name: "PA - 2245", + description: "Сверстать часть таблицы. Сверстать часть таблицы", + dateComplete: '07/мар/23', + avatarDo: avatarTest, + }, + ]) - const toggleTabs = (index) => { - setToggleTab(index) + const [filterCompleteTasks, setFilterCompleteTasks] = useState(completeTasks) + + const [modalActiveTicket, setModalActiveTicket] = useState(false); + const [modalActiveProject, setModalActiveProject] = useState(false); + const [startWrapperIndex, setStartWrapperIndex] = useState(null) + const [wrapperHover, setWrapperHover] = useState([false, false, false, false]) + + const toggleTabs = (index) => { + setToggleTab(index); + }; + + function toggleMoreTasks (wrapperIndex) { + setTabTaskMok(prevArray => prevArray.map((elem, index) => { + if (wrapperIndex === index) { + return {...elem, open: !elem.open} + } else { + return elem + } + })) + } + + function dragStartHandler(e, task, wrapperIndex) { + setStartWrapperIndex({task: task, index: wrapperIndex}) + setTimeout(() => { + e.target.classList.add('tasks__board__item__hide') + },0) + } + + function dragEndHandler(e) { + setWrapperHover(prevArray => prevArray.map((elem) => { + return false + })) + e.target.classList.remove('tasks__board__item__hide') + } + + function dragOverHandler(e) { + e.preventDefault() + } + + function dragEnterHandler(wrapperIndex) { + if (wrapperIndex === startWrapperIndex.index) { + return } - return ( -
- -
-
-

Трекер

-
-
-
toggleTabs(1)}> - img -

Проекты

-
-
toggleTabs(2)}> - img -

Задачи

-
-
toggleTabs(3)}> - img -

Архив

-
-
-
-
- {projects.map((project, index) => { - return
-

{project.name}

-
-

Открытые задачи

- {project.count} - + -
-
- }) - } - -
-
-
-

Проект : Разработка трекера

- + -
- avatar - avatar - avatar - avatar - +9 -
-
- Учавствую - arrow -
-
- Мои - arrow -
-
-
- {tabTaskMok.map((section, index) => { - return
= 3 ? 'tasks__board tasks__board__more' : 'tasks__board'}> -
- {section.name} -
- + - ... -
-
- {section.tasks.map((task, index) => { - return
-
-

{task.task}

- ... -
-

- {task.description} -

-
-
- commentsImg - {task.comments} коментариев -
-
- filesImg - {task.files} файлов -
-
- avatar - avatar -
-
-
- }) - } - {section.tasks.length >= 3 && - + - } -
- }) - } -
-
-
-
-
+ setWrapperHover(prevArray => prevArray.map((elem, index) => { + if (index === wrapperIndex) { + return true + } else { + return false + } + })) + } + + function dragDropHandler(e, wrapperIndex) { + e.preventDefault() + if (startWrapperIndex.index === wrapperIndex) { + return + } + setWrapperHover(prevArray => prevArray.map((elem) => { + return false + })) + setTabTaskMok(prevArray => prevArray.map((elem, index) => { + if (index === wrapperIndex) { + return {...elem, tasks: [...elem.tasks, startWrapperIndex.task]} + } else if (index === startWrapperIndex.index) { + return {...elem, tasks: elem.tasks.filter((item) => { + return item.id !== startWrapperIndex.task.id + } + )} + } else { + return elem + } + })) + } + + function filterArchiveTasks(e) { + setFilterCompleteTasks(completeTasks.filter((item) => { + if (!e.target.value) { + return item + } + if (item.name.toLowerCase().startsWith(e.target.value.toLowerCase()) || item.description.toLowerCase().startsWith(e.target.value.toLowerCase())) { + return item + } + })) + } + + return ( +
+ +
+
+

Трекер

+
+
+
toggleTabs(1)} + > + img +

Проекты

+
+
toggleTabs(2)} + > + img +

Задачи

+
+
toggleTabs(3)} + > + img +

Архив

+
-
+
+
+ {projects.map((project, index) => { + return ( +
+

{project.name}

+
+

Открытые задачи

+ {project.count} + + +
+
+ ); + })} + + +
+
+
+

Проект : Разработка трекера

+ + +
+ avatar + avatar + avatar + avatar + +9 +
+
+ Учавствую + arrow +
+
+ Мои + arrow +
+
+ + +
+ {tabTaskMok.map((section, wrapperIndex) => { + return ( +
dragOverHandler(e)} + onDragEnter={(e) => dragEnterHandler(wrapperIndex)} + onDrop={(e) => dragDropHandler(e, wrapperIndex)} + className={`tasks__board ${section.tasks.length >= 3 ? 'tasks__board__more' : ''} ${wrapperHover[wrapperIndex] ? 'tasks__board__hover' : ''}`} + > +
+ + {section.name} + +
+ + + ... +
+
+ {section.tasks.map((task, index) => { + if (index > 2) { + if (!section.open) { + return + } + } + return ( +
dragStartHandler(e, task, wrapperIndex)} + onDragEnd={(e) => dragEndHandler(e)} + onClick={() => setModalActiveTicket(true)} + > +
+

{task.task}

+ ... +
+

+ {task.description} +

+
+
+ commentsImg + {task.comments} коментариев +
+
+ filesImg + {task.files} файлов +
+
+ avatar + avatar +
+
+
+ ); + })} + {section.tasks.length > 3 && ( + toggleMoreTasks(wrapperIndex)}>{section.open ? '-' : '+'} + )} +
+ ); + })} +
+
+
+
+

Архив:

+

{filterCompleteTasks.length} задач(а)

+
+ filterArchiveTasks(event)} /> + search +
+
+
+ {filterCompleteTasks.map((task, index) => { + return
+
+

{task.description}

+

{task.dateComplete}

+
+
+ avatar +

{task.name}

+
+
+ })} +
+
+
+
- ) +
+
+
+ ); }; diff --git a/src/pages/Tracker/tracker.scss b/src/pages/Tracker/tracker.scss index d4c058f8..29bc09b3 100644 --- a/src/pages/Tracker/tracker.scss +++ b/src/pages/Tracker/tracker.scss @@ -3,6 +3,7 @@ height: 100%; min-height: 100vh; font-family: "LabGrotesque", sans-serif; + position: relative; .container { max-width: 1160px; @@ -76,6 +77,14 @@ display: none; align-items: center; + @media (max-width: 785px) { + justify-content: center; + } + + @media (max-width: 460px) { + padding: 15px; + } + .project { width: 48%; background: #F1F1F1; @@ -83,6 +92,18 @@ padding: 17px 26px 16px; cursor: pointer; + @media (max-width: 1068px) { + width: 47%; + } + + @media (max-width: 785px) { + width: 100%; + } + + @media (max-width: 430px) { + padding: 8px 13px 8px; + } + h3 { font-weight: 700; font-size: 16px; @@ -96,6 +117,10 @@ align-items: center; position: relative; + @media (max-width: 430px) { + justify-content: space-between; + } + p { color: #6F6F6F; font-weight: 500; @@ -123,6 +148,10 @@ color: #6F6F6F; font-size: 17px; margin: 0 25px 0 auto; + + @media (max-width: 430px) { + display: none; + } } &:after { @@ -132,6 +161,10 @@ color: #6F6F6F; right: 0; top: -35%; + + @media (max-width: 430px) { + display: none; + } } } } @@ -291,6 +324,12 @@ row-gap: 16px; height: fit-content; position: relative; + transition: all 0.3s ease; + + + &__hover { + box-shadow: 0px 2px 10px #9cc480, 0px 0px 0px 1px rgba(60, 66, 87, 0.08), 0px 1px 1px rgba(0, 0, 0, 0.06); + } &__item { padding: 16px; @@ -298,7 +337,11 @@ box-shadow: 0px 3px 2px -2px rgba(0, 0, 0, 0.06), 0px 5px 3px -2px rgba(0, 0, 0, 0.02); border-radius: 6px; background: #FFFFFF; - cursor: grabbing; + cursor: pointer; + + &__hide { + opacity: 0; + } &__title { display: flex; @@ -337,6 +380,7 @@ display: flex; justify-content: space-between; align-items: center; + pointer-events: none; &__more { cursor: pointer; @@ -362,9 +406,8 @@ } } - .moreItems { + .openItems { cursor: pointer; - background: #8BCC60; border-radius: 44px; width: 33px; height: 33px; @@ -373,9 +416,17 @@ align-items: center; position: absolute; bottom: -15px; - color: white; font-size: 20px; left: 165px; + color: white; + } + + .moreItems { + background: #8BCC60; + } + + .lessItems { + background: #f92828; } &__more { @@ -419,6 +470,136 @@ .active__content { display: flex; } + + &__archive { + background: white; + border-radius: 12px; + padding: 26px 24px 40px; + min-height: 774px; + display: flex; + flex-direction: column; + + .archive { + &__title { + padding-bottom: 8px; + border-bottom: 1px solid #DDE2E4; + display: flex; + align-items: center; + + h3 { + color: #111112; + font-weight: 700; + font-size: 16px; + line-height: 32px; + margin-bottom: 0; + } + + p { + margin: 0 0 0 10px; + font-weight: 500; + font-size: 14px; + } + } + + &__search { + border: 2px solid; + border-color: var(--ds-border-input, #DFE1E6); + margin-left: auto; + padding: 5px; + display: flex; + align-items: center; + + input { + outline: none; + border: none; + font-size: 16px; + font-weight: 500; + } + + img { + width: 20px; + height: 20px; + } + } + + &__tasksWrapper { + margin-top: 10px; + display: flex; + flex-direction: column; + row-gap: 3px; + max-height: 649px; + overflow-y: auto; + margin-right: -16px; + padding-right: 10px; + + &::-webkit-scrollbar { + width: 4px; + background: 0 0; + box-shadow: 0 0 14px rgba(0,0,0,.04); + border-radius: 20px; + } + + &::-webkit-scrollbar { + width: 4px; + border-radius: 20px; + } + + &::-webkit-scrollbar-thumb { + background: #cbd9f9; + border-radius: 20px; + } + + &::-webkit-scrollbar-track { + background: #c5c0c6; + border-radius: 20px; + } + } + + &__completeTask { + display: flex; + justify-content: space-between; + border: 1px solid var(--ds-border,#dfe1e6); + padding: 8px 10px; + cursor: pointer; + transition: all 0.3s ease; + + &:hover { + background: var(--ds-background-neutral-subtle-hovered,#f4f5f7); + } + + p { + margin-bottom: 0; + } + + &__description { + font-size: 14px; + font-weight: 500; + + .date { + font-weight: 400; + font-size: 12px; + } + } + + &__info { + display: flex; + align-items: center; + + img { + width: 36px; + height: 36px; + } + + p { + margin-left: 10px; + text-decoration: line-through; + font-size: 11px; + font-weight: 500; + } + } + } + } + } } } } diff --git a/src/pages/ViewReport/ViewReport.js b/src/pages/ViewReport/ViewReport.js index c6767f52..830cf0ea 100644 --- a/src/pages/ViewReport/ViewReport.js +++ b/src/pages/ViewReport/ViewReport.js @@ -135,7 +135,7 @@ export const ViewReport = () => { })} - Всего: {totalHours} часов + Всего: {totalHours} {hourOfNum(totalHours)} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index b8b1fcef..00000000 --- a/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", // компилируем ts код в js код версии ES5 - "module": "esnext", - // для поддержки динамического импорта модулей - "allowSyntheticDefaultImports": true, - "jsx": "react" - } -} \ No newline at end of file