Переписываю спорные решения
Фикс отправки отчета, проверка на массив в map в Description.js
This commit is contained in:
100
src/pages/FormPage/FormPage.js
Normal file
100
src/pages/FormPage/FormPage.js
Normal file
@ -0,0 +1,100 @@
|
||||
import React from 'react'
|
||||
import {useDispatch, useSelector} from 'react-redux'
|
||||
import {useParams, useNavigate} from 'react-router-dom'
|
||||
import SVG from 'react-inlinesvg'
|
||||
|
||||
import {useRequest} from "../../hooks/useRequest";
|
||||
import {WithLogout} from '../../hoc/withLogout'
|
||||
|
||||
import Form from '../../components/Form/Form'
|
||||
import {Footer} from '../../components/Footer/Footer'
|
||||
|
||||
import arrow from '../../images/right-arrow.png'
|
||||
import rectangle from '../../images/rectangle_secondPage.png'
|
||||
import telegramIcon from '../../images/telegram-icon.svg'
|
||||
|
||||
import {LEVELS, SKILLS} from '../../constants/constants'
|
||||
|
||||
import {currentCandidate, selectCurrentCandidate} from '../../redux/outstaffingSlice'
|
||||
|
||||
import './formPage.scss'
|
||||
|
||||
|
||||
|
||||
|
||||
const FormPage = () => {
|
||||
const params = useParams();
|
||||
const navigate = useNavigate();
|
||||
const dispatch = useDispatch();
|
||||
const candidate = useSelector(selectCurrentCandidate);
|
||||
|
||||
|
||||
const {apiRequest} = useRequest();
|
||||
|
||||
const goBack = () => {
|
||||
navigate(-1)
|
||||
};
|
||||
|
||||
if (!candidate.id) {
|
||||
apiRequest('/profile', {
|
||||
params: Number(params.id)
|
||||
})
|
||||
.then((el) => dispatch(currentCandidate(el)))
|
||||
}
|
||||
|
||||
return (
|
||||
<WithLogout>
|
||||
<div className='form-page'>
|
||||
<div className='form-page__back'>
|
||||
<div className='form-page__arrow' onClick={goBack}>
|
||||
<div className='form-page__arrow-img'>
|
||||
<img src={arrow} alt=''/>
|
||||
</div>
|
||||
<div className='form-page__back-to-candidate'>
|
||||
<span>Вернуться к кандидату</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='form-page__candidate'>
|
||||
<div className='form-page__avatar'>
|
||||
<img src={candidate.photo} alt='candidate avatar'/>
|
||||
</div>
|
||||
<div className='form-page__candidate-info'>
|
||||
<div className='form-page__position'>
|
||||
<span>
|
||||
{candidate.specification} {SKILLS[candidate.position_id]},{' '}
|
||||
{LEVELS[candidate.level]}
|
||||
</span>
|
||||
</div>
|
||||
<div className='form-page__selected'>
|
||||
<img src={rectangle} alt='rectangle'/>
|
||||
<span>Выбранный кандидат</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='form-page__interview'>
|
||||
<div className='form-page__form'>
|
||||
<Form/>
|
||||
</div>
|
||||
<div className='form-page__separator'>
|
||||
<div className='form-page__line'></div>
|
||||
<div className='form-page__option'>или</div>
|
||||
</div>
|
||||
<div className='form-page__telegram'>
|
||||
<div className='form-page__telegram-text'>
|
||||
Заявка на собеседование через телеграм
|
||||
</div>
|
||||
<div className='form-page__telegram-icon'>
|
||||
<a href='https://t.me/st0kir' target='_blank' rel="noreferrer">
|
||||
<SVG src={telegramIcon}/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Footer/>
|
||||
</div>
|
||||
</WithLogout>
|
||||
)
|
||||
};
|
||||
|
||||
export default FormPage
|
176
src/pages/FormPage/formPage.scss
Normal file
176
src/pages/FormPage/formPage.scss
Normal file
@ -0,0 +1,176 @@
|
||||
.form-page {
|
||||
&__arrow {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-top: 80px;
|
||||
margin-left: -32px;
|
||||
cursor: pointer;
|
||||
|
||||
&-img {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
&__candidate {
|
||||
margin-top: 60px;
|
||||
margin-left: 48px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&__back-to-candidate {
|
||||
margin-left: 40px;
|
||||
margin-right: 120px;
|
||||
font-family: 'GT Eesti Pro Display';
|
||||
font-size: 1.8em;
|
||||
font-weight: 100;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
&__avatar {
|
||||
img {
|
||||
width: 61px;
|
||||
height: 61px;
|
||||
}
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
&__position {
|
||||
color: #000000;
|
||||
font-family: "GT Eesti Pro Display";
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
&__selected {
|
||||
span {
|
||||
color: #000000;
|
||||
font-family: "GT Eesti Pro Display";
|
||||
font-size: 10px;
|
||||
font-weight: 300;
|
||||
line-height: 22.38px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 152px;
|
||||
margin-right: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
&__interview {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__form {
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
&__separator {
|
||||
width: 10%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__line {
|
||||
width: 3px;
|
||||
height: 135px;
|
||||
background-color: #e4f1f6;
|
||||
margin-bottom: 26px;
|
||||
}
|
||||
|
||||
&__option {
|
||||
color: #000000;
|
||||
font-family: "GT Eesti Pro Display";
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
letter-spacing: normal;
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
letter-spacing: normal;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
&__telegram {
|
||||
width: 35%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
&-text {
|
||||
width: 225px;
|
||||
color: #000000;
|
||||
font-family: "GT Eesti Pro Display";
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
letter-spacing: normal;
|
||||
line-height: 33px;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
letter-spacing: normal;
|
||||
margin-bottom: 29px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-page + .logout-button{
|
||||
top: 0px !important;
|
||||
right: 2.5rem;
|
||||
}
|
||||
|
||||
.form-page footer {
|
||||
margin-top: 6rem !important;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.form-page {
|
||||
&__separator {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
&__telegram {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.form-page {
|
||||
&__interview {
|
||||
flex-direction: column;
|
||||
|
||||
form {
|
||||
margin-top: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
&__separator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&__telegram {
|
||||
margin-top: 5rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
&__arrow-img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
form label {
|
||||
line-height: initial;
|
||||
}
|
||||
|
||||
&__selected img {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user