reports create, refactoring

This commit is contained in:
kurpfish
2021-11-30 16:00:58 +02:00
parent 76c46067ef
commit 4629bc74a9
61 changed files with 26047 additions and 3865 deletions

View File

@ -0,0 +1,60 @@
import React from 'react'
import { Link } from 'react-router-dom'
import { Achievement } from '../Achievement/Achievement'
import { LEVELS, SKILLS } from '../constants/constants'
import maleBig from '../../images/medium_male_big.png'
import './candidateSidebar.scss'
const getYearsString = (years) => {
let yearsString
if (years % 10 === 1) {
yearsString = 'год'
} else if (years === 11 || years === 12 || years === 13 || years === 14) {
yearsString = 'лет'
} else if (years % 10 === 2 || years % 10 === 3 || years % 10 === 4) {
yearsString = 'года'
} else {
yearsString = 'лет'
}
return `${years} ${yearsString}`
}
const CandidateSidebar = ({ candidate, position }) => {
return (
<div className='candidate-sidebar'>
<div className='candidate-sidebar__info'>
<div className='candidate-sidebar__position'>
<h2>
{candidate.specification} {SKILLS[candidate.position_id]},{' '}
{LEVELS[candidate.level]}{' '}
</h2>
</div>
<img src={candidate.photo} alt='' />
{candidate && candidate.years_of_exp && (
<>
<p className='candidate-sidebar__experience-title'>Опыт работы</p>
<p className='candidate-sidebar__experience'>
{getYearsString(candidate.years_of_exp)}
</p>
</>
)}
<Link to={`/candidate/${candidate.id}/form`}>
<button className='candidate-sidebar__select'>
Выбрать к собеседованию
</button>
</Link>
<div className='candidate-sidebar__achievements'>
{candidate &&
candidate.achievements &&
candidate.achievements.map((item) => {
return <Achievement achievement={item.achievement} />
})}
</div>
</div>
</div>
)
}
export default CandidateSidebar

View File

@ -0,0 +1,176 @@
.candidate-sidebar {
display: flex;
flex-direction: column;
align-items: center;
border: 2px solid whitesmoke;
border-bottom: none !important;
position: sticky;
top: 80px;
&__position {
margin-bottom: 1rem;
h2 {
font-size: 3rem !important;
font-family: 'GT Eesti Pro Display';
font-size: 2.6em;
font-weight: 700;
font-style: normal;
letter-spacing: normal;
line-height: 36px;
}
}
&__achievements {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
padding: 0 1rem;
margin-bottom: 80px;
}
&__info {
text-align: center;
margin-top: 10px;
width: 100%;
display: flex;
justify-content: center;
align-items: flex-start;
flex-direction: column;
}
}
@media (max-width: 575.98px) {
.candidate-sidebar__info {
margin-top: 30px;
align-items: center;
}
}
.candidate-sidebar__info > img {
width: 180px;
height: 180px;
border-radius: 100px;
}
.candidate-sidebar__experience-title {
font-family: 'GT Eesti Pro Display';
font-size: 1.8em;
font-weight: normal;
font-style: normal;
letter-spacing: normal;
line-height: 36px;
margin-top: 20px;
}
.candidate-sidebar__experience {
font-family: 'GT Eesti Pro Display';
font-size: 3em;
font-weight: 700;
font-style: normal;
letter-spacing: normal;
line-height: normal;
}
.candidate-sidebar__select {
width: 280px;
height: 60px;
border-radius: 100px;
border: none;
background-color: #73c141;
color: #ffffff;
font-family: 'Muller';
font-size: 1.6em;
font-style: normal;
letter-spacing: normal;
line-height: normal;
text-align: center;
margin-top: 20px;
margin-bottom: 40px;
}
.candidate-sidebar__select:hover {
background: rgba(0, 0, 0, 0);
color: #73c141;
box-shadow: inset 0 0 0 3px #73c141;
}
.candidate-sidebar__info__l {
font-family: 'GT Eesti Pro Display';
font-size: 1.8em;
font-weight: 600;
font-style: normal;
letter-spacing: normal;
line-height: 36px;
text-align: center;
}
.candidateS-sidebar__arrows {
display: flex;
align-items: center;
margin-top: 20px;
}
@media (max-width: 575.98px) {
.candidate-sidebar__info__l,
.candidate-sidebar__arrows {
display: none;
}
}
.candidate-sidebar__arrow--left {
position: relative;
width: 30px;
height: 30px;
border-radius: 20px;
background-color: #f6f6f6;
}
.candidate-sidebar__arrow--left > img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.candidate-sidebar__arrows-sp {
color: #705fa3;
font-family: 'Circe';
font-size: 1.3em;
font-weight: 400;
font-style: normal;
letter-spacing: normal;
text-align: center;
margin: 0 10px;
}
.candidate-sidebar__arrow--right {
position: relative;
width: 30px;
height: 30px;
border-radius: 20px;
background-color: #74be4d;
}
.candidate-sidebar__arrow--right > img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
@media (max-width: 1199px) {
.candidate-sidebar {
flex-direction: row;
padding-left: 16px;
}
.candidate-sidebar__info {
display: flex;
flex-direction: column;
}
.candidate-sidebar__info__e,
.candidate-sidebar__info__y {
width: 180px;
}
}