fixed code
This commit is contained in:
parent
f9c2761b73
commit
b9b6f78009
@ -1,7 +1,12 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useHistory, useParams } from 'react-router-dom';
|
import { useHistory, useParams } from 'react-router-dom';
|
||||||
import { useSelector, useDispatch } from 'react-redux';
|
import { useSelector, useDispatch } from 'react-redux';
|
||||||
import { currentCandidate, selectCurrentCandidate, selectProfiles } from '../../redux/outstaffingSlice';
|
import {
|
||||||
|
currentCandidate,
|
||||||
|
selectCurrentCandidate,
|
||||||
|
selectProfiles,
|
||||||
|
selectFilteredCandidates,
|
||||||
|
} from '../../redux/outstaffingSlice';
|
||||||
import style from './Candidate.module.css';
|
import style from './Candidate.module.css';
|
||||||
import arrow from '../../images/right-arrow.png';
|
import arrow from '../../images/right-arrow.png';
|
||||||
import rectangle from '../../images/rectangle_secondPage.png';
|
import rectangle from '../../images/rectangle_secondPage.png';
|
||||||
@ -18,14 +23,21 @@ const Candidate = () => {
|
|||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
const candidatesArr = useSelector(selectProfiles);
|
const candidatesArr = useSelector(selectProfiles);
|
||||||
|
const filteredCandidates = useSelector(selectFilteredCandidates);
|
||||||
|
|
||||||
dispatch(currentCandidate(candidatesArr.find((el) => Number(el.id) === Number(candidateId))));
|
dispatch(
|
||||||
|
currentCandidate(
|
||||||
|
filteredCandidates.length > 0
|
||||||
|
? filteredCandidates.find((el) => Number(el.id) === Number(candidateId))
|
||||||
|
: candidatesArr.find((el) => Number(el.id) === Number(candidateId))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
const currentCandidateObj = useSelector(selectCurrentCandidate);
|
const currentCandidateObj = useSelector(selectCurrentCandidate);
|
||||||
|
|
||||||
console.log('currentCandidateObj ', currentCandidateObj);
|
console.log('currentCandidateObj ', currentCandidateObj);
|
||||||
|
|
||||||
const { fio: name, position_id, skillValues, vc_text: text } = currentCandidateObj;
|
const { position_id, skillValues, vc_text: text } = currentCandidateObj;
|
||||||
|
|
||||||
let classes;
|
let classes;
|
||||||
let header;
|
let header;
|
||||||
@ -88,7 +100,6 @@ const Candidate = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="col-12 col-xl-8">
|
<div className="col-12 col-xl-8">
|
||||||
<div className={style.candidate__main__description}>
|
<div className={style.candidate__main__description}>
|
||||||
<h2>{name}</h2>
|
|
||||||
<img src={rectangle} alt="" />
|
<img src={rectangle} alt="" />
|
||||||
<p className={style.hashtag}># Описание опыта</p>
|
<p className={style.hashtag}># Описание опыта</p>
|
||||||
{text ? (
|
{text ? (
|
||||||
@ -96,7 +107,7 @@ const Candidate = () => {
|
|||||||
) : (
|
) : (
|
||||||
<p className={style.candidate__textSecondary}>Описание отсутствует...</p>
|
<p className={style.candidate__textSecondary}>Описание отсутствует...</p>
|
||||||
)}
|
)}
|
||||||
<button type="submit" className={style.SectionFive__btn}>
|
<button type="submit" className={style.candidate__btn}>
|
||||||
Выбрать к собеседованию
|
Выбрать к собеседованию
|
||||||
</button>
|
</button>
|
||||||
<SectionSkills skillsArr={skillValues} />
|
<SectionSkills skillsArr={skillValues} />
|
||||||
|
@ -182,104 +182,14 @@
|
|||||||
margin: 20px 0px;
|
margin: 20px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.SectionOne > h3 {
|
|
||||||
font-family: 'GT Eesti Pro Display';
|
|
||||||
font-size: 2.2em;
|
|
||||||
font-weight: 400;
|
|
||||||
font-style: normal;
|
|
||||||
letter-spacing: normal;
|
|
||||||
line-height: 36px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.SectionOne > p {
|
|
||||||
font-family: 'GT Eesti Pro Display';
|
|
||||||
font-size: 1.8em;
|
|
||||||
font-weight: 100;
|
|
||||||
font-style: normal;
|
|
||||||
letter-spacing: normal;
|
|
||||||
line-height: 28px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.SectionOne > h4 {
|
|
||||||
font-family: 'GT Eesti Pro Display';
|
|
||||||
font-size: 1.8em;
|
|
||||||
font-weight: 700;
|
|
||||||
font-style: normal;
|
|
||||||
letter-spacing: normal;
|
|
||||||
line-height: 36px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.SectionTwo > p {
|
|
||||||
font-family: 'GT Eesti Pro Display';
|
|
||||||
font-size: 1.8em;
|
|
||||||
font-weight: 400;
|
|
||||||
font-style: normal;
|
|
||||||
letter-spacing: normal;
|
|
||||||
line-height: 28px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.SectionThree > h3 {
|
|
||||||
font-family: 'GT Eesti Pro Display';
|
|
||||||
font-size: 2.2em;
|
|
||||||
font-weight: 400;
|
|
||||||
font-style: normal;
|
|
||||||
letter-spacing: normal;
|
|
||||||
line-height: 36px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.SectionThree > p {
|
|
||||||
font-family: 'GT Eesti Pro Display';
|
|
||||||
font-size: 1.8em;
|
|
||||||
font-weight: 100;
|
|
||||||
font-style: normal;
|
|
||||||
letter-spacing: normal;
|
|
||||||
line-height: 28px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.SectionThree > h4 {
|
|
||||||
font-family: 'GT Eesti Pro Display';
|
|
||||||
font-size: 1.8em;
|
|
||||||
font-weight: 700;
|
|
||||||
font-style: normal;
|
|
||||||
letter-spacing: normal;
|
|
||||||
line-height: 36px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.SectionFour > p {
|
|
||||||
font-family: 'GT Eesti Pro Display';
|
|
||||||
font-size: 1.8em;
|
|
||||||
font-weight: 400;
|
|
||||||
font-style: normal;
|
|
||||||
letter-spacing: normal;
|
|
||||||
line-height: 18px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.SectionFive > p {
|
|
||||||
font-family: 'GT Eesti Pro Display';
|
|
||||||
font-size: 1.8em;
|
|
||||||
font-weight: 400;
|
|
||||||
font-style: normal;
|
|
||||||
letter-spacing: normal;
|
|
||||||
line-height: 16px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 576.98px) {
|
@media (min-width: 576.98px) {
|
||||||
.SectionFive__btn {
|
.candidate__btn {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 575.98px) {
|
@media (max-width: 575.98px) {
|
||||||
.SectionFive__btn {
|
.candidate__btn {
|
||||||
display: block;
|
display: block;
|
||||||
width: 221px;
|
width: 221px;
|
||||||
height: 49px;
|
height: 49px;
|
||||||
|
@ -3,7 +3,7 @@ import style from './Description.module.css';
|
|||||||
import dog from '../../images/dog.jpg';
|
import dog from '../../images/dog.jpg';
|
||||||
import rectangle from '../../images/rectangle_secondPage.png';
|
import rectangle from '../../images/rectangle_secondPage.png';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { LEVELS } from '../constants/constants';
|
import { LEVELS, SKILLS } from '../constants/constants';
|
||||||
import { selectProfiles, selectFilteredCandidates } from '../../redux/outstaffingSlice';
|
import { selectProfiles, selectFilteredCandidates } from '../../redux/outstaffingSlice';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ const Description = ({ onLoadMore }) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="col-12 col-xl-6">
|
<div className="col-12 col-xl-6">
|
||||||
<h3 className={style.description__title}>
|
<h3 className={style.description__title}>
|
||||||
{el.fio} разработчик, {LEVELS[el.level]}
|
{SKILLS[el.position_id]}, {LEVELS[el.level]}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
{el.vc_text ? (
|
{el.vc_text ? (
|
||||||
@ -60,7 +60,7 @@ const Description = ({ onLoadMore }) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="col-12 col-xl-6">
|
<div className="col-12 col-xl-6">
|
||||||
<h3 className={style.description__title}>
|
<h3 className={style.description__title}>
|
||||||
{el.fio} разработчик, {LEVELS[el.level]}
|
{SKILLS[el.position_id]}, {LEVELS[el.level]}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
{el.vc_text ? (
|
{el.vc_text ? (
|
||||||
|
@ -19,7 +19,7 @@ const TagSelect = () => {
|
|||||||
dispatch(filteredCandidates(el))
|
dispatch(filteredCandidates(el))
|
||||||
);
|
);
|
||||||
|
|
||||||
dispatch(selectedItems([]));
|
// dispatch(selectedItems([]));
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -4,3 +4,12 @@ export const LEVELS = {
|
|||||||
3: 'Middle+',
|
3: 'Middle+',
|
||||||
4: 'Senior',
|
4: 'Senior',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const SKILLS = {
|
||||||
|
1: 'Back end - разработчик',
|
||||||
|
2: 'Front end - разработчик',
|
||||||
|
3: 'Маркетолог',
|
||||||
|
4: 'Smm - специалист',
|
||||||
|
5: 'Дизайнер',
|
||||||
|
6: 'Копирайтер',
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user