From f95812ac356ca09aab65cb969d16114fee1a0610 Mon Sep 17 00:00:00 2001 From: MaxOvs19 Date: Fri, 23 Jun 2023 15:18:19 +0300 Subject: [PATCH] Fixed styles modalTracker --- .../Tracker/ModalTicket/modalTicket.scss | 3 +- .../Tracker/TrackerModal/TrackerModal.jsx | 370 +++++++++--------- .../Tracker/TrackerModal/trackerModal.scss | 197 +++++----- 3 files changed, 283 insertions(+), 287 deletions(-) diff --git a/src/components/Modal/Tracker/ModalTicket/modalTicket.scss b/src/components/Modal/Tracker/ModalTicket/modalTicket.scss index efe4daa6..60936eeb 100644 --- a/src/components/Modal/Tracker/ModalTicket/modalTicket.scss +++ b/src/components/Modal/Tracker/ModalTicket/modalTicket.scss @@ -32,6 +32,7 @@ max-width: 85%; display: flex; align-items: center; + flex-direction: row; &__category { margin-right: 17px; @@ -100,7 +101,7 @@ .comments__list { display: flex; flex-direction: column; - max-height: 420px; + max-height: 300px; overflow: auto; &::-webkit-scrollbar { diff --git a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx index c77c53fe..ed3b0d2b 100644 --- a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx +++ b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx @@ -21,6 +21,7 @@ import { urlForLocal } from "@utils/helper"; import { apiRequest } from "@api/request"; import BaseButton from "@components/Common/BaseButton/BaseButton"; +import ModalLayout from "@components/Common/ModalLayout/ModalLayout"; import arrowDown from "assets/icons/arrows/selectArrow.png"; @@ -211,202 +212,197 @@ export const TrackerModal = ({ }, [active]); return ( -
{ - setActive(false); - setSelectWorkersOpen(false); - }} + { + // setSelectWorkersOpen(false); + // }} > -
e.stopPropagation()}> - {modalType === "addWorker" && ( -
-
-

Добавьте участника

- {/*
*/} - {/* setEmailWorker(e.target.value)}*/} - {/* />*/} - {/*
*/} -
setSelectWorkersOpen(!selectWorkersOpen)} - > -

- {selectedWorker - ? selectedWorker.employee.fio - : "Выберите пользователя"} -

- arrow - {Boolean(selectWorkersOpen) && ( -
- {Boolean(workers.length) ? ( - workers.map((worker) => { - if (worker === selectedWorker) { - return; - } - return ( -
{ - setSelectedWorker(worker); - }} - > -

{worker.employee.fio}

- avatar -
- ); - }) - ) : ( -
Нет пользователей
- )} -
- )} -
-
- - Добавить - -
- )} - {modalType === "createTiketProject" && ( -
-
-

Введите название и описание задачи

-
- setValueTiket(e.target.value)} - placeholder="Название задачи" - /> -
-
- setDescriptionTicket(e.target.value)} - placeholder="Описание задачи" - /> -
-
- - Создать - -
- )} - {modalType === "editProject" && ( -
-
-

Введите новое название

-
- setProjectName(e.target.value)} - /> -
-
- - - Сохранить - -
- )} - {modalType === "createProject" && ( -
-
-

{titleProject}

-
- setNameProject(e.target.value)} - /> -
- - Создать - -
-
- )} - {modalType === "addSubtask" && ( -
-
-

- Вы добавляете подзадачу{" "} -

в колонку(id) задачи "{defautlInput}"

-

-

Введите текст

-
- -
-
- e.preventDefault()} + {modalType === "addWorker" && ( +
+
+

Добавьте участника

+ {/*
*/} + {/* setEmailWorker(e.target.value)}*/} + {/* />*/} + {/*
*/} +
setSelectWorkersOpen(!selectWorkersOpen)} > - Добавить - -
- )} - {modalType === "createColumn" && ( -
-
-

Введите название колонки

-
- setValueColumn(e.target.value)} - /> -
+

+ {selectedWorker + ? selectedWorker.employee.fio + : "Выберите пользователя"} +

+ arrow + {Boolean(selectWorkersOpen) && ( +
+ {Boolean(workers.length) ? ( + workers.map((worker) => { + if (worker === selectedWorker) { + return; + } + return ( +
{ + setSelectedWorker(worker); + }} + > +

{worker.employee.fio}

+ avatar +
+ ); + }) + ) : ( +
Нет пользователей
+ )} +
+ )}
- +
+ + Добавить + +
+ )} + {modalType === "createTiketProject" && ( +
+
+

Введите название и описание задачи

+
+ setValueTiket(e.target.value)} + placeholder="Название задачи" + /> +
+
+ setDescriptionTicket(e.target.value)} + placeholder="Описание задачи" + /> +
+
+ + Создать + +
+ )} + {modalType === "editProject" && ( +
+
+

Введите новое название

+
+ setProjectName(e.target.value)} + /> +
+
+ + + Сохранить + +
+ )} + {modalType === "createProject" && ( +
+
+

{titleProject}

+
+ setNameProject(e.target.value)} + /> +
+ Создать
- )} - {modalType === "editColumn" && ( -
-
-

Введите новое название

-
- dispatch(setColumnName(e.target.value))} - /> -
-

Приоритет колонки

-
- dispatch(setColumnPriority(e.target.value))} - /> -
+
+ )} + {modalType === "addSubtask" && ( +
+
+

+ Вы добавляете подзадачу{" "} +

в колонку(id) задачи "{defautlInput}"

+

+

Введите текст

+
+
- - Сохранить -
- )} + e.preventDefault()}> + Добавить + +
+ )} + {modalType === "createColumn" && ( +
+
+

Введите название колонки

+
+ setValueColumn(e.target.value)} + /> +
+
+ + Создать + +
+ )} + {modalType === "editColumn" && ( +
+
+

Введите новое название

+
+ dispatch(setColumnName(e.target.value))} + /> +
+

Приоритет колонки

+
+ dispatch(setColumnPriority(e.target.value))} + /> +
+
+ + Сохранить + +
+ )} - setActive(false)}> -
-
+ setActive(false)}> + ); }; diff --git a/src/components/Modal/Tracker/TrackerModal/trackerModal.scss b/src/components/Modal/Tracker/TrackerModal/trackerModal.scss index c8f6ccc4..0181b6ef 100644 --- a/src/components/Modal/Tracker/TrackerModal/trackerModal.scss +++ b/src/components/Modal/Tracker/TrackerModal/trackerModal.scss @@ -1,3 +1,4 @@ +//Удалить при переходе всех модалок в обертку modalLayout .modal-add { z-index: 9; height: 100%; @@ -23,125 +24,123 @@ align-items: center; justify-content: center; } +} - .title-project { +.title-project { + display: flex; + align-items: center; + flex-direction: column; + margin: 0 0 15px 0; + + .input-container { + width: 287px; + height: 35px; + background: #ffffff; + border-radius: 8px; + margin: 12px 0; + + input::-webkit-inner-spin-button { + -webkit-appearance: none; + } + } + + h4 { + font-weight: 500; + font-size: 22px; + line-height: 26px; + color: #263238 !important; + } + + &__decs { + font-weight: 300; + font-size: 12px; + line-height: 14px; + margin: 12px 0 16px 0; + } + + &__textarea { + resize: none; + width: 302px; + height: 83px; + background: #ffffff; + border-radius: 8px; + border: none; + font-size: 15px; + line-height: 18px; + } + + .select__worker { display: flex; + justify-content: space-between; align-items: center; - flex-direction: column; - margin: 0 0 15px 0; + padding: 5px; + background: white; + border-radius: 5px; + cursor: pointer; + width: 100%; + position: relative; - .input-container { - width: 287px; - height: 35px; - background: #ffffff; - border-radius: 8px; - margin: 12px 0; - - input::-webkit-inner-spin-button { - -webkit-appearance: none; - } + p { + max-width: 150px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 14px; } - h4 { - font-weight: 500; - font-size: 22px; - line-height: 26px; - color: #263238 !important; + img { + transition: all 0.3s ease; + width: 16px; + height: 16px; } - &__decs { - font-weight: 300; - font-size: 12px; - line-height: 14px; - margin: 12px 0 16px 0; - } - - &__textarea { - resize: none; - width: 302px; - height: 83px; - background: #ffffff; - border-radius: 8px; - border: none; - font-size: 15px; - line-height: 18px; - } - - .select__worker { + &__dropDown { display: flex; - justify-content: space-between; - align-items: center; + flex-direction: column; + position: absolute; + width: 100%; padding: 5px; + top: 35px; + left: 0; background: white; border-radius: 5px; - cursor: pointer; - width: 100%; - position: relative; + row-gap: 5px; - p { - max-width: 150px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - font-size: 14px; - } - - img { - transition: all 0.3s ease; - width: 16px; - height: 16px; - } - - &__dropDown { + .worker { display: flex; - flex-direction: column; - position: absolute; - width: 100%; - padding: 5px; - top: 35px; - left: 0; - background: white; - border-radius: 5px; - row-gap: 5px; - - .worker { - display: flex; - justify-content: space-between; - } - } - } - - .open { - .arrow { - transform: rotate(180deg); + justify-content: space-between; } } } - .name-project { - margin-left: 10px; - border: none; - outline: none; - height: 100%; - width: 90%; - font-size: 14px; + .open { + .arrow { + transform: rotate(180deg); + } } +} - .button-add { - width: 130px; - height: 37px; - // background: #52b709; - // border-radius: 44px; - // border: none; - font-weight: 400; - font-size: 15px; - line-height: 32px; - // color: #ffffff; - display: flex; - align-items: center; - justify-content: center; - margin: 0 auto; - } +.name-project { + margin-left: 10px; + border: none; + outline: none; + height: 100%; + width: 90%; + font-size: 14px; +} + +.button-add { + width: 130px; + height: 37px; + + font-weight: 400; + font-size: 15px; + line-height: 32px; + + display: flex; + align-items: center; + justify-content: center; + margin: 0 auto; } .modal-add.active {