diff --git a/src/components/AuthBlock/authBlock.scss b/src/components/AuthBlock/authBlock.scss index b59fe3ec..7884f9d2 100644 --- a/src/components/AuthBlock/authBlock.scss +++ b/src/components/AuthBlock/authBlock.scss @@ -101,6 +101,21 @@ line-height: 32px; color: white; height: 45px; + + @media (max-width: 900px) { + max-width: 185px; + } + + @media (max-width: 450px) { + width: 100%; + max-width: none; + margin-right: 0; + } + } + + @media (max-width: 450px) { + flex-direction: column; + row-gap: 10px; } } @@ -139,6 +154,11 @@ transform: scale(1.03); color: white; } + + @media (max-width: 450px) { + width: 100%; + max-width: none; + } } &__img { diff --git a/src/components/Modal/ModalTrackerRegistration/ModalTrackerRegistration.js b/src/components/Modal/ModalTrackerRegistration/ModalTrackerRegistration.js index 049a0871..ef6f7ed9 100644 --- a/src/components/Modal/ModalTrackerRegistration/ModalTrackerRegistration.js +++ b/src/components/Modal/ModalTrackerRegistration/ModalTrackerRegistration.js @@ -1,4 +1,5 @@ import React from "react"; +import { Link } from "react-router-dom"; import close from "assets/icons/closeProjectPersons.svg"; @@ -16,12 +17,13 @@ export const ModalTrackerRegistration = ({ setModalReset, email }) => { для активации вашего аккаунта на почту
{email}

- + setModalReset(false)} src={close} diff --git a/src/components/PartnerPersonCard/PartnerPersonCard.jsx b/src/components/PartnerPersonCard/PartnerPersonCard.jsx new file mode 100644 index 00000000..0679b42c --- /dev/null +++ b/src/components/PartnerPersonCard/PartnerPersonCard.jsx @@ -0,0 +1,29 @@ +import React from "react"; +import { Link } from "react-router-dom"; + +import { urlForLocal } from "@utils/helper"; + +import rightArrow from "assets/icons/arrows/arrowRight.svg"; + +import "./partnerPersonCard.scss"; + +export const PartnerPersonCard = ({ name, img, userId }) => { + return ( +
+
+ avatar +
+
+

{name}

+ + Подробный отчет +
+ arrow +
+ +
+
+ ); +}; + +export default PartnerPersonCard; diff --git a/src/components/PartnerPersonCard/partnerPersonCard.scss b/src/components/PartnerPersonCard/partnerPersonCard.scss new file mode 100644 index 00000000..5ca095f4 --- /dev/null +++ b/src/components/PartnerPersonCard/partnerPersonCard.scss @@ -0,0 +1,45 @@ +.partnerPersonCard { + display: flex; + position: relative; + + &__img { + background: white; + border-radius: 12px; + padding: 25px; + z-index: 2; + img { + width: 77px; + height: 77px; + } + } + + &__info { + position: relative; + background: #E1FCCF; + z-index: 1; + padding: 15px 15px 15px 30px; + left: -15px; + border-radius: 12px; + display: flex; + flex-direction: column; + justify-content: space-between; + } + + &__report { + display: flex; + column-gap: 10px; + color: black; + font-size: 16px; + align-items: center; + } + + &__more { + width: 41px; + height: 41px; + background: white; + border-radius: 50px; + display: flex; + justify-content: center; + align-items: center; + } +} diff --git a/src/components/ProfileCalendar/ProfileCalendar.jsx b/src/components/ProfileCalendar/ProfileCalendar.jsx index 309467b7..ace451fe 100644 --- a/src/components/ProfileCalendar/ProfileCalendar.jsx +++ b/src/components/ProfileCalendar/ProfileCalendar.jsx @@ -51,9 +51,7 @@ 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..37335a3b 100644 --- a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx +++ b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx @@ -114,9 +114,7 @@ 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; reports.map((report) => { @@ -273,15 +271,15 @@ export const ProfileCalendarComponent = React.memo( ? `${getCorrectDate(startDate)} - ${getCorrectDate(endDate)}` : `${getCorrectDate(endDate)} - ${getCorrectDate(startDate)}` : activePeriod - ? "Выберите диапазон на календаре" - : "Выбрать диапазон"} + ? "Выберите диапазон на календаре" + : "Выбрать диапазон"} {totalRangeHours ? `${totalRangeHours} ${hourOfNum(totalRangeHours)}` : endDate - ? "0 часов" - : ""} + ? "0 часов" + : ""} {endDate && ( { 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..8e76afb4 100644 --- a/src/components/ShortReport/ShortReport.jsx +++ b/src/components/ShortReport/ShortReport.jsx @@ -39,9 +39,7 @@ export const ShortReport = () => { setTomorrowTask([]); setTotalHours(0); apiRequest( - `reports/find-by-date?user_card_id=${localStorage.getItem( - "cardId" - )}&date=${day}` + `reports/find-by-date?user_id=${localStorage.getItem("id")}&date=${day}` ).then((res) => { let spendTime = 0; for (const item of res) { 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..e5982164 100644 --- a/src/pages/PartnerСategories/PartnerСategories.jsx +++ b/src/pages/PartnerСategories/PartnerСategories.jsx @@ -1,137 +1,146 @@ -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 { apiRequest } from "@api/request"; +// import { setPartnerEmployees } from "@redux/outstaffingSlice"; import { Footer } from "@components/Common/Footer/Footer"; +import { Navigation } from "@components/Navigation/Navigation"; +import PartnerPersonCard from "@components/PartnerPersonCard/PartnerPersonCard"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; -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 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 "./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 +154,49 @@ export const PartnerCategories = () => { />

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

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

{item.title}

-
-
-

{item.description}

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

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

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

{item.title}

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

{item.description}

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

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

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