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 72 additions and 210 deletions
Showing only changes of commit a156557d57 - Show all commits

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 { Link, Navigate } from "react-router-dom";
import { LEVELS, SKILLS } from "@utils/constants";
import { urlForLocal } from "@utils/helper";
import { apiRequest } from "@api/request";
@ -19,25 +18,11 @@ import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
import rightArrow from "assets/icons/arrows/arrowRight.svg";
import report from "assets/icons/report.svg";
import folder from "assets/icons/folder.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 <Navigate to="/profile" replace />;
}
@ -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,20 @@ export const PartnerCategories = () => {
<Link className="table__info" to={`/profile/summary/${item.user_id}`}>
<p>{item?.employee.fio}</p>
<span>
{LEVELS[item?.resume.userCard.level]} /{" "}
{SKILLS[item?.resume.userCard.position_id]}
{item?.employee.level_title} /{" "}
{item?.employee.position.name}
</span>
</Link>
)
// sort: { sortKey: "NAME" }
},
{
label: "Участвует в проекте",
renderCell: (item) => (
<div className="table__project">
{item.resume.userCard.at_project ? (
<div>item.resume.userCard.at_project</div>
{item?.employee.projects.length ? (
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>
)}
@ -145,23 +131,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 +152,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 (
<div className="partner-categories">
<ProfileHeader />
@ -313,11 +183,11 @@ export const PartnerCategories = () => {
<div className="table__tabs">
<div
onClick={() => {
setActiveTab("Все");
setActiveTab(0);
setNodes(initialNodes);
}}
className={
activeTab === "Все"
activeTab === 0
? "table__tab table__tab--active"
: "table__tab"
}
@ -332,7 +202,7 @@ export const PartnerCategories = () => {
setNodes(
initialNodes.filter(
(item) =>
item.resume.userCard.position_id === tab.value
item.employee.position.id === tab.value
)
);
}}
@ -355,6 +225,7 @@ export const PartnerCategories = () => {
sort={sort}
pagination={pagination}
/>
{Boolean(nodes.length) && pagination.state.getPages(data.nodes).length > 1 &&
<div className="table__pagination">
<button
className={
@ -403,6 +274,7 @@ export const PartnerCategories = () => {
{">"}
</button>
</div>
}
</>
) : (
<div className="partner-categories__empty">
@ -413,39 +285,6 @@ export const PartnerCategories = () => {
</Link>
</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>

View File

@ -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 {