diff --git a/src/assets/icons/report.svg b/src/assets/icons/report.svg new file mode 100644 index 00000000..0ef93371 --- /dev/null +++ b/src/assets/icons/report.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/images/emptyPage.svg b/src/assets/images/emptyPage.svg new file mode 100644 index 00000000..9c36a93a --- /dev/null +++ b/src/assets/images/emptyPage.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/components/EmptyBlock/EmptyBlock.jsx b/src/components/EmptyBlock/EmptyBlock.jsx new file mode 100644 index 00000000..87a98530 --- /dev/null +++ b/src/components/EmptyBlock/EmptyBlock.jsx @@ -0,0 +1,24 @@ +import React from "react"; +import { Link } from "react-router-dom"; + +import empty from "assets/images/emptyPage.svg"; + +import "./emptyBlock.scss"; + +export const EmptyBlock = () => { + + return ( + <> +
+

+ Данная страница находится в разработке +

+ + На главную + +
+ img + + ); +}; + diff --git a/src/components/EmptyBlock/emptyBlock.scss b/src/components/EmptyBlock/emptyBlock.scss new file mode 100644 index 00000000..3b99b60f --- /dev/null +++ b/src/components/EmptyBlock/emptyBlock.scss @@ -0,0 +1,53 @@ +.empty-block { + position: relative; + border-radius: 8px; + border: 0.5px solid; + border-image-source: linear-gradient(137.79deg, #FFFFFF 9.15%, #F4F4F4 76.22%); + background: linear-gradient(110.06deg, rgba(255, 255, 255, 0.34) 0%, rgba(239, 239, 239, 0.34) 99.25%); + display: flex; + box-shadow: 10px 9px 14.3px 0px #00000008; + align-items: center; + justify-content: center; + margin-top: 22px; + padding: 95px 0 40px; + flex-direction: column; + z-index: 2; + backdrop-filter: blur(5px); + + &__img { + position: absolute; + z-index: 1; + top: 30px; + transform: translate(-50%); + left: 50%; + } + + &__title { + color: #000000; + font-weight: 700; + font-size: 22px; + line-height: 32px; + margin-bottom: 0; + } + + &__back { + max-width: 150px; + width: 100%; + background: #52B709; + border-radius: 44px; + color: #FFFFFF; + font-size: 14px; + font-weight: 700; + margin-top: 16px; + display: flex; + align-items: center; + justify-content: center; + height: 40px; + transition: all 0.3s ease; + + &:hover { + color: white; + scale: 1.1; + } + } +} \ No newline at end of file diff --git a/src/pages/PartnerСategories/PartnerСategories.jsx b/src/pages/PartnerСategories/PartnerСategories.jsx index a274d008..27f97b54 100644 --- a/src/pages/PartnerСategories/PartnerСategories.jsx +++ b/src/pages/PartnerСategories/PartnerСategories.jsx @@ -6,6 +6,7 @@ import { useTheme } from "@table-library/react-table-library/theme"; import React, { useEffect, useState } from "react"; import { Link, Navigate } from "react-router-dom"; +import { LEVELS, SKILLS } from "@utils/constants"; import { urlForLocal } from "@utils/helper"; import { apiRequest } from "@api/request"; @@ -17,6 +18,7 @@ import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadc import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import rightArrow from "assets/icons/arrows/arrowRight.svg"; +import report from "assets/icons/report.svg"; // import PartnerPersonCard from "@components/PartnerPersonCard/PartnerPersonCard"; // import { useDispatch } from "react-redux"; @@ -47,6 +49,17 @@ export const PartnerCategories = () => { const [search, setSearch] = useState(""); + const tabs = [ + { + name: "Фронтенд", + value: 2 + }, + { + name: "Бэкенд", + value: 1 + } + ]; + const COLUMNS = [ { label: "", @@ -59,19 +72,28 @@ export const PartnerCategories = () => { ) }, { - label: "ФИО", - renderCell: (item) =>

{item?.employee.fio}

, - sort: { sortKey: "NAME" } + label: "Данные", + renderCell: (item) => ( +
+

{item?.employee.fio}

+ + {LEVELS[item?.resume.userCard.level]} /{" "} + {SKILLS[item?.resume.userCard.position_id]} + +
+ ) + // sort: { sortKey: "NAME" } }, { - label: "Резюме", + label: "Участвует в проекте", renderCell: (item) => ( - - Резюме -
- arrow -
- +
+ {item.resume.userCard.at_project ? ( +
item.resume.userCard.at_project
+ ) : ( + Нет проектов + )} +
) }, { @@ -81,12 +103,17 @@ export const PartnerCategories = () => { className="table__link" to={`/profile/employees/report/${item.user_id}`} > + report Подробный отчет
arrow
) + }, + { + label: Действие, + renderCell: () =>
} ]; @@ -115,9 +142,23 @@ export const PartnerCategories = () => { useEffect(() => { setLoader(true); apiRequest("/project/my-employee").then((el) => { - setLoader(false); - setNodes(el?.managerEmployees); - setInitialNodes(el.managerEmployees); + const fetchResumes = async () => { + const promises = el.managerEmployees.map(async (manager) => { + const resume = await apiRequest(`/resume?userId=${manager.user_id}`); + return { ...manager, resume }; // Возвращаем объект с добавленным ключом resume + }); + + try { + const updatedManagers = await Promise.all(promises); + setInitialNodes(updatedManagers); + setNodes(updatedManagers); + setLoader(false); + } catch (error) { + console.error("Ошибка при получении резюме:", error); + } + }; + + fetchResumes(); }); }, []); @@ -266,6 +307,16 @@ export const PartnerCategories = () => { onChange={handleSearch} /> +
+
Все
+ {tabs.map((tab) => { + return ( +
+ {tab.name} +
+ ); + })} +
{
-
+
+ +

Выплаты и финансы

+ +
); diff --git a/src/pages/Payouts/payouts.scss b/src/pages/Payouts/payouts.scss index fad635f8..a31ad531 100644 --- a/src/pages/Payouts/payouts.scss +++ b/src/pages/Payouts/payouts.scss @@ -9,5 +9,13 @@ display: flex; flex-direction: column; flex: 1; + margin-top: 23px; + } + + &__title { + font-weight: 700; + font-size: 22px; + line-height: 32px; + color: #000000; } }