From 399abc66686696ce4760d4674172577366d877f3 Mon Sep 17 00:00:00 2001 From: M1kola Date: Fri, 26 Jul 2024 19:54:06 +0300 Subject: [PATCH] employees table --- .../PartnerСategories/PartnerСategories.jsx | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/pages/PartnerСategories/PartnerСategories.jsx b/src/pages/PartnerСategories/PartnerСategories.jsx index 9586dd73..27f97b54 100644 --- a/src/pages/PartnerСategories/PartnerСategories.jsx +++ b/src/pages/PartnerСategories/PartnerСategories.jsx @@ -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) =>

{item?.employee.fio}

{LEVELS[item?.resume.userCard.level]} / {SKILLS[item?.resume.userCard.position_id]}
, + renderCell: (item) => ( +
+

{item?.employee.fio}

+ + {LEVELS[item?.resume.userCard.level]} /{" "} + {SKILLS[item?.resume.userCard.position_id]} + +
+ ) // sort: { sortKey: "NAME" } }, { label: "Участвует в проекте", renderCell: (item) => (
- {item.resume.userCard.at_project ?
item.resume.userCard.at_project
: Нет проектов} + {item.resume.userCard.at_project ? ( +
item.resume.userCard.at_project
+ ) : ( + Нет проектов + )}
) }, @@ -100,12 +113,7 @@ export const PartnerCategories = () => { }, { label: Действие, - renderCell: () => ( -
-
- ) + renderCell: () =>
} ]; @@ -302,7 +310,11 @@ export const PartnerCategories = () => {
Все
{tabs.map((tab) => { - return
{tab.name}
+ return ( +
+ {tab.name} +
+ ); })}