employees table
This commit is contained in:
parent
db5896d29b
commit
399abc6668
@ -6,6 +6,7 @@ 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";
|
||||||
@ -34,7 +35,7 @@ import report from "assets/icons/report.svg";
|
|||||||
// import TestImg from "assets/images/partnerProfile/PersonalTesters.svg";
|
// import TestImg from "assets/images/partnerProfile/PersonalTesters.svg";
|
||||||
// import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg";
|
// import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg";
|
||||||
import "./partnerСategories.scss";
|
import "./partnerСategories.scss";
|
||||||
import { LEVELS, SKILLS } from "@utils/constants";
|
|
||||||
export const PartnerCategories = () => {
|
export const PartnerCategories = () => {
|
||||||
// const dispatch = useDispatch();
|
// const dispatch = useDispatch();
|
||||||
if (localStorage.getItem("role_status") !== "18") {
|
if (localStorage.getItem("role_status") !== "18") {
|
||||||
@ -50,14 +51,14 @@ export const PartnerCategories = () => {
|
|||||||
|
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{
|
{
|
||||||
name: 'Фронтенд',
|
name: "Фронтенд",
|
||||||
value: 2
|
value: 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Бэкенд',
|
name: "Бэкенд",
|
||||||
value: 1
|
value: 1
|
||||||
}
|
}
|
||||||
]
|
];
|
||||||
|
|
||||||
const COLUMNS = [
|
const COLUMNS = [
|
||||||
{
|
{
|
||||||
@ -72,14 +73,26 @@ export const PartnerCategories = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Данные",
|
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" }
|
// sort: { sortKey: "NAME" }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Участвует в проекте",
|
label: "Участвует в проекте",
|
||||||
renderCell: (item) => (
|
renderCell: (item) => (
|
||||||
<div className="table__project">
|
<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>
|
</div>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@ -100,12 +113,7 @@ export const PartnerCategories = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: <span className="table__action">Действие</span>,
|
label: <span className="table__action">Действие</span>,
|
||||||
renderCell: () => (
|
renderCell: () => <div className="table__more"></div>
|
||||||
<div
|
|
||||||
className="table__more"
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -302,7 +310,11 @@ export const PartnerCategories = () => {
|
|||||||
<div className="table__tabs">
|
<div className="table__tabs">
|
||||||
<div className="table__tab">Все</div>
|
<div className="table__tab">Все</div>
|
||||||
{tabs.map((tab) => {
|
{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>
|
</div>
|
||||||
<CompactTable
|
<CompactTable
|
||||||
|
Loading…
Reference in New Issue
Block a user