diff --git a/src/assets/icons/folder.svg b/src/assets/icons/folder.svg
new file mode 100644
index 00000000..e4e3c444
--- /dev/null
+++ b/src/assets/icons/folder.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/pages/PartnerСategories/PartnerСategories.jsx b/src/pages/PartnerСategories/PartnerСategories.jsx
index 5d8d5725..e8d08dd9 100644
--- a/src/pages/PartnerСategories/PartnerСategories.jsx
+++ b/src/pages/PartnerСategories/PartnerСategories.jsx
@@ -6,7 +6,6 @@ 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";
@@ -18,26 +17,12 @@ import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadc
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
import rightArrow from "assets/icons/arrows/arrowRight.svg";
+import folder from "assets/icons/folder.svg";
import report from "assets/icons/report.svg";
-// import PartnerPersonCard from "@components/PartnerPersonCard/PartnerPersonCard";
-// import { useDispatch } from "react-redux";
-// import { setPartnerEmployees } from "@redux/outstaffingSlice";
-// 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();
if (localStorage.getItem("role_status") !== "18") {
return ;
}
@@ -46,7 +31,7 @@ export const PartnerCategories = () => {
const theme = useTheme(getTheme());
const [nodes, setNodes] = useState([]);
const [initialNodes, setInitialNodes] = useState([]);
- const [activeTab, setActiveTab] = useState("Все");
+ const [activeTab, setActiveTab] = useState(0);
const [search, setSearch] = useState("");
@@ -80,19 +65,24 @@ export const PartnerCategories = () => {
- {item.resume.userCard.at_project ? (
-
item.resume.userCard.at_project
+ {item?.employee.projects.length ? (
+ item.employee.projects.map((project) => {
+ return (
+
+
{" "}
+
{project.project.name}
+
+ );
+ })
) : (
Нет проектов
)}
@@ -145,23 +135,9 @@ export const PartnerCategories = () => {
useEffect(() => {
setLoader(true);
apiRequest("/project/my-employee").then((el) => {
- 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();
+ setNodes(el.managerEmployees);
+ setInitialNodes(el.managerEmployees);
+ setLoader(false);
});
}, []);
@@ -180,108 +156,6 @@ export const PartnerCategories = () => {
console.log(action, state);
}
- // 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 (
@@ -313,11 +187,11 @@ export const PartnerCategories = () => {
{
- setActiveTab("Все");
+ setActiveTab(0);
setNodes(initialNodes);
}}
className={
- activeTab === "Все"
+ activeTab === 0
? "table__tab table__tab--active"
: "table__tab"
}
@@ -331,8 +205,7 @@ export const PartnerCategories = () => {
setActiveTab(tab.name);
setNodes(
initialNodes.filter(
- (item) =>
- item.resume.userCard.position_id === tab.value
+ (item) => item.employee.position.id === tab.value
)
);
}}
@@ -355,54 +228,61 @@ export const PartnerCategories = () => {
sort={sort}
pagination={pagination}
/>
-
-
-
- {pagination.state.getPages(data.nodes).map((_, index) => (
+ {Boolean(nodes.length) &&
+ pagination.state.getPages(data.nodes).length > 1 && (
+
- ))}
-
-
-
+
+ {pagination.state
+ .getPages(data.nodes)
+ .map((_, index) => (
+
+ ))}
+
+
+
+ )}
>
) : (
@@ -413,39 +293,6 @@ export const PartnerCategories = () => {
)}
- {/*{personalInfoItems.map((item, index) => {*/}
- {/* return (*/}
- {/*
{*/}
- {/* dispatch(setPartnerEmployees(mokPersons));*/}
- {/* }}*/}
- {/* >*/}
- {/*
*/}
- {/*
*/}
- {/*
{item.title}
*/}
- {/*
*/}
- {/*
*/}
- {/*
{item.description}
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* {!item.available && (*/}
- {/*
*/}
- {/*
У вас нет персонала из категории
*/}
- {/*
*/}
- {/*
*/}
- {/* )}*/}
- {/* */}
- {/* );*/}
- {/*})}*/}
)}
diff --git a/src/pages/PartnerСategories/partnerСategories.scss b/src/pages/PartnerСategories/partnerСategories.scss
index dac9c5bf..fe1e81aa 100644
--- a/src/pages/PartnerСategories/partnerСategories.scss
+++ b/src/pages/PartnerСategories/partnerСategories.scss
@@ -255,6 +255,26 @@
font-size: 14px;
font-weight: 500;
line-height: 17.5px;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 11px;
+
+ &__item {
+ border-radius: 5px;
+ padding: 8px;
+ color: rgba(46, 58, 89, 1);
+ font-size: 14px;
+ border: 1px solid rgba(237, 237, 237, 1);
+ display: flex;
+ gap: 8px;
+
+ p {
+ max-width: 100px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ }
}
&__action {