diff --git a/src/components/ProfileCalendar/ProfileCalendar.jsx b/src/components/ProfileCalendar/ProfileCalendar.jsx index 309467b7..8f64425e 100644 --- a/src/components/ProfileCalendar/ProfileCalendar.jsx +++ b/src/components/ProfileCalendar/ProfileCalendar.jsx @@ -51,8 +51,8 @@ export const ProfileCalendar = () => { return; } apiRequest( - `/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem( - "cardId" + `/reports/index?${requestDates}&user_id =${localStorage.getItem( + "id" )}` ).then((reports) => { let spendTime = 0; diff --git a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx index 204d2c8b..995f621a 100644 --- a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx +++ b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx @@ -114,8 +114,8 @@ export const ProfileCalendarComponent = React.memo( startDate._d )}`; apiRequest( - `/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem( - "cardId" + `/reports/index?${requestDates}&user_id =${localStorage.getItem( + "id" )}` ).then((reports) => { let spendTime = 0; diff --git a/src/components/ReportForm/ReportForm.jsx b/src/components/ReportForm/ReportForm.jsx index 4aaeff09..6b243c13 100644 --- a/src/components/ReportForm/ReportForm.jsx +++ b/src/components/ReportForm/ReportForm.jsx @@ -97,6 +97,7 @@ const ReportForm = () => { apiRequest("/reports/create", { method: "POST", data: { + user_id: localStorage.getItem("id"), tasks: inputs, difficulties: troublesInputValue, tomorrow: scheduledInputValue, diff --git a/src/components/ShortReport/ShortReport.jsx b/src/components/ShortReport/ShortReport.jsx index 15ee23f4..5a8ad37e 100644 --- a/src/components/ShortReport/ShortReport.jsx +++ b/src/components/ShortReport/ShortReport.jsx @@ -39,8 +39,8 @@ export const ShortReport = () => { setTomorrowTask([]); setTotalHours(0); apiRequest( - `reports/find-by-date?user_card_id=${localStorage.getItem( - "cardId" + `reports/find-by-date?user_id=${localStorage.getItem( + "id" )}&date=${day}` ).then((res) => { let spendTime = 0; diff --git a/src/components/features/quiz/quiz.scss b/src/components/features/quiz/quiz.scss index a2cf701a..fca81dea 100644 --- a/src/components/features/quiz/quiz.scss +++ b/src/components/features/quiz/quiz.scss @@ -504,13 +504,13 @@ $maxWidthContainer: 1123; } } &__finished { - background: rgba(255, 255, 255, 0.76); + background: white; mix-blend-mode: normal; border: 3px solid #52b709; border-radius: 12px; padding: 13px 16px; position: absolute; - bottom: 0; + bottom: 4px; left: 0; display: flex; align-items: center; diff --git a/src/pages/PartnerСategories/PartnerСategories.jsx b/src/pages/PartnerСategories/PartnerСategories.jsx index c31870b1..754f6d23 100644 --- a/src/pages/PartnerСategories/PartnerСategories.jsx +++ b/src/pages/PartnerСategories/PartnerСategories.jsx @@ -1,137 +1,147 @@ -import React, { useState } from "react"; -import { useDispatch } from "react-redux"; -import { Link } from "react-router-dom"; +import React, { useEffect, useState } from "react"; +// import { useDispatch } from "react-redux"; +// import { Link } from "react-router-dom"; import { Navigate } from "react-router-dom"; - -import { setPartnerEmployees } from "@redux/outstaffingSlice"; +// import { setPartnerEmployees } from "@redux/outstaffingSlice"; import { Footer } from "@components/Common/Footer/Footer"; +import PartnerPersonCard from "@components/PartnerPersonCard/PartnerPersonCard"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import { Navigation } from "@components/Navigation/Navigation"; -import rightArrow from "assets/icons/arrows/arrowRight.svg"; -import avatarImg from "assets/images/avatarMok.png"; -import AdminImg from "assets/images/partnerProfile/PersonalAdmin.svg"; -import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg"; -import CopyImg from "assets/images/partnerProfile/PersonalCopy.svg"; -import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg"; -import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg"; -import ManageImg from "assets/images/partnerProfile/PersonalMng.svg"; -import SmmImg from "assets/images/partnerProfile/PersonalSMM.svg"; -import TestImg from "assets/images/partnerProfile/PersonalTesters.svg"; -import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg"; +import { apiRequest } from "@api/request"; + +// import rightArrow from "assets/icons/arrows/arrowRight.svg"; +// import avatarImg from "assets/images/avatarMok.png"; +// import AdminImg from "assets/images/partnerProfile/PersonalAdmin.svg"; +// import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg"; +// import CopyImg from "assets/images/partnerProfile/PersonalCopy.svg"; +// import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg"; +// import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg"; +// import ManageImg from "assets/images/partnerProfile/PersonalMng.svg"; +// import SmmImg from "assets/images/partnerProfile/PersonalSMM.svg"; +// import TestImg from "assets/images/partnerProfile/PersonalTesters.svg"; +// import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg"; -import { Navigation } from "../../components/Navigation/Navigation"; import "./partnerСategories.scss"; export const PartnerCategories = () => { - const dispatch = useDispatch(); + // const dispatch = useDispatch(); if (localStorage.getItem("role_status") !== "18") { return ; } - const [personalInfoItems] = useState([ - { - title: "Backend разработчики", - link: "/profile/categories/employees", - description: - "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", - available: true, - img: BackEndImg - }, - { - title: "Frontend разработчики", - link: "/profile/categories/employees", - description: - "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", - available: true, - img: FrontendImg - }, - { - title: "Архитектура проектов", - link: "/profile/categories/employees", - description: "Потоки данных ER ERP CRM CQRS UML BPMN", - available: true, - img: ArchitectureImg - }, - { - title: "Дизайн проектов", - link: "/profile/categories/employees", - description: - "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", - available: true, - img: DesignImg - }, - { - title: "Тестирование проектов", - link: "/profile/add-request", - description: "SQL Postman TestRail Kibana Ручное тестирование", - available: false, - img: TestImg - }, - { - title: "Администрирование проектов", - link: "/profile/add-request", - description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git", - available: false, - img: AdminImg - }, - { - title: "Управление проектом", - link: "/profile/add-request", - description: "Scrum Kanban Agile Miro CustDev", - available: false, - img: ManageImg - }, - { - title: "Копирайтинг проектов", - link: "/profile/add-request", - description: "Теги Заголовок H1 Дескриптор Абзац Сценарий", - available: false, - img: CopyImg - }, - { - title: "Реклама и SMM", - link: "/profile/add-request", - description: - "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", - available: false, - img: SmmImg - } - ]); + const [staff, setStaff] = useState([]) - const [mokPersons] = useState([ - { - personAvatar: avatarImg, - name: "Макаренко Дмитрий", - qualification: "PHP Backend - разработчик", - level: "Middle", - project: "Админка НВД Консалтинг", - tasks_in_progress: 5, - month_hours: 140, - id: 1 - }, - { - personAvatar: avatarImg, - name: "Макаренко Дмитрий", - qualification: "PHP Backend - разработчик", - level: "Middle", - project: "Админка НВД Консалтинг", - tasks_in_progress: 5, - month_hours: 140, - id: 2 - }, - { - personAvatar: avatarImg, - name: "Макаренко Дмитрий", - qualification: "PHP Backend - разработчик", - level: "Middle", - project: "Админка НВД Консалтинг", - tasks_in_progress: 5, - month_hours: 140, - id: 3 - } - ]); + useEffect(() => { + apiRequest("/project/my-employee").then((el) => { + setStaff(el.managerEmployees) + }) + }, []) + + // const [personalInfoItems] = useState([ + // { + // title: "Backend разработчики", + // link: "/profile/categories/employees", + // description: + // "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", + // available: true, + // img: BackEndImg + // }, + // { + // title: "Frontend разработчики", + // link: "/profile/categories/employees", + // description: + // "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", + // available: true, + // img: FrontendImg + // }, + // { + // title: "Архитектура проектов", + // link: "/profile/categories/employees", + // description: "Потоки данных ER ERP CRM CQRS UML BPMN", + // available: true, + // img: ArchitectureImg + // }, + // { + // title: "Дизайн проектов", + // link: "/profile/categories/employees", + // description: + // "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", + // available: true, + // img: DesignImg + // }, + // { + // title: "Тестирование проектов", + // link: "/profile/add-request", + // description: "SQL Postman TestRail Kibana Ручное тестирование", + // available: false, + // img: TestImg + // }, + // { + // title: "Администрирование проектов", + // link: "/profile/add-request", + // description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git", + // available: false, + // img: AdminImg + // }, + // { + // title: "Управление проектом", + // link: "/profile/add-request", + // description: "Scrum Kanban Agile Miro CustDev", + // available: false, + // img: ManageImg + // }, + // { + // title: "Копирайтинг проектов", + // link: "/profile/add-request", + // description: "Теги Заголовок H1 Дескриптор Абзац Сценарий", + // available: false, + // img: CopyImg + // }, + // { + // title: "Реклама и SMM", + // link: "/profile/add-request", + // description: + // "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", + // available: false, + // img: SmmImg + // } + // ]); + + // const [mokPersons] = useState([ + // { + // personAvatar: avatarImg, + // name: "Макаренко Дмитрий", + // qualification: "PHP Backend - разработчик", + // level: "Middle", + // project: "Админка НВД Консалтинг", + // tasks_in_progress: 5, + // month_hours: 140, + // id: 1 + // }, + // { + // personAvatar: avatarImg, + // name: "Макаренко Дмитрий", + // qualification: "PHP Backend - разработчик", + // level: "Middle", + // project: "Админка НВД Консалтинг", + // tasks_in_progress: 5, + // month_hours: 140, + // id: 2 + // }, + // { + // personAvatar: avatarImg, + // name: "Макаренко Дмитрий", + // qualification: "PHP Backend - разработчик", + // level: "Middle", + // project: "Админка НВД Консалтинг", + // tasks_in_progress: 5, + // month_hours: 140, + // id: 3 + // } + // ]); return (
@@ -145,39 +155,42 @@ export const PartnerCategories = () => { />

Данные персонала

- {personalInfoItems.map((item, index) => { - return ( - { - dispatch(setPartnerEmployees(mokPersons)); - }} - > -
- {item.title} -

{item.title}

-
-
-

{item.description}

-
- arrow -
-
- {!item.available && ( -
-

У вас нет персонала из категории

- -
- )} - - ); + {staff.map((card) => { + return })} + {/*{personalInfoItems.map((item, index) => {*/} + {/* return (*/} + {/* {*/} + {/* dispatch(setPartnerEmployees(mokPersons));*/} + {/* }}*/} + {/* >*/} + {/*
*/} + {/* {item.title}*/} + {/*

{item.title}

*/} + {/*
*/} + {/*
*/} + {/*

{item.description}

*/} + {/*
*/} + {/* arrow*/} + {/*
*/} + {/*
*/} + {/* {!item.available && (*/} + {/*
*/} + {/*

У вас нет персонала из категории

*/} + {/* */} + {/*
*/} + {/* )}*/} + {/* */} + {/* );*/} + {/*})}*/}