From 88162816c5e3a03fa488fb4794ec5c4a193e4694 Mon Sep 17 00:00:00 2001 From: M1kola Date: Thu, 27 Apr 2023 14:51:01 +0300 Subject: [PATCH 01/39] tracker --- src/components/UI/ModalCreate/ModalCreate.js | 18 +++++++++++++++--- src/pages/Tracker/Tracker.js | 17 +++++++++++++---- src/pages/Tracker/tracker.scss | 4 +++- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/components/UI/ModalCreate/ModalCreate.js b/src/components/UI/ModalCreate/ModalCreate.js index de7d8813..47ac2d03 100644 --- a/src/components/UI/ModalCreate/ModalCreate.js +++ b/src/components/UI/ModalCreate/ModalCreate.js @@ -1,6 +1,7 @@ import React, { useState } from "react"; import { useDispatch } from "react-redux"; import { setProject } from "../../../redux/projectsTrackerSlice"; +import {apiRequest} from "../../../api/request"; import "./ModalCreate.scss"; @@ -16,9 +17,20 @@ export const ModalCreate = ({ active, setActive, title }) => { name: inputValue, count: 0, }; - dispatch(setProject(newItem)); - setActive(false); - setInputValue(""); + apiRequest('/project/create', { + method: 'POST', + data: { + user_id: localStorage.getItem('id'), + name: inputValue, + status: 1, + // description: '', + // company_id: 3 + } + }).then((res) => { + dispatch(setProject(newItem)); + setActive(false); + setInputValue(""); + }) } } diff --git a/src/pages/Tracker/Tracker.js b/src/pages/Tracker/Tracker.js index 4535d567..fac2d70d 100644 --- a/src/pages/Tracker/Tracker.js +++ b/src/pages/Tracker/Tracker.js @@ -23,9 +23,12 @@ import search from "../../images/serchIcon.png"; import noProjects from "../../images/noProjects.png"; import arrow from "../../images/arrowCalendar.png"; -import "./tracker.scss"; +import {apiRequest} from "../../api/request"; import { Navigation } from "../../components/Navigation/Navigation"; + +import "./tracker.scss"; + export const Tracker = () => { const [toggleTab, setToggleTab] = useState(1); const [tabTaskMok, setTabTaskMok] = useState([ @@ -385,6 +388,12 @@ export const Tracker = () => { false, ]); + useEffect(() => { + apiRequest(`/project/project-list?user_id=${localStorage.getItem('id')}&expand=columns`).then((el) => { + + }) + }, []) + const projects = useSelector(getProjects); const toggleTabs = (index) => { @@ -689,7 +698,7 @@ export const Tracker = () => {
setModalCreateColl(true)}>+ -

добавить задачу в проект

+

добавить колонку

avatar @@ -698,10 +707,10 @@ export const Tracker = () => { + -

добавить участника в проект

+

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

- Учавствую + Участвую arrow
diff --git a/src/pages/Tracker/tracker.scss b/src/pages/Tracker/tracker.scss index bc765bdc..9aefe3cb 100644 --- a/src/pages/Tracker/tracker.scss +++ b/src/pages/Tracker/tracker.scss @@ -250,6 +250,8 @@ font-size: 14px; line-height: 17px; max-width: 120px; + display: flex; + align-items: center; } } @@ -294,7 +296,7 @@ background: #00c5a8; color: white; font-size: 14px; - left: -35px; + left: -30px; z-index: 1; } From 36bba6c5a195b5165c1cac37899ef624a7cf37fd Mon Sep 17 00:00:00 2001 From: MaxOvs19 Date: Thu, 27 Apr 2023 15:13:14 +0300 Subject: [PATCH 02/39] Create new page Blog --- src/App.js | 5 ++- .../SideBar/{SideBar.js => SideBar.jsx} | 7 +-- .../{FreeDevelopers.js => FreeDevelopers.jsx} | 0 .../UI/ModalAdd/{ModalAdd.js => ModalAdd.jsx} | 0 .../ModalAspt/{ModalAspt.js => ModalAspt.jsx} | 0 .../{ModalCreate.js => ModalCreate.jsx} | 0 ...ModalErrorLogin.js => ModalErrorLogin.jsx} | 0 ...lRegistration.js => ModalRegistration.jsx} | 0 .../{ModalSettings.js => ModalSettings.jsx} | 0 .../{ModalTicket.js => ModalTicket.jsx} | 2 +- ...cketFullScreen.js => TicketFullScreen.jsx} | 0 src/pages/Blog/Blog.jsx | 45 +++++++++++++++++++ src/pages/Blog/blog.scss | 40 +++++++++++++++++ 13 files changed, 94 insertions(+), 5 deletions(-) rename src/components/SideBar/{SideBar.js => SideBar.jsx} (89%) rename src/components/UI/FreeDevelopers/{FreeDevelopers.js => FreeDevelopers.jsx} (100%) rename src/components/UI/ModalAdd/{ModalAdd.js => ModalAdd.jsx} (100%) rename src/components/UI/ModalAspt/{ModalAspt.js => ModalAspt.jsx} (100%) rename src/components/UI/ModalCreate/{ModalCreate.js => ModalCreate.jsx} (100%) rename src/components/UI/ModalErrorLogin/{ModalErrorLogin.js => ModalErrorLogin.jsx} (100%) rename src/components/UI/ModalRegistration/{ModalRegistration.js => ModalRegistration.jsx} (100%) rename src/components/UI/ModalSettings/{ModalSettings.js => ModalSettings.jsx} (100%) rename src/components/UI/ModalTicket/{ModalTicket.js => ModalTicket.jsx} (98%) rename src/components/UI/TicketFullScreen/{TicketFullScreen.js => TicketFullScreen.jsx} (100%) create mode 100644 src/pages/Blog/Blog.jsx create mode 100644 src/pages/Blog/blog.scss diff --git a/src/App.js b/src/App.js index e459d6c9..adf38d3b 100644 --- a/src/App.js +++ b/src/App.js @@ -39,6 +39,7 @@ import { PassingTests } from "./pages/quiz/PassingTests"; import "./assets/global.scss"; import "./fonts/stylesheet.css"; import "bootstrap/dist/css/bootstrap.min.css"; +import Blog from "./pages/Blog/Blog"; const App = () => { return ( @@ -50,7 +51,7 @@ const App = () => { } /> } > } /> @@ -60,6 +61,8 @@ const App = () => { element={} /> + }> + } /> } /> } /> diff --git a/src/components/SideBar/SideBar.js b/src/components/SideBar/SideBar.jsx similarity index 89% rename from src/components/SideBar/SideBar.js rename to src/components/SideBar/SideBar.jsx index 537afbab..89201a26 100644 --- a/src/components/SideBar/SideBar.js +++ b/src/components/SideBar/SideBar.jsx @@ -4,6 +4,7 @@ import arrow from "../../images/sideBarArrow.svg"; import LogoITguild from "../../images/LogoITguild.svg"; import "./sidebar.scss"; +import { Link } from "react-router-dom"; export const SideBar = () => { const [active, setActive] = useState(false); @@ -46,10 +47,10 @@ export const SideBar = () => {