From e58a576be9cc8f3d3daf40fc4f949fb5436f95cc Mon Sep 17 00:00:00 2001 From: M1kola Date: Thu, 29 Jun 2023 19:18:58 +0300 Subject: [PATCH 1/5] tracker-tasks --- .../Tracker/ModalTicket/modalTicket.scss | 39 ++++++++++++++++--- .../TicketFullScreen/TicketFullScreen.jsx | 1 - .../Tracker/TrackerModal/trackerModal.scss | 22 +++++++++++ .../TrackerTaskComment/TrackerTaskComment.jsx | 7 +++- src/pages/ProjectTracker/ProjectTracker.js | 6 +-- src/pages/Tracker/Tracker.js | 13 +++++-- src/pages/Tracker/tracker.scss | 30 +++++++++++++- src/utils/helper.js | 20 ++++++++++ 8 files changed, 122 insertions(+), 16 deletions(-) diff --git a/src/components/Modal/Tracker/ModalTicket/modalTicket.scss b/src/components/Modal/Tracker/ModalTicket/modalTicket.scss index 9a1e24ca..a5f8c70b 100644 --- a/src/components/Modal/Tracker/ModalTicket/modalTicket.scss +++ b/src/components/Modal/Tracker/ModalTicket/modalTicket.scss @@ -78,8 +78,22 @@ font-style: normal; font-size: 16px; line-height: 24px; - max-width: 340px; + padding: 5px; outline: none; + border-radius: 8px; + border: 1px solid rgb(204, 206, 209); + } + + .ck-toolbar { + border-radius: 8px 8px 0 0 !important; + } + + .ck-content { + font-size: 14px; + min-height: 100px; + border: 1px solid rgb(204, 206, 209) !important; + border-radius: 0 0 8px 8px !important; + box-shadow: none !important; } button { @@ -228,7 +242,7 @@ margin-left: 34px; text-decoration-line: underline; font-weight: 400; - font-size: 10px; + font-size: 11px; line-height: 32px; cursor: pointer; @@ -381,9 +395,9 @@ margin-right: 18px; } - &:focus-within { - border: 1px solid #0000004d; - } + //&:focus-within { + // border: 1px solid #0000004d; + //} } } @@ -467,6 +481,11 @@ border: none; color: white; font-size: 17px; + transition: all 0.3s ease; + + &:hover { + background: #6cc933; + } } } @@ -479,6 +498,11 @@ color: white; background: #1458dd; border-radius: 44px; + transition: all 0.15s ease; + + &:hover { + background: #0255ff; + } img { margin-left: 10px; @@ -499,6 +523,11 @@ color: white; background: red; border-radius: 44px; + transition: all 0.3s ease; + + &:hover { + background: #f5693d; + } } .time { diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index a5e264f4..df7b5de2 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -8,7 +8,6 @@ import { deletePersonOnProject, getBoarderLoader, modalToggle, - setProjectBoardFetch, setToggleTab, } from "@redux/projectsTrackerSlice"; diff --git a/src/components/Modal/Tracker/TrackerModal/trackerModal.scss b/src/components/Modal/Tracker/TrackerModal/trackerModal.scss index 5c28876f..e5928691 100644 --- a/src/components/Modal/Tracker/TrackerModal/trackerModal.scss +++ b/src/components/Modal/Tracker/TrackerModal/trackerModal.scss @@ -94,6 +94,22 @@ max-width: 320px; } + .ck-editor__editable.ck-rounded-corners { + min-height: 100px; + font-size: 14px; + } + + .ck-toolbar { + border: none !important; + border-radius: 8px 8px 0 0 !important; + } + + .ck-content { + border: none !important; + border-radius: 0 0 8px 8px !important; + box-shadow: none !important; + } + .select__executor { width: 320px; background: white; @@ -229,6 +245,12 @@ .worker { display: flex; justify-content: space-between; + + &:hover { + p { + font-weight: 500; + } + } } } } diff --git a/src/components/TrackerTaskComment/TrackerTaskComment.jsx b/src/components/TrackerTaskComment/TrackerTaskComment.jsx index b7227a88..365af3b2 100644 --- a/src/components/TrackerTaskComment/TrackerTaskComment.jsx +++ b/src/components/TrackerTaskComment/TrackerTaskComment.jsx @@ -12,6 +12,7 @@ import TrackerTaskSubComment from "@components/TrackerTaskComment/TrackerTaskCom import del from "assets/icons/delete.svg"; import edit from "assets/icons/edit.svg"; import accept from "assets/images/accept.png"; +import avatarMok from "assets/images/avatarMok.png"; export const TrackerTaskComment = ({ taskId, @@ -84,7 +85,11 @@ export const TrackerTaskComment = ({ >
- avatar + avatar

{comment.user.fio}

diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 134ff358..1b96ebe2 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -28,7 +28,6 @@ import { Footer } from "@components/Common/Footer/Footer"; import { Loader } from "@components/Common/Loader/Loader"; import ModalTicket from "@components/Modal/Tracker/ModalTicket/ModalTicket"; import TrackerModal from "@components/Modal/Tracker/TrackerModal/TrackerModal"; -// import TrackerModal from "@components/Modal/TrackerModal/TrackerModal"; import { Navigation } from "@components/Navigation/Navigation"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; @@ -44,6 +43,7 @@ import project from "assets/icons/trackerProject.svg"; import tasks from "assets/icons/trackerTasks.svg"; import accept from "assets/images/accept.png"; import avatarMok from "assets/images/avatarMok.png"; +import { caseOfNum } from "@utils/helper"; export const ProjectTracker = () => { const dispatch = useDispatch(); @@ -563,11 +563,11 @@ export const ProjectTracker = () => {
commentsImg - {task.comment_count} коментариев + {task.comment_count} {caseOfNum(task.comment_count, 'comments')}
filesImg - {task.files} файлов + {task.files ? task.files : 0} {caseOfNum(0, 'files')}
diff --git a/src/pages/Tracker/Tracker.js b/src/pages/Tracker/Tracker.js index d99f1f5c..8d4630c0 100644 --- a/src/pages/Tracker/Tracker.js +++ b/src/pages/Tracker/Tracker.js @@ -30,6 +30,7 @@ import tasks from "assets/icons/trackerTasks.svg"; import noProjects from "assets/images/noProjects.png"; import "./tracker.scss"; +import avatarMok from "assets/images/avatarMok.png"; export const Tracker = () => { const dispatch = useDispatch(); @@ -253,11 +254,13 @@ export const Tracker = () => {
{task.title}
-

{task.description}

+

avatar
@@ -301,11 +304,13 @@ export const Tracker = () => {

{task.title}

-

{task.description}

+

avatar
diff --git a/src/pages/Tracker/tracker.scss b/src/pages/Tracker/tracker.scss index 1a38bead..4a0d6db3 100644 --- a/src/pages/Tracker/tracker.scss +++ b/src/pages/Tracker/tracker.scss @@ -252,7 +252,6 @@ &__persons { position: relative; display: flex; - cursor: pointer; align-items: center; .projectPersons { @@ -302,8 +301,14 @@ background: #00c5a8; color: white; font-size: 14px; + transition: all 0.15s ease; left: -28px; z-index: 2; + cursor: pointer; + + &:hover { + background: #10d5bb; + } } p { @@ -466,6 +471,8 @@ display: flex; align-items: center; color: black; + max-width: 180px; + width: 100%; p { font-weight: 400; @@ -477,6 +484,12 @@ margin-left: 10px; width: 20px; } + + &:hover { + p { + font-weight: 500; + } + } } } @@ -738,12 +751,20 @@ font-weight: 500; font-size: 16px; line-height: 24px; - cursor: pointer; + max-width: 250px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .add { color: #6f6f6f; font-size: 19px; + cursor: pointer; + + &:hover { + font-weight: 600; + } } .more { @@ -751,6 +772,11 @@ position: relative; bottom: 4px; font-size: 20px; + cursor: pointer; + + &:hover { + font-weight: 600; + } } .done { diff --git a/src/utils/helper.js b/src/utils/helper.js index f32e202b..e421ce2b 100644 --- a/src/utils/helper.js +++ b/src/utils/helper.js @@ -61,3 +61,23 @@ export function getCorrectRequestDate(date) { const sec = String(date.getUTCSeconds()); return `${yyyy}-${mm}-${dd} ${hh}:${min}:${sec}`; } + +export function caseOfNum(number, type) { + const comments = ["коментарий", "комментария", " коментариев"]; + const files = ["файлов", "файла", "файлов"] + const cases = [2, 0, 1, 1, 1, 2]; + if (type === 'comments') { + return comments[ + number % 100 > 4 && number % 100 < 20 + ? 2 + : cases[number % 10 < 5 ? number % 10 : 5] + ]; + } + if (type === 'files') { + return files[ + number % 100 > 4 && number % 100 < 20 + ? 2 + : cases[number % 10 < 5 ? number % 10 : 5] + ]; + } +} From d48957746f52b5b11af1f1fd89a2ee23845f2139 Mon Sep 17 00:00:00 2001 From: M1kola Date: Thu, 29 Jun 2023 19:19:13 +0300 Subject: [PATCH 2/5] tracker-tasks --- .../TrackerTaskComment/TrackerTaskComment.jsx | 7 ++++-- src/pages/ProjectTracker/ProjectTracker.js | 12 +++++++--- src/pages/Tracker/Tracker.js | 23 +++++++++++++++---- src/utils/helper.js | 10 ++++---- 4 files changed, 37 insertions(+), 15 deletions(-) diff --git a/src/components/TrackerTaskComment/TrackerTaskComment.jsx b/src/components/TrackerTaskComment/TrackerTaskComment.jsx index 365af3b2..e729914e 100644 --- a/src/components/TrackerTaskComment/TrackerTaskComment.jsx +++ b/src/components/TrackerTaskComment/TrackerTaskComment.jsx @@ -87,9 +87,12 @@ export const TrackerTaskComment = ({
avatar + alt="avatar" + />

{comment.user.fio}

diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 1b96ebe2..232cb100 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -20,6 +20,7 @@ import { } from "@redux/projectsTrackerSlice"; import { urlForLocal } from "@utils/helper"; +import { caseOfNum } from "@utils/helper"; import { apiRequest } from "@api/request"; @@ -43,7 +44,6 @@ import project from "assets/icons/trackerProject.svg"; import tasks from "assets/icons/trackerTasks.svg"; import accept from "assets/images/accept.png"; import avatarMok from "assets/images/avatarMok.png"; -import { caseOfNum } from "@utils/helper"; export const ProjectTracker = () => { const dispatch = useDispatch(); @@ -563,11 +563,17 @@ export const ProjectTracker = () => {
commentsImg - {task.comment_count} {caseOfNum(task.comment_count, 'comments')} + + {task.comment_count}{" "} + {caseOfNum(task.comment_count, "comments")} +
filesImg - {task.files ? task.files : 0} {caseOfNum(0, 'files')} + + {task.files ? task.files : 0}{" "} + {caseOfNum(0, "files")} +
diff --git a/src/pages/Tracker/Tracker.js b/src/pages/Tracker/Tracker.js index 8d4630c0..e62e06ca 100644 --- a/src/pages/Tracker/Tracker.js +++ b/src/pages/Tracker/Tracker.js @@ -27,10 +27,10 @@ import archive from "assets/icons/archiveTracker.svg"; import search from "assets/icons/serchIcon.png"; import project from "assets/icons/trackerProject.svg"; import tasks from "assets/icons/trackerTasks.svg"; +import avatarMok from "assets/images/avatarMok.png"; import noProjects from "assets/images/noProjects.png"; import "./tracker.scss"; -import avatarMok from "assets/images/avatarMok.png"; export const Tracker = () => { const dispatch = useDispatch(); @@ -254,12 +254,18 @@ export const Tracker = () => {
{task.title}
-

+

avatar @@ -304,12 +310,19 @@ export const Tracker = () => {

{task.title}

-

+

avatar diff --git a/src/utils/helper.js b/src/utils/helper.js index e421ce2b..bae68067 100644 --- a/src/utils/helper.js +++ b/src/utils/helper.js @@ -64,20 +64,20 @@ export function getCorrectRequestDate(date) { export function caseOfNum(number, type) { const comments = ["коментарий", "комментария", " коментариев"]; - const files = ["файлов", "файла", "файлов"] + const files = ["файлов", "файла", "файлов"]; const cases = [2, 0, 1, 1, 1, 2]; - if (type === 'comments') { + if (type === "comments") { return comments[ number % 100 > 4 && number % 100 < 20 ? 2 : cases[number % 10 < 5 ? number % 10 : 5] - ]; + ]; } - if (type === 'files') { + if (type === "files") { return files[ number % 100 > 4 && number % 100 < 20 ? 2 : cases[number % 10 < 5 ? number % 10 : 5] - ]; + ]; } } From 5af01a63ed6653800ff55ecad99513525a4cdeee Mon Sep 17 00:00:00 2001 From: M1kola Date: Mon, 3 Jul 2023 22:07:44 +0300 Subject: [PATCH 3/5] executor filter tasks --- .../Modal/Tracker/ModalTicket/ModalTicket.jsx | 4 +- .../TicketFullScreen/TicketFullScreen.jsx | 4 +- src/components/ReportForm/reportForm.scss | 2 + src/pages/ProjectTracker/ProjectTracker.js | 55 +++++++++ src/pages/Tracker/tracker.scss | 104 +++++++++++++++++- src/redux/projectsTrackerSlice.js | 6 + 6 files changed, 170 insertions(+), 5 deletions(-) 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")}

diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx index df7b5de2..5337973d 100644 --- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx +++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx @@ -11,7 +11,7 @@ import { setToggleTab, } from "@redux/projectsTrackerSlice"; -import { getCorrectRequestDate, urlForLocal } from "@utils/helper"; +import { caseOfNum, getCorrectRequestDate, urlForLocal } from "@utils/helper"; import { apiRequest } from "@api/request"; @@ -585,7 +585,7 @@ export const TicketFullScreen = () => { Загрузить файл {0} - Файлов + {caseOfNum(0, "files")}

diff --git a/src/components/ReportForm/reportForm.scss b/src/components/ReportForm/reportForm.scss index e9e88658..f27547d0 100644 --- a/src/components/ReportForm/reportForm.scss +++ b/src/components/ReportForm/reportForm.scss @@ -99,6 +99,8 @@ cursor: pointer; img { + width: 20px; + height: 20px; margin-left: 20px; margin-right: 20px; } diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 232cb100..c30cacdb 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -6,6 +6,7 @@ import { activeLoader, deletePersonOnProject, filterCreatedByMe, + filteredExecutorTasks, filteredParticipateTasks, getBoarderLoader, getProjectBoard, @@ -44,6 +45,7 @@ import project from "assets/icons/trackerProject.svg"; import tasks from "assets/icons/trackerTasks.svg"; import accept from "assets/images/accept.png"; import avatarMok from "assets/images/avatarMok.png"; +import arrowDown from "assets/icons/arrows/selectArrow.png"; export const ProjectTracker = () => { const dispatch = useDispatch(); @@ -61,6 +63,8 @@ export const ProjectTracker = () => { const [checkBoxParticipateTasks, setCheckBoxParticipateTasks] = useState(false); const [checkBoxMyTasks, setCheckBoxMyTasks] = useState(false); + const [selectedExecutor, setSelectedExecutor] = useState(null); + const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false) const startWrapperIndexTest = useRef({}); const projectBoard = useSelector(getProjectBoard); const loader = useSelector(getBoarderLoader); @@ -243,6 +247,16 @@ export const ProjectTracker = () => { setCheckBoxMyTasks(!checkBoxMyTasks); } + function executorFilter(user) { + dispatch(filteredExecutorTasks(user.user_id)) + setSelectedExecutor(user) + } + + function deleteSelectedExecutorFilter() { + setSelectedExecutor(null) + dispatch(setProjectBoardFetch(projectId.id)); + } + return (
@@ -423,6 +437,47 @@ export const ProjectTracker = () => { {checkBoxMyTasks && accept}
+ {selectedExecutor ? +
+

{selectedExecutor.user.fio}

+ avatar + delete +
+ : +
setSelectedExecutorOpen(!selectExecutorOpen)}> +

Выберите исполнитель

+ arrow + {selectExecutorOpen && +
+ {projectBoard.projectUsers.map((user) => { + return
executorFilter(user)}> +

{user.user?.fio}

+ avatar +
+ }) + } +
+ } +
+ }

Вернуться на проекты

arrow 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; From b5d205abc9d85f853b498058979a3d31d3482464 Mon Sep 17 00:00:00 2001 From: M1kola Date: Mon, 3 Jul 2023 22:07:58 +0300 Subject: [PATCH 4/5] executor filter tasks --- src/pages/ProjectTracker/ProjectTracker.js | 76 +++++++++++++--------- src/redux/projectsTrackerSlice.js | 4 +- 2 files changed, 49 insertions(+), 31 deletions(-) diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index c30cacdb..4af22ac4 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -36,6 +36,7 @@ import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import archive from "assets/icons/archiveTracker.svg"; import arrow from "assets/icons/arrows/arrowCalendar.png"; +import arrowDown from "assets/icons/arrows/selectArrow.png"; import close from "assets/icons/close.png"; import commentsBoard from "assets/icons/commentsBoard.svg"; import del from "assets/icons/delete.svg"; @@ -45,7 +46,6 @@ import project from "assets/icons/trackerProject.svg"; import tasks from "assets/icons/trackerTasks.svg"; import accept from "assets/images/accept.png"; import avatarMok from "assets/images/avatarMok.png"; -import arrowDown from "assets/icons/arrows/selectArrow.png"; export const ProjectTracker = () => { const dispatch = useDispatch(); @@ -64,7 +64,7 @@ export const ProjectTracker = () => { useState(false); const [checkBoxMyTasks, setCheckBoxMyTasks] = useState(false); const [selectedExecutor, setSelectedExecutor] = useState(null); - const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false) + const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false); const startWrapperIndexTest = useRef({}); const projectBoard = useSelector(getProjectBoard); const loader = useSelector(getBoarderLoader); @@ -248,12 +248,12 @@ export const ProjectTracker = () => { } function executorFilter(user) { - dispatch(filteredExecutorTasks(user.user_id)) - setSelectedExecutor(user) + dispatch(filteredExecutorTasks(user.user_id)); + setSelectedExecutor(user); } function deleteSelectedExecutorFilter() { - setSelectedExecutor(null) + setSelectedExecutor(null); dispatch(setProjectBoardFetch(projectId.id)); } @@ -437,17 +437,18 @@ export const ProjectTracker = () => { {checkBoxMyTasks && accept}
- {selectedExecutor ? -
+ {selectedExecutor ? ( +

{selectedExecutor.user.fio}

avatar + alt="avatar" + /> { onClick={deleteSelectedExecutorFilter} />
- : -
setSelectedExecutorOpen(!selectExecutorOpen)}> -

Выберите исполнитель

- arrow - {selectExecutorOpen && -
- {projectBoard.projectUsers.map((user) => { - return
executorFilter(user)}> -

{user.user?.fio}

- avatar -
- }) - } -
+ ) : ( +
+ setSelectedExecutorOpen(!selectExecutorOpen) } + > +

Выберите исполнитель

+ arrow + {selectExecutorOpen && ( +
+ {projectBoard.projectUsers.map((user) => { + return ( +
executorFilter(user)} + > +

{user.user?.fio}

+ avatar +
+ ); + })} +
+ )}
- } + )}

Вернуться на проекты

arrow diff --git a/src/redux/projectsTrackerSlice.js b/src/redux/projectsTrackerSlice.js index e66f755c..7a4b7023 100644 --- a/src/redux/projectsTrackerSlice.js +++ b/src/redux/projectsTrackerSlice.js @@ -124,7 +124,9 @@ export const projectsTrackerSlice = createSlice({ }, filteredExecutorTasks: (state, action) => { state.projectBoard.columns.forEach((column) => { - column.tasks = column.tasks.filter((task) => task.executor_id === action.payload); + column.tasks = column.tasks.filter( + (task) => task.executor_id === action.payload + ); }); }, setColumnName: (state, action) => { From 1515d72e4f65a68dd2028fce95ee6626d37bfc64 Mon Sep 17 00:00:00 2001 From: M1kola Date: Mon, 3 Jul 2023 22:10:04 +0300 Subject: [PATCH 5/5] executor filter tasks --- src/pages/ProjectTracker/ProjectTracker.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 4af22ac4..768a4f30 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -232,6 +232,7 @@ export const ProjectTracker = () => { dispatch(setProjectBoardFetch(projectId.id)); setCheckBoxParticipateTasks(false); setCheckBoxMyTasks(false); + setSelectedExecutor(null); } setCheckBoxParticipateTasks(!checkBoxParticipateTasks); } @@ -243,6 +244,7 @@ export const ProjectTracker = () => { dispatch(setProjectBoardFetch(projectId.id)); setCheckBoxParticipateTasks(false); setCheckBoxMyTasks(false); + setSelectedExecutor(null); } setCheckBoxMyTasks(!checkBoxMyTasks); } @@ -254,6 +256,8 @@ export const ProjectTracker = () => { function deleteSelectedExecutorFilter() { setSelectedExecutor(null); + setCheckBoxParticipateTasks(false); + setCheckBoxMyTasks(false); dispatch(setProjectBoardFetch(projectId.id)); }