diff --git a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx index f2d14230..640f6d46 100644 --- a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx +++ b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx @@ -7,7 +7,7 @@ import { Link } from "react-router-dom"; import { getProfileInfo } from "@redux/outstaffingSlice"; import { setProjectBoardFetch } from "@redux/projectsTrackerSlice"; -import { getCorrectRequestDate, urlForLocal } from "@utils/helper"; +import { caseOfNum, getCorrectRequestDate, urlForLocal } from "@utils/helper"; import { apiRequest } from "@api/request"; @@ -429,7 +429,7 @@ export const ModalTiсket = ({ Загрузить файл {0} - Файлов + {caseOfNum(0, "files")}
{selectedExecutor.user.fio}
+ + +Выберите исполнитель
+ + {selectExecutorOpen && +{user.user?.fio}
+ +Вернуться на проекты
diff --git a/src/pages/Tracker/tracker.scss b/src/pages/Tracker/tracker.scss index 4a0d6db3..9ed708bb 100644 --- a/src/pages/Tracker/tracker.scss +++ b/src/pages/Tracker/tracker.scss @@ -208,7 +208,8 @@ &__wrapper { display: flex; - max-width: 1160px; + max-width: 1260px; + width: 100%; margin: 0 auto; justify-content: space-between; padding: 0 10px; @@ -466,6 +467,107 @@ } } + &__executor { + display: flex; + align-items: center; + justify-content: space-between; + cursor: pointer; + margin-right: 10px; + border-radius: 8px; + border: 1px solid #e3e2e2; + padding: 2px 6px; + position: relative; + max-width: 220px; + width: 100%; + + &Selected { + display: flex; + align-items: center; + border-radius: 8px; + max-width: 220px; + width: 100%; + margin-right: 10px; + justify-content: center; + + p { + color: #252c32; + font-weight: 400; + font-size: 14px; + line-height: 24px; + max-width: 155px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .avatar { + margin: 0 5px; + } + + .delete { + cursor: pointer; + } + + img { + display: flex; + width: 20px; + height: 20px; + } + } + p { + color: #252c32; + font-weight: 400; + font-size: 14px; + line-height: 24px; + } + + img { + transition: all 0.15s ease; + margin-left: 5px; + } + + .open { + transform: rotate(180deg); + } + + &Dropdown { + position: absolute; + top: 33px; + background: white; + border-radius: 8px; + z-index: 5; + padding: 10px 10px; + display: flex; + flex-direction: column; + row-gap: 7px; + width: 100%; + + + .executorDropdown__person { + display: flex; + justify-content: space-between; + align-items: center; + p { + max-width: 155px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + img { + width: 15px; + height: 15px; + } + + &:hover { + p { + font-weight: 600; + } + } + } + } + } + &__back { cursor: pointer; display: flex; diff --git a/src/redux/projectsTrackerSlice.js b/src/redux/projectsTrackerSlice.js index d8a10860..e66f755c 100644 --- a/src/redux/projectsTrackerSlice.js +++ b/src/redux/projectsTrackerSlice.js @@ -122,6 +122,11 @@ export const projectsTrackerSlice = createSlice({ ); }); }, + filteredExecutorTasks: (state, action) => { + state.projectBoard.columns.forEach((column) => { + column.tasks = column.tasks.filter((task) => task.executor_id === action.payload); + }); + }, setColumnName: (state, action) => { state.columnName = action.payload; }, @@ -174,6 +179,7 @@ export const { addPersonToProject, filterCreatedByMe, filteredParticipateTasks, + filteredExecutorTasks, movePositionProjectTask, } = projectsTrackerSlice.actions;