+
Мои
-
+
+ {checkBoxMyTasks &&
+
+ }
+
Вернуться на проекты
@@ -351,6 +405,7 @@ export const ProjectTracker = () => {
dispatch(modalToggle("editColumn"));
dispatch(setColumnName(column.title))
dispatch(setColumnId(column.id))
+ dispatch(setColumnPriority(column.priority))
setModalAdd(true);
}}
>
@@ -359,7 +414,7 @@ export const ProjectTracker = () => {
deleteColumn(column.id)}
+ onClick={() => deleteColumn(column)}
>
Удалить
diff --git a/src/pages/Tracker/tracker.scss b/src/pages/Tracker/tracker.scss
index 01cf8057..da759819 100644
--- a/src/pages/Tracker/tracker.scss
+++ b/src/pages/Tracker/tracker.scss
@@ -423,18 +423,33 @@
}
}
- &__select {
+ &__checkBox {
cursor: pointer;
+ display: flex;
+ align-items: center;
- img {
- margin-left: 18px;
- }
span {
color: #252c32;
font-weight: 400;
font-size: 14px;
line-height: 24px;
}
+
+ &__box {
+ width: 20px;
+ height: 20px;
+ border-radius: 6px;
+ border: solid 1px gray;
+ margin-left: 5px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ img {
+ width: 18px;
+ height: 18px;
+ }
+ }
}
&__back {
diff --git a/src/redux/projectsTrackerSlice.js b/src/redux/projectsTrackerSlice.js
index b4fe55fd..0de4cad3 100644
--- a/src/redux/projectsTrackerSlice.js
+++ b/src/redux/projectsTrackerSlice.js
@@ -8,7 +8,8 @@ const initialState = {
modalType: "",
boardLoader: false,
columnName: "",
- columnId: 0
+ columnId: 0,
+ columnPriority: 0
};
export const setProjectBoardFetch = createAsyncThunk("userInfo", (id) =>
@@ -63,12 +64,25 @@ export const projectsTrackerSlice = createSlice({
}
});
},
+ filterCreatedByMe: (state, action) => {
+ state.projectBoard.columns.forEach((column) => {
+ column.tasks = column.tasks.filter((task) => task.user_id === action.payload)
+ })
+ },
+ filteredParticipateTasks: (state, action) => {
+ state.projectBoard.columns.forEach((column) => {
+ column.tasks = column.tasks.filter((task) => task.taskUsers.some((person) => person.user_id === action.payload))
+ })
+ },
setColumnName: (state, action) => {
state.columnName = action.payload
},
setColumnId: (state, action) => {
state.columnId = action.payload
},
+ setColumnPriority: (state, action) => {
+ state.columnPriority = action.payload
+ },
editProjectName: (state, action) => {
state.projects.forEach((project) => {
if (project.id === action.payload.id) {
@@ -107,8 +121,11 @@ export const {
editProjectName,
editColumnName,
setColumnId,
+ setColumnPriority,
deletePersonOnProject,
- addPersonToProject
+ addPersonToProject,
+ filterCreatedByMe,
+ filteredParticipateTasks
} = projectsTrackerSlice.actions;
export const getProjects = (state) => state.tracker.projects;
@@ -118,5 +135,6 @@ export const getValueModalType = (state) => state.tracker.modalType;
export const getBoarderLoader = (state) => state.tracker.boardLoader;
export const getColumnName = (state) => state.tracker.columnName;
export const getColumnId = (state) => state.tracker.columnId;
+export const getColumnPriority = (state) => state.tracker.columnPriority
export default projectsTrackerSlice.reducer;