From ebe3705753814c0762c9be9290b2304129550df6 Mon Sep 17 00:00:00 2001 From: kurpfish Date: Wed, 11 Aug 2021 17:42:56 +0300 Subject: [PATCH] spec and years of exp front --- .../Auth/AuthForDevelopers.module.css | 2 +- .../Auth/AuthForPartners.module.css | 2 +- src/components/Candidate/Candidate.js | 2 +- src/components/Description/Description.js | 6 ++---- src/components/Sidebar/Sidebar.js | 20 ++++++++++++++++--- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/components/Auth/AuthForDevelopers.module.css b/src/components/Auth/AuthForDevelopers.module.css index 3a14debd..52d6f97e 100644 --- a/src/components/Auth/AuthForDevelopers.module.css +++ b/src/components/Auth/AuthForDevelopers.module.css @@ -182,7 +182,7 @@ background-color: #ffffff; border: 2px solid #6aaf5c; font-family: 'Muller'; - font-size: 2em; + font-size: 1.8em; letter-spacing: normal; line-height: 71.88px; text-align: center; diff --git a/src/components/Auth/AuthForPartners.module.css b/src/components/Auth/AuthForPartners.module.css index 071b3005..313e9954 100644 --- a/src/components/Auth/AuthForPartners.module.css +++ b/src/components/Auth/AuthForPartners.module.css @@ -179,7 +179,7 @@ background-color: #ffffff; border: 2px solid #6aaf5c; font-family: 'Muller'; - font-size: 2em; + font-size: 1.8em; letter-spacing: normal; line-height: 71.88px; text-align: center; diff --git a/src/components/Candidate/Candidate.js b/src/components/Candidate/Candidate.js index 9a9f4586..64df807c 100644 --- a/src/components/Candidate/Candidate.js +++ b/src/components/Candidate/Candidate.js @@ -102,7 +102,7 @@ const Candidate = () => {
- +
diff --git a/src/components/Description/Description.js b/src/components/Description/Description.js index 313fa3b6..49298f86 100644 --- a/src/components/Description/Description.js +++ b/src/components/Description/Description.js @@ -18,8 +18,6 @@ const Description = ({ onLoadMore }) => { fetchProfile(`${process.env.REACT_APP_API_URL}/api/profile?limit=`, 1000).then((p) => getAllCandidates(p)); }, []); - console.log('render',filteredListArr, itemsArr) - if(!filteredListArr) { return (
@@ -33,7 +31,7 @@ const Description = ({ onLoadMore }) => {

- {SKILLS[el.position_id]}, {LEVELS[el.level]} + {el.specification} {SKILLS[el.position_id]}, {LEVELS[el.level]}

{el.vc_text_short ? ( @@ -80,7 +78,7 @@ const Description = ({ onLoadMore }) => {

- {SKILLS[el.position_id]}, {LEVELS[el.level]} + {el.specification} {SKILLS[el.position_id]}, {LEVELS[el.level]}

{el.vc_text_short ? ( diff --git a/src/components/Sidebar/Sidebar.js b/src/components/Sidebar/Sidebar.js index c33098d9..e14e11d0 100644 --- a/src/components/Sidebar/Sidebar.js +++ b/src/components/Sidebar/Sidebar.js @@ -3,13 +3,27 @@ import { Link } from 'react-router-dom'; import maleBig from '../../images/medium_male_big.png'; import style from './Sidebar.module.css'; -const Sidebar = () => { +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 = 'года'; + } + return `${years} ${yearsString}`; +} + +const Sidebar = ({ candidate }) => { return (
-

Опыт работы

-

4+ лет

+ { candidate && candidate.years_of_exp && <> +

Опыт работы

+

{getYearsString(candidate.years_of_exp)}

+ }