From d8a7eb55f5bcf41840c9739885eabb90ccffc602 Mon Sep 17 00:00:00 2001 From: M1kola Date: Fri, 5 May 2023 00:50:48 +0300 Subject: [PATCH] tracker-connect --- src/components/Loader/Loader.js | 4 +- src/components/ProjectTiket/ProjectTiket.jsx | 2 +- src/components/UI/ModalAdd/ModalAdd.jsx | 5 +- src/components/UI/ModalCreate/ModalCreate.jsx | 5 +- src/pages/ProjectTracker/ProjectTracker.js | 212 ++++++++++-------- src/pages/Tracker/Tracker.js | 63 ++++-- src/pages/Tracker/tracker.scss | 8 +- src/redux/projectsTrackerSlice.js | 7 + 8 files changed, 177 insertions(+), 129 deletions(-) diff --git a/src/components/Loader/Loader.js b/src/components/Loader/Loader.js index c0e56f31..b95eb504 100644 --- a/src/components/Loader/Loader.js +++ b/src/components/Loader/Loader.js @@ -3,10 +3,10 @@ import './loader.scss' import React from "react"; -export const Loader = ({width = 50, height = 50}) => { +export const Loader = ({width = 50, height = 50, style}) => { return (
- +
) }; diff --git a/src/components/ProjectTiket/ProjectTiket.jsx b/src/components/ProjectTiket/ProjectTiket.jsx index 9c237928..07a963f7 100644 --- a/src/components/ProjectTiket/ProjectTiket.jsx +++ b/src/components/ProjectTiket/ProjectTiket.jsx @@ -43,7 +43,7 @@ export const ProjectTiket = ({ project, index }) => { method: "PUT", data: { project_id: project.id, - status: 0, + status: 10, }, }).then((res) => { dispatch(deleteProject(project)); diff --git a/src/components/UI/ModalAdd/ModalAdd.jsx b/src/components/UI/ModalAdd/ModalAdd.jsx index 9f1e192f..3f0fce74 100644 --- a/src/components/UI/ModalAdd/ModalAdd.jsx +++ b/src/components/UI/ModalAdd/ModalAdd.jsx @@ -62,6 +62,9 @@ export const ModalAdd = ({ active, setActive, selectedTab, defautlInput }) => { setDescriptionTicket(""); } + function editProject() { + } + function getModal() { switch (modalType) { case "createColumn": @@ -156,7 +159,7 @@ export const ModalAdd = ({ active, setActive, selectedTab, defautlInput }) => { > - setActive(false)}> diff --git a/src/components/UI/ModalCreate/ModalCreate.jsx b/src/components/UI/ModalCreate/ModalCreate.jsx index 8813a132..b2a3fa27 100644 --- a/src/components/UI/ModalCreate/ModalCreate.jsx +++ b/src/components/UI/ModalCreate/ModalCreate.jsx @@ -21,7 +21,8 @@ export const ModalCreate = ({ active, setActive, title }) => { status: 1, } }).then((res) => { - dispatch(setProject(res)); + const result = {...res, columns: []} + dispatch(setProject(result)); setActive(false); setInputValue(""); }) @@ -44,7 +45,7 @@ export const ModalCreate = ({ active, setActive, title }) => { className="name-project" value={inputValue} onChange={(e) => setInputValue(e.target.value)} - > + />