employees table

This commit is contained in:
Николай Полтщук 2024-07-26 19:54:06 +03:00
parent db5896d29b
commit 399abc6668

View File

@ -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";
@ -34,7 +35,7 @@ import report from "assets/icons/report.svg";
// import TestImg from "assets/images/partnerProfile/PersonalTesters.svg";
// import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg";
import "./partnerСategories.scss";
import { LEVELS, SKILLS } from "@utils/constants";
export const PartnerCategories = () => {
// const dispatch = useDispatch();
if (localStorage.getItem("role_status") !== "18") {
@ -50,14 +51,14 @@ export const PartnerCategories = () => {
const tabs = [
{
name: 'Фронтенд',
name: "Фронтенд",
value: 2
},
{
name: 'Бэкенд',
name: "Бэкенд",
value: 1
}
]
];
const COLUMNS = [
{
@ -72,14 +73,26 @@ export const PartnerCategories = () => {
},
{
label: "Данные",
renderCell: (item) => <div className="table__info"><p>{item?.employee.fio}</p><span>{LEVELS[item?.resume.userCard.level]} / {SKILLS[item?.resume.userCard.position_id]}</span></div>,
renderCell: (item) => (
<div className="table__info">
<p>{item?.employee.fio}</p>
<span>
{LEVELS[item?.resume.userCard.level]} /{" "}
{SKILLS[item?.resume.userCard.position_id]}
</span>
</div>
)
// sort: { sortKey: "NAME" }
},
{
label: "Участвует в проекте",
renderCell: (item) => (
<div className="table__project">
{item.resume.userCard.at_project ? <div>item.resume.userCard.at_project</div> : <span>Нет проектов</span>}
{item.resume.userCard.at_project ? (
<div>item.resume.userCard.at_project</div>
) : (
<span>Нет проектов</span>
)}
</div>
)
},
@ -100,12 +113,7 @@ export const PartnerCategories = () => {
},
{
label: <span className="table__action">Действие</span>,
renderCell: () => (
<div
className="table__more"
>
</div>
)
renderCell: () => <div className="table__more"></div>
}
];
@ -302,7 +310,11 @@ export const PartnerCategories = () => {
<div className="table__tabs">
<div className="table__tab">Все</div>
{tabs.map((tab) => {
return <div className="table__tab" key={tab.value}>{tab.name}</div>
return (
<div className="table__tab" key={tab.value}>
{tab.name}
</div>
);
})}
</div>
<CompactTable