import { getTheme } from "@table-library/react-table-library/baseline"; import { CompactTable } from "@table-library/react-table-library/compact"; import { usePagination } from "@table-library/react-table-library/pagination"; import { useSort } from "@table-library/react-table-library/sort"; import { useTheme } from "@table-library/react-table-library/theme"; import React, { useEffect, useState } from "react"; import { Link, Navigate } from "react-router-dom"; import { urlForLocal } from "@utils/helper"; import { apiRequest } from "@api/request"; import { Footer } from "@components/Common/Footer/Footer"; import { Loader } from "@components/Common/Loader/Loader"; import { Navigation } from "@components/Navigation/Navigation"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import rightArrow from "assets/icons/arrows/arrowRight.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 ; } const [loader, setLoader] = useState(false); const theme = useTheme(getTheme()); const [nodes, setNodes] = useState([]); const [initialNodes, setInitialNodes] = useState([]); const [search, setSearch] = useState(""); const COLUMNS = [ { label: "", renderCell: (item) => ( avatar ) }, { label: "ФИО", renderCell: (item) =>

{item?.employee.fio}

, sort: { sortKey: "NAME" } }, { label: "Резюме", renderCell: (item) => ( Резюме
arrow
) }, { label: "Отчетность", renderCell: (item) => ( Подробный отчет
arrow
) } ]; let data = { nodes }; const sort = useSort( data, { onChange: onSortChange }, { sortFns: { NAME: (array) => array.sort((a, b) => a.employee.fio.localeCompare(b.employee.fio)) } } ); const pagination = usePagination(data, { state: { page: 0, size: 10 } }); useEffect(() => { setLoader(true); apiRequest("/project/my-employee").then((el) => { setLoader(false); setNodes(el?.managerEmployees); setInitialNodes(el.managerEmployees); }); }, []); const handleSearch = (event) => { setSearch(event.target.value); setNodes( initialNodes.filter((item) => item.employee.fio .toLowerCase() .includes(event.target.value.toLowerCase()) ) ); }; function onSortChange(action, state) { 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 (

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

{loader ? ( ) : (
{Boolean(initialNodes.length) ? ( <>
{pagination.state.getPages(data.nodes).map((_, index) => ( ))}
) : (
У вас нет нанятого персонала, разместите вашу
первую вакансию на вкладке{" "} Мои вакансии
)} {/*{personalInfoItems.map((item, index) => {*/} {/* return (*/} {/* {*/} {/* dispatch(setPartnerEmployees(mokPersons));*/} {/* }}*/} {/* >*/} {/*
*/} {/* {item.title}*/} {/*

{item.title}

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

{item.description}

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

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

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