Fixed candidate pages

This commit is contained in:
MaxOvs19
2023-04-13 16:10:35 +03:00
parent 2e7375f18e
commit b91c8acd0c
5 changed files with 82 additions and 43 deletions

View File

@ -24,14 +24,27 @@ const getYearsString = (years) => {
const CandidateSidebar = ({ candidate, setActiveSnippet, activeSnippet }) => {
const userId = localStorage.getItem("id");
const [addAspt, setAddAspt] = useState(false);
const showSnippet = () => {
setActiveSnippet(!activeSnippet);
};
const [addAspt, setAddAspt] = useState(false);
let levelAspt = {
spec: candidate.specification,
skils: SKILLS[candidate.position_id],
level: LEVELS[candidate.level],
};
return (
<div className="candidate-sidebar">
<ModalAspt
active={addAspt}
setActive={setAddAspt}
level={levelAspt}
></ModalAspt>
<div className="candidate-sidebar__info">
<div className="candidate-sidebar__position">
<h2>
@ -49,8 +62,6 @@ const CandidateSidebar = ({ candidate, setActiveSnippet, activeSnippet }) => {
</>
)}
<ModalAspt active={addAspt} setActive={setAddAspt}></ModalAspt>
<button
className="candidate-sidebar__select"
onClick={() => setAddAspt(true)}
@ -60,11 +71,8 @@ const CandidateSidebar = ({ candidate, setActiveSnippet, activeSnippet }) => {
{userId && (
<>
<Link to={`/${candidate.id}/calendar`}>
<button className="candidate-sidebar__select">Отчёты</button>
</Link>
<button className="candidate-sidebar__select" onClick={showSnippet}>
{activeSnippet ? "Показать" : "Скрыть"}
{activeSnippet ? "Код разработчика" : "Скрыть"}
</button>
<div className="candidate-sidebar__achievements">
{candidate &&

View File

@ -5,7 +5,7 @@
border-radius: 12px;
border-bottom: none !important;
position: sticky;
background: #FFFFFF;
background: #ffffff;
top: 80px;
&__position {
@ -13,7 +13,7 @@
h2 {
font-size: 2.5rem;
font-family: 'GT Eesti Pro Display', sans-serif;
font-family: "GT Eesti Pro Display", sans-serif;
font-weight: 700;
font-style: normal;
letter-spacing: normal;
@ -29,6 +29,7 @@
}
&__info {
padding-bottom: 40px;
text-align: center;
margin-top: 10px;
width: 100%;
@ -53,7 +54,7 @@
}
.candidate-sidebar__experience-title {
font-family: 'GT Eesti Pro Display', sans-serif;
font-family: "GT Eesti Pro Display", sans-serif;
font-size: 1.8em;
font-weight: normal;
font-style: normal;
@ -63,7 +64,7 @@
}
.candidate-sidebar__experience {
font-family: 'GT Eesti Pro Display', sans-serif;
font-family: "GT Eesti Pro Display", sans-serif;
font-size: 2.5em;
font-weight: 700;
font-style: normal;
@ -78,7 +79,7 @@
border: none;
background-color: #73c141;
color: #ffffff;
font-family: 'Muller', sans-serif;
font-family: "Muller", sans-serif;
font-size: 1.6em;
font-style: normal;
letter-spacing: normal;
@ -95,7 +96,7 @@
}
.candidate-sidebar__info__l {
font-family: 'GT Eesti Pro Display', sans-serif;
font-family: "GT Eesti Pro Display", sans-serif;
font-size: 1.8em;
font-weight: 600;
font-style: normal;
@ -134,7 +135,7 @@
.candidate-sidebar__arrows-sp {
color: #705fa3;
font-family: 'Circe', sans-serif;
font-family: "Circe", sans-serif;
font-size: 1.3em;
font-weight: 400;
font-style: normal;