diff --git a/src/pages/PartnerEmployeeReport/PartnerEmployeeReport.jsx b/src/pages/PartnerEmployeeReport/PartnerEmployeeReport.jsx
index c0a5ced9..0921ca5e 100644
--- a/src/pages/PartnerEmployeeReport/PartnerEmployeeReport.jsx
+++ b/src/pages/PartnerEmployeeReport/PartnerEmployeeReport.jsx
@@ -92,13 +92,13 @@ export const PartnerEmployeeReport = () => {
<>
-
{userInfo.fio}
-
{userInfo.position}
+
{userInfo?.userCard.fio}
+
{userInfo?.userCard.position.name}
- {userInfo?.stack &&
- userInfo.stack.map((skill, index) => {
- return {skill};
+ {userInfo?.userCard?.skillValues &&
+ userInfo?.userCard?.skillValues.map((skill) => {
+ return {skill.skill.name};
})}
diff --git a/src/pages/PartnerСategories/PartnerСategories.jsx b/src/pages/PartnerСategories/PartnerСategories.jsx
index 53711f64..5d8d5725 100644
--- a/src/pages/PartnerСategories/PartnerСategories.jsx
+++ b/src/pages/PartnerСategories/PartnerСategories.jsx
@@ -65,23 +65,25 @@ export const PartnerCategories = () => {
{
label: "",
renderCell: (item) => (
-
+
+
+
)
},
{
label: "Данные",
renderCell: (item) => (
-
+
{item?.employee.fio}
{LEVELS[item?.resume.userCard.level]} /{" "}
{SKILLS[item?.resume.userCard.position_id]}
-
+
)
// sort: { sortKey: "NAME" }
},
diff --git a/src/pages/Summary/Summary.jsx b/src/pages/Summary/Summary.jsx
index dcfbe83e..c66b9dc4 100644
--- a/src/pages/Summary/Summary.jsx
+++ b/src/pages/Summary/Summary.jsx
@@ -2,7 +2,7 @@ import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import { CKEditor } from "@ckeditor/ckeditor5-react";
import React, { useEffect, useState } from "react";
import { useSelector } from "react-redux";
-import { Navigate } from "react-router-dom";
+import { useParams } from "react-router-dom";
import { getProfileInfo } from "@redux/outstaffingSlice";
@@ -27,19 +27,18 @@ import avatarMok from "assets/images/avatarMok.webp";
import "./summary.scss";
export const Summary = () => {
- if (localStorage.getItem("role_status") === "18") {
- return ;
- }
const profileInfo = useSelector(getProfileInfo);
const [openGit, setOpenGit] = useState(false);
const [gitInfo, setGitInfo] = useState([]);
const [editSummaryOpen, setEditSummaryOpen] = useState(false);
const [editSkills, setEditSkills] = useState(false);
+ const [userInfo, setUserInfo] = useState({})
const [summary, setSummary] = useState("");
const [selectedSkills, setSelectedSkills] = useState([]);
const [selectSkillsOpen, setSelectSkillsOpen] = useState(false);
const [skillsList, seSkillsList] = useState([]);
const { showNotification } = useNotification();
+ const { id: userId } = useParams();
useEffect(() => {
apiRequest(
@@ -48,8 +47,10 @@ export const Summary = () => {
}, []);
useEffect(() => {
- setSummary(profileInfo.vc_text);
- setSelectedSkills(profileInfo.skillValues);
+ if (!userId) {
+ setSummary(profileInfo.vc_text);
+ setSelectedSkills(profileInfo.skillValues);
+ }
}, [profileInfo]);
useEffect(() => {
@@ -58,6 +59,22 @@ export const Summary = () => {
});
}, []);
+ useEffect(() => {
+ if (userId) {
+ apiRequest(`/resume?userId=${userId}`).then((res) => {
+ setUserInfo({
+ photo: res.userCard.photo,
+ fio: res.userCard.fio,
+ specification: res.userCard.specification,
+ level: res.userCard.level_title,
+ position: res.userCard.position.name,
+ })
+ setSummary(res.userCard.vc_text)
+ setSelectedSkills(res.userCard.skillValues)
+ })
+ }
+ }, [userId]);
+
const addSkill = (skill) => {
const isSkillFound = selectedSkills.some(
(item) => item.skill_id == skill.id
@@ -132,21 +149,19 @@ export const Summary = () => {
- {profileInfo?.fio || profileInfo?.username}{" "}
- {profileInfo.specification}
+ {userId ? userInfo.fio : (profileInfo?.fio || profileInfo?.username)}{" "}
+ {userId ? userInfo.specification : profileInfo.specification}
-
Front End
-
Middle+
+
{userId ? userInfo.position : profileInfo?.position?.name}
+
{userId ? userInfo.level : profileInfo?.level_title}
{!openGit && (