developer resume

This commit is contained in:
Николай Полтщук 2024-08-07 18:06:10 +03:00
parent 4cd3118649
commit 4464324ae2
2 changed files with 26 additions and 16 deletions

View File

@ -32,7 +32,7 @@ export const Summary = () => {
const [gitInfo, setGitInfo] = useState([]); const [gitInfo, setGitInfo] = useState([]);
const [editSummaryOpen, setEditSummaryOpen] = useState(false); const [editSummaryOpen, setEditSummaryOpen] = useState(false);
const [editSkills, setEditSkills] = useState(false); const [editSkills, setEditSkills] = useState(false);
const [userInfo, setUserInfo] = useState({}) const [userInfo, setUserInfo] = useState({});
const [summary, setSummary] = useState(""); const [summary, setSummary] = useState("");
const [selectedSkills, setSelectedSkills] = useState([]); const [selectedSkills, setSelectedSkills] = useState([]);
const [selectSkillsOpen, setSelectSkillsOpen] = useState(false); const [selectSkillsOpen, setSelectSkillsOpen] = useState(false);
@ -67,11 +67,11 @@ export const Summary = () => {
fio: res.userCard.fio, fio: res.userCard.fio,
specification: res.userCard.specification, specification: res.userCard.specification,
level: res.userCard.level_title, level: res.userCard.level_title,
position: res.userCard.position.name, position: res.userCard.position.name
}) });
setSummary(res.userCard.vc_text) setSummary(res.userCard.vc_text);
setSelectedSkills(res.userCard.skillValues) setSelectedSkills(res.userCard.skillValues);
}) });
} }
}, [userId]); }, [userId]);
@ -149,19 +149,29 @@ export const Summary = () => {
<div className={openGit ? "summary__info open-git" : "summary__info"}> <div className={openGit ? "summary__info open-git" : "summary__info"}>
<div className="summary__person"> <div className="summary__person">
<img <img
src={userId ? urlForLocal(userInfo.photo) : src={
profileInfo?.photo ? urlForLocal(profileInfo.photo) : avatarMok userId
? urlForLocal(userInfo.photo)
: profileInfo?.photo
? urlForLocal(profileInfo.photo)
: avatarMok
} }
className="summary__avatar" className="summary__avatar"
alt="avatar" alt="avatar"
/> />
<p className="summary__name"> <p className="summary__name">
{userId ? userInfo.fio : (profileInfo?.fio || profileInfo?.username)}{" "} {userId
? userInfo.fio
: profileInfo?.fio || profileInfo?.username}{" "}
{userId ? userInfo.specification : profileInfo.specification} {userId ? userInfo.specification : profileInfo.specification}
</p> </p>
<hr /> <hr />
<div className="summary__direction">{userId ? userInfo.position : profileInfo?.position?.name}</div> <div className="summary__direction">
<div className="summary__level">{userId ? userInfo.level : profileInfo?.level_title}</div> {userId ? userInfo.position : profileInfo?.position?.name}
</div>
<div className="summary__level">
{userId ? userInfo.level : profileInfo?.level_title}
</div>
</div> </div>
{!openGit && ( {!openGit && (
<button className="summary__git" onClick={() => setOpenGit(true)}> <button className="summary__git" onClick={() => setOpenGit(true)}>
@ -174,7 +184,7 @@ export const Summary = () => {
<div className="summary__skills skills__section"> <div className="summary__skills skills__section">
<div className="summary__sections__head"> <div className="summary__sections__head">
<h3>Основной стек</h3> <h3>Основной стек</h3>
{!userId && {!userId && (
<button <button
className={editSkills ? "edit" : ""} className={editSkills ? "edit" : ""}
onClick={() => { onClick={() => {
@ -186,7 +196,7 @@ export const Summary = () => {
> >
{editSkills ? "Сохранить" : "Редактировать"} {editSkills ? "Сохранить" : "Редактировать"}
</button> </button>
} )}
</div> </div>
<div className="skills__section__items"> <div className="skills__section__items">
{editSkills ? ( {editSkills ? (
@ -256,7 +266,7 @@ export const Summary = () => {
<div className="experience__block"> <div className="experience__block">
<div className="summary__sections__head"> <div className="summary__sections__head">
<h3>Опыт работы</h3> <h3>Опыт работы</h3>
{!userId && {!userId && (
<button <button
className={editSummaryOpen ? "edit" : ""} className={editSummaryOpen ? "edit" : ""}
onClick={() => { onClick={() => {
@ -268,7 +278,7 @@ export const Summary = () => {
> >
{editSummaryOpen ? "Сохранить" : "Редактировать"} {editSummaryOpen ? "Сохранить" : "Редактировать"}
</button> </button>
} )}
</div> </div>
{editSummaryOpen ? ( {editSummaryOpen ? (
<CKEditor <CKEditor

View File

@ -20,6 +20,7 @@ import { Profile } from "@pages/Profile/Profile";
import { ProjectTracker } from "@pages/ProjectTracker/ProjectTracker"; import { ProjectTracker } from "@pages/ProjectTracker/ProjectTracker";
import { Stack } from "@pages/Stack/Stack"; import { Stack } from "@pages/Stack/Stack";
import Statistics from "@pages/Statistics/Statistics"; import Statistics from "@pages/Statistics/Statistics";
import { Summary } from "@pages/Summary/Summary";
import { Tracker } from "@pages/Tracker/Tracker"; import { Tracker } from "@pages/Tracker/Tracker";
import { TrackerIntro } from "@pages/TrackerIntro/TrackerIntro"; import { TrackerIntro } from "@pages/TrackerIntro/TrackerIntro";
import { ViewReport } from "@pages/ViewReport/ViewReport"; import { ViewReport } from "@pages/ViewReport/ViewReport";
@ -27,7 +28,6 @@ import { WelcomePage } from "@pages/WelcomePage/WelcomePage";
import { Calendar } from "@components/Calendar/Calendar"; import { Calendar } from "@components/Calendar/Calendar";
import { Candidate } from "@components/Candidate/Candidate"; import { Candidate } from "@components/Candidate/Candidate";
import { Summary } from "@pages/Summary/Summary";
export const PartnerPage = () => { export const PartnerPage = () => {
return ( return (