developer_resume #42

Merged
nik.polishuk merged 2 commits from developer_resume into main 2024-08-09 21:10:16 +03:00
3 changed files with 91 additions and 221 deletions

View File

@ -0,0 +1,3 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.4339 2.66676H7.24725L7.03392 2.0001C6.89562 1.60892 6.63908 1.27043 6.29985 1.03154C5.96062 0.792642 5.55549 0.665163 5.14059 0.666763H2.10059C1.57015 0.666763 1.06145 0.877477 0.686373 1.25255C0.3113 1.62762 0.100586 2.13633 0.100586 2.66676V11.3334C0.100586 11.8639 0.3113 12.3726 0.686373 12.7476C1.06145 13.1227 1.57015 13.3334 2.10059 13.3334H11.4339C11.9644 13.3334 12.4731 13.1227 12.8481 12.7476C13.2232 12.3726 13.4339 11.8639 13.4339 11.3334V4.66676C13.4339 4.13633 13.2232 3.62762 12.8481 3.25255C12.4731 2.87748 11.9644 2.66676 11.4339 2.66676ZM12.1006 11.3334C12.1006 11.5102 12.0303 11.6798 11.9053 11.8048C11.7803 11.9299 11.6107 12.0001 11.4339 12.0001H2.10059C1.92378 12.0001 1.75421 11.9299 1.62918 11.8048C1.50416 11.6798 1.43392 11.5102 1.43392 11.3334V2.66676C1.43392 2.48995 1.50416 2.32038 1.62918 2.19536C1.75421 2.07033 1.92378 2.0001 2.10059 2.0001H5.14059C5.28035 1.99974 5.41669 2.04331 5.53034 2.12466C5.64399 2.20601 5.7292 2.32102 5.77392 2.45343L6.13392 3.54676C6.17864 3.67918 6.26385 3.79419 6.3775 3.87553C6.49115 3.95688 6.62749 4.00046 6.76725 4.0001H11.4339C11.6107 4.0001 11.7803 4.07033 11.9053 4.19536C12.0303 4.32038 12.1006 4.48995 12.1006 4.66676V11.3334Z" fill="#52B709"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -6,7 +6,6 @@ import { useTheme } from "@table-library/react-table-library/theme";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { Link, Navigate } from "react-router-dom"; import { Link, Navigate } from "react-router-dom";
import { LEVELS, SKILLS } from "@utils/constants";
import { urlForLocal } from "@utils/helper"; import { urlForLocal } from "@utils/helper";
import { apiRequest } from "@api/request"; import { apiRequest } from "@api/request";
@ -18,26 +17,12 @@ import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadc
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
import rightArrow from "assets/icons/arrows/arrowRight.svg"; import rightArrow from "assets/icons/arrows/arrowRight.svg";
import folder from "assets/icons/folder.svg";
import report from "assets/icons/report.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"; import "./partnerСategories.scss";
export const PartnerCategories = () => { export const PartnerCategories = () => {
// const dispatch = useDispatch();
if (localStorage.getItem("role_status") !== "18") { if (localStorage.getItem("role_status") !== "18") {
return <Navigate to="/profile" replace />; return <Navigate to="/profile" replace />;
} }
@ -46,7 +31,7 @@ export const PartnerCategories = () => {
const theme = useTheme(getTheme()); const theme = useTheme(getTheme());
const [nodes, setNodes] = useState([]); const [nodes, setNodes] = useState([]);
const [initialNodes, setInitialNodes] = useState([]); const [initialNodes, setInitialNodes] = useState([]);
const [activeTab, setActiveTab] = useState("Все"); const [activeTab, setActiveTab] = useState(0);
const [search, setSearch] = useState(""); const [search, setSearch] = useState("");
@ -80,19 +65,24 @@ export const PartnerCategories = () => {
<Link className="table__info" to={`/profile/summary/${item.user_id}`}> <Link className="table__info" to={`/profile/summary/${item.user_id}`}>
<p>{item?.employee.fio}</p> <p>{item?.employee.fio}</p>
<span> <span>
{LEVELS[item?.resume.userCard.level]} /{" "} {item?.employee.level_title} / {item?.employee.position.name}
{SKILLS[item?.resume.userCard.position_id]}
</span> </span>
</Link> </Link>
) )
// sort: { sortKey: "NAME" }
}, },
{ {
label: "Участвует в проекте", label: "Участвует в проекте",
renderCell: (item) => ( renderCell: (item) => (
<div className="table__project"> <div className="table__project">
{item.resume.userCard.at_project ? ( {item?.employee.projects.length ? (
<div>item.resume.userCard.at_project</div> item.employee.projects.map((project) => {
return (
<div className="table__project__item" key={project.id}>
<img src={folder} alt="folder" />{" "}
<p>{project.project.name}</p>
</div>
);
})
) : ( ) : (
<span>Нет проектов</span> <span>Нет проектов</span>
)} )}
@ -145,23 +135,9 @@ export const PartnerCategories = () => {
useEffect(() => { useEffect(() => {
setLoader(true); setLoader(true);
apiRequest("/project/my-employee").then((el) => { apiRequest("/project/my-employee").then((el) => {
const fetchResumes = async () => { setNodes(el.managerEmployees);
const promises = el.managerEmployees.map(async (manager) => { setInitialNodes(el.managerEmployees);
const resume = await apiRequest(`/resume?userId=${manager.user_id}`); setLoader(false);
return { ...manager, resume }; // Возвращаем объект с добавленным ключом resume
});
try {
const updatedManagers = await Promise.all(promises);
setInitialNodes(updatedManagers);
setNodes(updatedManagers);
setLoader(false);
} catch (error) {
console.error("Ошибка при получении резюме:", error);
}
};
fetchResumes();
}); });
}, []); }, []);
@ -180,108 +156,6 @@ export const PartnerCategories = () => {
console.log(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 ( return (
<div className="partner-categories"> <div className="partner-categories">
<ProfileHeader /> <ProfileHeader />
@ -313,11 +187,11 @@ export const PartnerCategories = () => {
<div className="table__tabs"> <div className="table__tabs">
<div <div
onClick={() => { onClick={() => {
setActiveTab("Все"); setActiveTab(0);
setNodes(initialNodes); setNodes(initialNodes);
}} }}
className={ className={
activeTab === "Все" activeTab === 0
? "table__tab table__tab--active" ? "table__tab table__tab--active"
: "table__tab" : "table__tab"
} }
@ -331,8 +205,7 @@ export const PartnerCategories = () => {
setActiveTab(tab.name); setActiveTab(tab.name);
setNodes( setNodes(
initialNodes.filter( initialNodes.filter(
(item) => (item) => item.employee.position.id === tab.value
item.resume.userCard.position_id === tab.value
) )
); );
}} }}
@ -355,54 +228,61 @@ export const PartnerCategories = () => {
sort={sort} sort={sort}
pagination={pagination} pagination={pagination}
/> />
<div className="table__pagination"> {Boolean(nodes.length) &&
<button pagination.state.getPages(data.nodes).length > 1 && (
className={ <div className="table__pagination">
pagination.state.page === 0 ? "switch disable" : "switch"
}
type="button"
disabled={pagination.state.page === 0}
onClick={() =>
pagination.fns.onSetPage(pagination.state.page - 1)
}
>
{"<"}
</button>
<span className="table__pages">
{pagination.state.getPages(data.nodes).map((_, index) => (
<button <button
key={index}
type="button"
className={ className={
pagination.state.page === index pagination.state.page === 0
? "page page--active " ? "switch disable"
: "page" : "switch"
}
type="button"
disabled={pagination.state.page === 0}
onClick={() =>
pagination.fns.onSetPage(pagination.state.page - 1)
} }
onClick={() => pagination.fns.onSetPage(index)}
> >
{index + 1} {"<"}
</button> </button>
))} <span className="table__pages">
</span> {pagination.state
<button .getPages(data.nodes)
className={ .map((_, index) => (
pagination.state.page + 1 === <button
pagination.state.getPages(data.nodes).length key={index}
? "switch disable" type="button"
: "switch" className={
} pagination.state.page === index
type="button" ? "page page--active "
disabled={ : "page"
pagination.state.page + 1 === }
pagination.state.getPages(data.nodes).length onClick={() => pagination.fns.onSetPage(index)}
} >
onClick={() => {index + 1}
pagination.fns.onSetPage(pagination.state.page + 1) </button>
} ))}
> </span>
{">"} <button
</button> className={
</div> pagination.state.page + 1 ===
pagination.state.getPages(data.nodes).length
? "switch disable"
: "switch"
}
type="button"
disabled={
pagination.state.page + 1 ===
pagination.state.getPages(data.nodes).length
}
onClick={() =>
pagination.fns.onSetPage(pagination.state.page + 1)
}
>
{">"}
</button>
</div>
)}
</> </>
) : ( ) : (
<div className="partner-categories__empty"> <div className="partner-categories__empty">
@ -413,39 +293,6 @@ export const PartnerCategories = () => {
</Link> </Link>
</div> </div>
)} )}
{/*{personalInfoItems.map((item, index) => {*/}
{/* return (*/}
{/* <Link*/}
{/* to={item.link}*/}
{/* key={index}*/}
{/* className={*/}
{/* item.available*/}
{/* ? "partner-categories__item item"*/}
{/* : "partner-categories__item item item__disable"*/}
{/* }*/}
{/* onClick={() => {*/}
{/* dispatch(setPartnerEmployees(mokPersons));*/}
{/* }}*/}
{/* >*/}
{/* <div className="item__title">*/}
{/* <img src={item.img} alt={item.title} />*/}
{/* <h4>{item.title}</h4>*/}
{/* </div>*/}
{/* <div className="item__info">*/}
{/* <p>{item.description}</p>*/}
{/* <div className="more">*/}
{/* <img src={rightArrow} alt="arrow" />*/}
{/* </div>*/}
{/* </div>*/}
{/* {!item.available && (*/}
{/* <div className="item__disable-hover">*/}
{/* <p>У вас нет персонала из категории</p>*/}
{/* <button>Подобрать</button>*/}
{/* </div>*/}
{/* )}*/}
{/* </Link>*/}
{/* );*/}
{/*})}*/}
</div> </div>
)} )}
</div> </div>

View File

@ -255,6 +255,26 @@
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
line-height: 17.5px; 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 { &__action {