From 15ed4b8c1d5cfd5d47aa1631f31a10e123877cd5 Mon Sep 17 00:00:00 2001 From: M1kola Date: Thu, 23 Feb 2023 14:57:26 +0300 Subject: [PATCH 1/2] partner bid page --- src/App.js | 2 + src/components/ProfileHeader/ProfileHeader.js | 2 +- src/images/QualificationInfo.png | Bin 0 -> 672 bytes src/images/QualificationInfoMiddle.png | Bin 0 -> 507 bytes src/images/mokPerson.png | Bin 0 -> 6039 bytes src/pages/AuthForPartners/AuthForPartners.js | 2 +- src/pages/PartnerBid/PartnerBid.js | 119 +++++ src/pages/PartnerBid/partnerBid.scss | 440 ++++++++++++++++++ src/pages/PartnerRequests/PartnerRequests.js | 2 +- src/pages/Profile/Profile.js | 2 +- 10 files changed, 565 insertions(+), 4 deletions(-) create mode 100644 src/images/QualificationInfo.png create mode 100644 src/images/QualificationInfoMiddle.png create mode 100644 src/images/mokPerson.png create mode 100644 src/pages/PartnerBid/PartnerBid.js create mode 100644 src/pages/PartnerBid/partnerBid.scss diff --git a/src/App.js b/src/App.js index 84bf489b..cbd1e31b 100644 --- a/src/App.js +++ b/src/App.js @@ -24,6 +24,7 @@ import {Payouts} from './pages/Payouts/Payouts' import {Settings} from './pages/Settings/Settings' import {PartnerRequests} from './pages/PartnerRequests/PartnerRequests' import {PartnerAddRequest} from './pages/PartnerAddRequest/PartnerAddRequest' +import {PartnerBid} from './pages/PartnerBid/PartnerBid' import './fonts/stylesheet.css' import 'bootstrap/dist/css/bootstrap.min.css' @@ -68,6 +69,7 @@ const App = () => { }/> }/> }/> + }/> }/> diff --git a/src/components/ProfileHeader/ProfileHeader.js b/src/components/ProfileHeader/ProfileHeader.js index d63aae34..ae91b927 100644 --- a/src/components/ProfileHeader/ProfileHeader.js +++ b/src/components/ProfileHeader/ProfileHeader.js @@ -21,7 +21,7 @@ export const ProfileHeader = () => { const userRole = useSelector(getRole); const profileInfo = useSelector(getProfileInfo); - const [user] = useState('developer') + const [user] = useState('partner') const [navInfo] = useState({ developer: [ { diff --git a/src/images/QualificationInfo.png b/src/images/QualificationInfo.png new file mode 100644 index 0000000000000000000000000000000000000000..a540a284c837b044d1c497bbbe44767a9090e598 GIT binary patch literal 672 zcmV;R0$=@!P)P0012b1^@s6UwFrL00009a7bBm000XU z000XU0RWnu7ytkO0drDELIAGL9O(c600d`2O+f$vv5yPGi}+=x2B6D0}vGj7&P|CmlsoO9%i`9>YUYZpoR6$_myrA7<(N`;G?l^p?saZ`$c%hXYB!qw6yjTi4ZKU zd(A?9mVXApAuTQqVM!Wf=M)CImE^6M-_NLa4)|8e*Ci`N?#t8>oQ<3;9Qwo&Lfh)D z_D|p6|KT>BmGH@m4pVE)r?!Kyv(VK~#7F#n!=1 z!!Q&E;P;$ENx3+7kvNtOIzqX11dd!e!3Hf8WCXfFM@X5VY*3DzASY6Ruz62yL<9lZ zjw604lHv1a=0M(w43lDNiO`C#4)`nc8x_lxhJn(+1Y*1+GEvn1Qx;qQWj zgQb$DSlh+@9gq_zUj|77X?oRM2ORX>UB!jwkyo->*d1h^v_Qh1Lk(zK4>cpfrG$0 zN~zoz?gW0pqq!^G1nGY|hc0n}qk=AQFJKGYI1Pq@&gb5$dc9B6V=m4R?FF6ipAgNG x?#IU1MOi-ILSJc&*!D7|zlETi19%Mq`2;H;2AL>NoU{M{002ovPDHLkV1jAr(%%38 literal 0 HcmV?d00001 diff --git a/src/images/mokPerson.png b/src/images/mokPerson.png new file mode 100644 index 0000000000000000000000000000000000000000..b1e0bf52a26dbbd321053a2a66bf3394095d257f GIT binary patch literal 6039 zcmV;I7ij2-P)5pUso zk)@#G0}A(EFPjQwDV9>&(l$%eq|KgYo5?cU+5EmUO-Ry7GRv7(eVVHk$6@0dSF@JNL&V17i`Dh(Zr1woi?82U^>5KCzrXu1J|wioCni2_7H zfNtn5q9iuc_6-n>!?GyV($96_LG8rya$kUsVc-lxz!?CMCD!?emMW3RDpeDfQzO>t zFy`ohJJm)FvnWD{h@wzu=*CV#)OTk)ockQ1Kz&I`Nf4(QrB8QF>v_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MrLH?V@s;YZ!pS$+|kzt%R{bWAK>^Bcp>Tm46#PIiC zASg-|rI@*7NrLH{tt9(oh08o={ES|^L#08=Hc~8a8o7CI z$pv{YVeN(cg_SG+wf}?9crY#c?z?l~lxAzKEoDX|x?F&^00RR>RL`xXN_n0UrLlId zubS&d1(QU90u{-CUb6mLc(OZb+iJt++^-3GePqeJj_mno2Z&H>pO2L!{tmVXqgL)H RXpjH^002ovPDHLkV1lbfy%GQb literal 0 HcmV?d00001 diff --git a/src/pages/AuthForPartners/AuthForPartners.js b/src/pages/AuthForPartners/AuthForPartners.js index 7c23cfdf..660b85f4 100644 --- a/src/pages/AuthForPartners/AuthForPartners.js +++ b/src/pages/AuthForPartners/AuthForPartners.js @@ -22,7 +22,7 @@ const AuthForPartners = () => { useEffect(()=> { if (isAuth || getToken) { - navigate('/') + navigate('/profile') } }, [getToken]); diff --git a/src/pages/PartnerBid/PartnerBid.js b/src/pages/PartnerBid/PartnerBid.js new file mode 100644 index 00000000..dbd75cf9 --- /dev/null +++ b/src/pages/PartnerBid/PartnerBid.js @@ -0,0 +1,119 @@ +import React, {useState} from 'react'; +import {Link} from "react-router-dom"; + +import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; +import {Footer} from "../../components/Footer/Footer"; + +import arrowSwitchDate from "../../images/arrowViewReport.png"; +import backEndImg from "../../images/QualificationInfo.png"; +import middle from "../../images/QualificationInfoMiddle.png"; +import personImg from "../../images/mokPerson.png" + +import './partnerBid.scss' + +export const PartnerBid = () => { + const [mokPersons] = useState([ + { + name: 'Дмитрий, PHP Back end - разработчик, Middle', + link: '', + img: personImg + }, + { + name: 'Дмитрий, PHP Back end - разработчик, Middle', + link: '', + img: personImg + }, + { + name: 'Дмитрий, PHP Back end - разработчик, Middle', + link: '', + img: personImg + } + ]) + return ( +
+ +
+

Страница заявки

+
+

PHP разработчик

+
+
+
+ arrow +
+

Дата заявки : 19 декабря 2022 года

+
+ arrow +
+
+
+ + + + + + + + + + + + + + + + + +

Требования к стеку разработчика

Квалификация

+

+ PHP приветствуется аккуратность в коде. MySQL - умение писать запросы к MySQL, + понимание как происходит запрос. Средний уровень: AJAX, JSON, общее понимание; + CSS/CSS3, HTML, Bootstrap; +

+
+
+
+ backEndImg +
+

Backend разработчик

+
+
+

+ Знание современных фреймворков Laravel, Yii 2, FuelPHP, Симфони; + Знания по разработке REST API; + Знание PHP,HTML,CSS,MySQL,Pyhton,JavaScript. +

+
+
+
+ middleImg +
+

Средний
(Middle)

+
+
+
+
+
+

Подходящие сотрудники по запросу

+
+
+ {mokPersons.map((person) => { + return
+ avatar +

{person.name}

+ + Подробнее + +
+ +
+
+ }) + } +
+
+
+
+
+ ) +}; diff --git a/src/pages/PartnerBid/partnerBid.scss b/src/pages/PartnerBid/partnerBid.scss new file mode 100644 index 00000000..05afb705 --- /dev/null +++ b/src/pages/PartnerBid/partnerBid.scss @@ -0,0 +1,440 @@ +.partnerBid { + background: #F1F1F1; + height: 100%; + min-height: 100vh; + font-family: 'LabGrotesque', sans-serif; + + .container { + max-width: 1160px; + margin-top: 23px; + + @media (max-width: 570px) { + margin-top: 0; + } + } + + &__title { + color: #000000; + font-weight: 700; + font-size: 22px; + line-height: 32px; + } + + &__qualification { + background: #FFFFFF; + border-radius: 12px; + padding: 20px 37px; + margin-top: 20px; + + h3 { + color: #000000; + font-weight: 500; + font-size: 22px; + line-height: 32px; + margin-bottom: 0; + } + } + + &__switcher { + display: flex; + margin: 30px 0; + justify-content: center; + align-items: center; + + @media (max-width: 550px) { + justify-content: space-between; + } + + .switchDate { + width: 48px; + height: 48px; + background: #8DC63F; + border-radius: 50px; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + } + + &__prev { + transform: rotate(180deg); + } + + p { + color: #000000; + font-weight: 400; + font-size: 12px; + line-height: 32px; + margin: 0 100px; + + @media (max-width: 550px) { + margin: 0; + } + } + } + + .table__wrapper { + margin: 0 -28px; + overflow: hidden; + position: relative; + + @media (max-width: 1205px) { + margin: 0; + } + + table { + width: 100%; + border-collapse: separate; + border-spacing: 28px 0; + + @media (max-width: 1205px) { + display: grid; + border-collapse: collapse; + } + + thead { + + @media (max-width: 1205px) { + display: grid; + } + tr { + + @media (max-width: 1205px) { + display: grid; + grid-template-columns: 74% calc(26% - 28px); + column-gap: 28px; + } + + @media (max-width: 900px) { + grid-template-columns: 65% calc(35% - 28px); + } + + @media (max-width: 515px) { + grid-template-columns: 65% calc(35% - 10px); + column-gap: 10px; + } + + th { + background: white; + border-radius: 12px 12px 0 0; + font-weight: 500; + font-size: 22px; + line-height: 32px; + + &:first-child { + padding: 32px 37px; + + + @media (max-width: 640px) { + padding: 15px; + } + } + + &:last-child { + padding: 32px 50px 32px 48px; + + @media (max-width: 640px) { + padding: 15px; + } + } + + p { + margin-bottom: 0; + } + + @media (max-width: 1000px) { + font-size: 15px; + line-height: 20px; + text-align: center; + } + + @media (max-width: 515px) { + font-size: 12px; + } + } + } + } + + tbody { + @media (max-width: 1205px) { + display: grid; + } + tr { + + @media (max-width: 1205px) { + display: grid; + grid-template-columns: 74% calc(26% - 28px); + column-gap: 28px; + } + + @media (max-width: 900px) { + grid-template-columns: 65% calc(35% - 28px); + } + + @media (max-width: 515px) { + column-gap: 10px; + grid-template-columns: 65% calc(35% - 10px); + } + td { + background: white; + p { + margin-bottom: 0; + color: #000000; + font-weight: 400; + font-size: 14px; + line-height: 24px; + + @media (max-width: 515px) { + font-size: 12px; + line-height: 18px; + } + + @media (max-width: 450px) { + font-size: 10px; + } + } + &:first-child { + padding: 0 27px 35px 39px; + + @media (max-width: 580px) { + padding: 15px; + } + } + + &:last-child { + padding: 0 45px 35px; + + @media (max-width: 580px) { + padding: 15px; + } + } + + .qualification__info { + display: flex; + align-items: center; + + @media (max-width: 1000px) { + flex-direction: column; + row-gap: 5px; + + p { + margin: 0 !important; + text-align: center; + } + } + + .img__wrapper { + min-width: 48px; + height: 48px; + background: #8DC63F; + border-radius: 50px; + display: flex; + justify-content: center; + align-items: center; + + @media (max-width: 515px) { + min-width: 25px; + height: 25px; + + img { + width: 17px; + height: 17px; + } + } + } + + p { + font-weight: 400; + font-size: 14px; + line-height: 18px; + margin-left: 25px; + + @media (max-width: 515px) { + font-size: 12px; + line-height: 18px; + } + } + + .middle { + color: #406128; + font-weight: 900; + font-size: 14px; + line-height: 18px; + + @media (max-width: 515px) { + font-size: 12px; + line-height: 18px; + } + } + } + } + + &:last-child { + td { + border-radius: 0 0 12px 12px; + } + } + } + } + } + } + + &__suitable { + &__title { + background: #E1FCCF; + border-radius: 12px 12px 0px 0px; + margin-top: 48px; + padding: 18px 37px; + position: relative; + + p { + color: #000000; + font-weight: 500; + font-size: 22px; + line-height: 32px; + + @media (max-width: 540px) { + font-size: 15px; + height: 20px; + } + } + } + + &__persons { + display: flex; + flex-direction: column; + row-gap: 18px; + position: relative; + top: -15px; + } + + &__person { + display: flex; + padding: 21px 45px 19px; + align-items: center; + background: #FFFFFF; + border-radius: 12px; + + img { + width: 88px; + height: 88px; + } + + p { + color: #000000; + font-weight: 500; + font-size: 16px; + line-height: 32px; + margin-left: 60px; + position: relative; + + &:after { + content: ""; + position: absolute; + background: #52B709; + border-radius: 12px; + width: 70%; + height: 8px; + bottom: -14px; + left: 0; + } + } + + &__more { + padding: 9px 45px; + background: #52B709; + border-radius: 44px; + color: #FFFFFF; + font-weight: 500; + font-size: 16px; + line-height: 32px; + margin-left: 200px; + + &:hover { + color: white; + text-decoration: none; + } + } + + &__info { + width: 24px; + height: 24px; + box-shadow: 0px 3px 2px -2px rgba(0, 0, 0, 0.06), 0px 5px 3px -2px rgba(0, 0, 0, 0.02); + border-radius: 6px; + border: 1px solid #DDDDDD; + cursor: pointer; + position: relative; + display: flex; + align-items: center; + justify-content: center; + margin-left: 60px; + + &:before { + content: "..."; + color: #6F6F6F; + font-size: 25px; + position: relative; + top: -6px; + } + } + + @media (max-width: 1100px) { + justify-content: space-between; + p { + margin-left: 0; + } + + &__more { + margin-left: 0; + } + + &__info { + margin-left: 0; + } + } + + @media (max-width: 825px) { + padding: 15px; + } + + @media (max-width: 750px) { + p { + max-width: 220px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + margin-bottom: 0; + } + } + + @media (max-width: 575px) { + img { + width: 35px; + height: 35px; + } + } + + @media (max-width: 630px) { + &__more { + padding: 5px 20px; + } + } + + @media (max-width: 510px) { + p { + font-size: 12px; + max-width: 150px; + } + + &__more { + font-size: 12px; + padding: 2px 10px; + } + } + } + } + + footer { + margin-top: 70px; + } +} diff --git a/src/pages/PartnerRequests/PartnerRequests.js b/src/pages/PartnerRequests/PartnerRequests.js index 7822b64d..4ff96d3e 100644 --- a/src/pages/PartnerRequests/PartnerRequests.js +++ b/src/pages/PartnerRequests/PartnerRequests.js @@ -34,7 +34,7 @@ export const PartnerRequests = () => {
{ items.map((item, index) => { - return + return

{item.name}

diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js index ce887a34..44d329f8 100644 --- a/src/pages/Profile/Profile.js +++ b/src/pages/Profile/Profile.js @@ -22,7 +22,7 @@ import './profile.scss' export const Profile = () => { const profileInfo = useSelector(getProfileInfo); - const [user] = useState('developer') + const [user] = useState('partner') const [profileItemsInfo] = useState({ developer: [ { From 31cc5acbe1ddd7b0eb0f1de67aa299aa523489f3 Mon Sep 17 00:00:00 2001 From: M1kola Date: Mon, 27 Feb 2023 16:50:32 +0300 Subject: [PATCH 2/2] partner-personal-area --- src/App.js | 5 +- src/components/AuthBox/AuthBox.js | 1 + src/components/Calendar/Calendar.js | 5 +- src/components/Candidate/Candidate.js | 5 +- .../ProfileBreadcrumbs/ProfileBreadcrumbs.js | 16 ++++++ .../profileBreadcrumbs.scss | 50 ++++++++++++++++++ .../ProfileCalendar/ProfileCalendar.js | 7 ++- src/components/ProfileHeader/ProfileHeader.js | 2 +- src/components/ReportForm/ReportForm.js | 11 +++- src/images/BreadcrumbsArrow.png | Bin 0 -> 187 bytes src/pages/FormPage/FormPage.js | 5 +- src/pages/Home/Home.js | 4 ++ .../PartnerAddRequest/PartnerAddRequest.js | 11 ++++ src/pages/PartnerBid/PartnerBid.js | 16 ++++-- src/pages/PartnerRequests/PartnerRequests.js | 11 +++- src/pages/Profile/Profile.js | 4 +- src/pages/Summary/Summary.js | 10 ++++ src/pages/ViewReport/ViewReport.js | 10 +++- 18 files changed, 157 insertions(+), 16 deletions(-) create mode 100644 src/components/ProfileBreadcrumbs/ProfileBreadcrumbs.js create mode 100644 src/components/ProfileBreadcrumbs/profileBreadcrumbs.scss create mode 100644 src/images/BreadcrumbsArrow.png diff --git a/src/App.js b/src/App.js index cbd1e31b..75176d24 100644 --- a/src/App.js +++ b/src/App.js @@ -39,8 +39,6 @@ const App = () => { - }/> - }/> }/> @@ -61,6 +59,7 @@ const App = () => { }/> + }/> }/> }/> }/> @@ -72,7 +71,7 @@ const App = () => { }/> - }/> + }/> diff --git a/src/components/AuthBox/AuthBox.js b/src/components/AuthBox/AuthBox.js index 40011dfb..d07661e4 100644 --- a/src/components/AuthBox/AuthBox.js +++ b/src/components/AuthBox/AuthBox.js @@ -77,6 +77,7 @@ export const AuthBox = ({title, altTitle, roleChangeLink}) => { localStorage.setItem('auth_token', res.access_token); localStorage.setItem('id', res.id); localStorage.setItem('cardId', res.card_id); + localStorage.setItem('role_status', res.status); localStorage.setItem( 'access_token_expired_at', res.access_token_expired_at diff --git a/src/components/Calendar/Calendar.js b/src/components/Calendar/Calendar.js index 09d26c94..9b35e7be 100644 --- a/src/components/Calendar/Calendar.js +++ b/src/components/Calendar/Calendar.js @@ -1,6 +1,6 @@ import React, {useEffect, useState} from 'react' import {useSelector} from 'react-redux' -import {Link, useNavigate} from 'react-router-dom' +import {Link, Navigate, useNavigate} from 'react-router-dom' import CalendarComponent from './CalendarComponent' import {currentMonth} from './calendarHelper' @@ -16,6 +16,9 @@ import {urlForLocal} from "../../helper"; const Calendar = () => { + if(localStorage.getItem('role_status') !== '18') { + return + } const candidateForCalendar = useSelector(selectCurrentCandidate); diff --git a/src/components/Candidate/Candidate.js b/src/components/Candidate/Candidate.js index 4dbdd427..f0c31be6 100644 --- a/src/components/Candidate/Candidate.js +++ b/src/components/Candidate/Candidate.js @@ -1,5 +1,5 @@ import React, {useEffect, useState} from 'react' -import {useParams, Link, useNavigate} from 'react-router-dom' +import {useParams, Link, useNavigate, Navigate} from 'react-router-dom' import {useSelector, useDispatch} from 'react-redux' import SkillSection from '../SkillSection/SkillSection' @@ -23,6 +23,9 @@ import {Header} from "../Header/Header"; const Candidate = () => { + if(localStorage.getItem('role_status') !== '18') { + return + } const {id: candidateId} = useParams(); const navigate = useNavigate(); diff --git a/src/components/ProfileBreadcrumbs/ProfileBreadcrumbs.js b/src/components/ProfileBreadcrumbs/ProfileBreadcrumbs.js new file mode 100644 index 00000000..7ef5f280 --- /dev/null +++ b/src/components/ProfileBreadcrumbs/ProfileBreadcrumbs.js @@ -0,0 +1,16 @@ +import React from 'react' +import {Link} from "react-router-dom"; + +import './profileBreadcrumbs.scss' + +export const ProfileBreadcrumbs = ({ links }) => { + return ( +
+ {links.map((link, index) => { + return {link.name} + }) + + } +
+ ) +} diff --git a/src/components/ProfileBreadcrumbs/profileBreadcrumbs.scss b/src/components/ProfileBreadcrumbs/profileBreadcrumbs.scss new file mode 100644 index 00000000..9992152d --- /dev/null +++ b/src/components/ProfileBreadcrumbs/profileBreadcrumbs.scss @@ -0,0 +1,50 @@ +.profileBreadcrumbs { + display: flex; + margin-bottom: 12px; + + @media (max-width: 570px) { + margin-top: 15px; + } + + a { + color: #5B6871; + font-weight: 400; + font-size: 12px; + line-height: 16px; + transition: 0.3s all ease; + position: relative; + margin-right: 20px; + display: flex; + align-items: center; + + @media (max-width: 525px) { + font-size: 10px; + } + + @media (max-width: 455px) { + font-size: 9px; + } + + &:hover { + text-decoration: none; + color: #000000; + } + + &:after { + content: ''; + background-image: url("../../images/BreadcrumbsArrow.png"); + background-repeat: no-repeat; + width: 7px; + height:10px; + position: absolute; + right: -14px; + } + + &:last-child { + margin-right: 0; + &:after { + background: none; + } + } + } +} diff --git a/src/components/ProfileCalendar/ProfileCalendar.js b/src/components/ProfileCalendar/ProfileCalendar.js index 6fd2dcbe..a81a2325 100644 --- a/src/components/ProfileCalendar/ProfileCalendar.js +++ b/src/components/ProfileCalendar/ProfileCalendar.js @@ -2,12 +2,13 @@ import React, { useEffect, useState } from 'react' import {useDispatch, useSelector} from 'react-redux' import {getReports} from '../Calendar/calendarHelper' -import { Link } from 'react-router-dom' +import {Link, Navigate} from 'react-router-dom' import moment from "moment"; import {ProfileCalendarComponent} from "./ProfileCalendarComponent"; import {Loader} from "../Loader/Loader"; import {ProfileHeader} from "../ProfileHeader/ProfileHeader"; +import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs" import { Footer } from '../Footer/Footer' import {urlForLocal} from "../../helper"; @@ -21,6 +22,9 @@ import './profileCalendar.scss' export const ProfileCalendar = () => { + if(localStorage.getItem('role_status') === '18') { + return + } const dispatch = useDispatch(); const profileInfo = useSelector(getProfileInfo) const requestDates = useSelector(getRequestDates) @@ -62,6 +66,7 @@ export const ProfileCalendar = () => {
+

Ваши отчеты

diff --git a/src/components/ProfileHeader/ProfileHeader.js b/src/components/ProfileHeader/ProfileHeader.js index ae91b927..845b284a 100644 --- a/src/components/ProfileHeader/ProfileHeader.js +++ b/src/components/ProfileHeader/ProfileHeader.js @@ -21,7 +21,7 @@ export const ProfileHeader = () => { const userRole = useSelector(getRole); const profileInfo = useSelector(getProfileInfo); - const [user] = useState('partner') + const [user] = useState(localStorage.getItem('role_status') === '18' ? 'partner' : 'developer') const [navInfo] = useState({ developer: [ { diff --git a/src/components/ReportForm/ReportForm.js b/src/components/ReportForm/ReportForm.js index 77163999..02dc26cd 100644 --- a/src/components/ReportForm/ReportForm.js +++ b/src/components/ReportForm/ReportForm.js @@ -1,15 +1,15 @@ import React, {useState, useEffect} from 'react' import {useSelector} from 'react-redux' -import {Link, useNavigate} from 'react-router-dom' +import {Link, Navigate, useNavigate} from 'react-router-dom' import DatePicker, { registerLocale } from "react-datepicker" import {getCorrectDate, getCreatedDate} from '../Calendar/calendarHelper' import ru from "date-fns/locale/ru" registerLocale("ru", ru); import {Loader} from '../Loader/Loader' -import {currentMonthAndDay} from '../Calendar/calendarHelper' import {Footer} from "../Footer/Footer"; import {ProfileHeader} from "../ProfileHeader/ProfileHeader"; +import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs" import {apiRequest} from "../../api/request"; @@ -25,6 +25,9 @@ import './reportForm.scss' import "react-datepicker/dist/react-datepicker.css"; const ReportForm = () => { + if(localStorage.getItem('role_status') === '18') { + return + } const navigate= useNavigate(); const reportDate = useSelector(getReportDate); @@ -96,6 +99,10 @@ const ReportForm = () => {
+

Ваши отчеты - добавить отчет

diff --git a/src/images/BreadcrumbsArrow.png b/src/images/BreadcrumbsArrow.png new file mode 100644 index 0000000000000000000000000000000000000000..a518b4edb969aad9739a8c700c2f22a60ae6525a GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)L!3HEN&baUbDb50q$YKTtZeb8+WSBKa0w~B> z9OUlAu$e073tP2 emevnhTbU-jHoX5-pe6xmHiM_DpUXO@geCxmJvkWw literal 0 HcmV?d00001 diff --git a/src/pages/FormPage/FormPage.js b/src/pages/FormPage/FormPage.js index 8d3e757f..6675cc81 100644 --- a/src/pages/FormPage/FormPage.js +++ b/src/pages/FormPage/FormPage.js @@ -1,6 +1,6 @@ import React, {useEffect} from 'react' import {useDispatch, useSelector} from 'react-redux' -import {useParams, useNavigate} from 'react-router-dom' +import {useParams, useNavigate, Navigate} from 'react-router-dom' import SVG from 'react-inlinesvg' import Form from '../../components/Form/Form' @@ -22,6 +22,9 @@ import {urlForLocal} from "../../helper"; import './formPage.scss' const FormPage = () => { + if(localStorage.getItem('role_status') !== '18') { + return + } const params = useParams(); const navigate = useNavigate(); const dispatch = useDispatch(); diff --git a/src/pages/Home/Home.js b/src/pages/Home/Home.js index 0ae31db8..905b5543 100644 --- a/src/pages/Home/Home.js +++ b/src/pages/Home/Home.js @@ -9,9 +9,13 @@ import {profiles, tags} from '../../redux/outstaffingSlice' import {Header} from "../../components/Header/Header"; import {apiRequest} from "../../api/request"; +import {Navigate} from "react-router-dom"; const Home = () => { + if(localStorage.getItem('role_status') !== '18') { + return + } const [isLoadingMore, setIsLoadingMore] = useState(false); const [index, setIndex] = useState(4); diff --git a/src/pages/PartnerAddRequest/PartnerAddRequest.js b/src/pages/PartnerAddRequest/PartnerAddRequest.js index 3ea3ad4a..a81d9dfd 100644 --- a/src/pages/PartnerAddRequest/PartnerAddRequest.js +++ b/src/pages/PartnerAddRequest/PartnerAddRequest.js @@ -1,17 +1,28 @@ import React from 'react'; import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; +import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs" import {Footer} from "../../components/Footer/Footer"; import arrowDown from "../../images/selectArrow.png" import './partnerAddRequest.scss' +import {Navigate} from "react-router-dom"; export const PartnerAddRequest = () => { + if(localStorage.getItem('role_status') !== '18') { + return + } return (
+

Страница добавления заявки

diff --git a/src/pages/PartnerBid/PartnerBid.js b/src/pages/PartnerBid/PartnerBid.js index dbd75cf9..9b1326bb 100644 --- a/src/pages/PartnerBid/PartnerBid.js +++ b/src/pages/PartnerBid/PartnerBid.js @@ -1,7 +1,8 @@ import React, {useState} from 'react'; -import {Link} from "react-router-dom"; +import {Link, Navigate} from "react-router-dom"; import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; +import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs" import {Footer} from "../../components/Footer/Footer"; import arrowSwitchDate from "../../images/arrowViewReport.png"; @@ -12,6 +13,9 @@ import personImg from "../../images/mokPerson.png" import './partnerBid.scss' export const PartnerBid = () => { + if(localStorage.getItem('role_status') !== '18') { + return + } const [mokPersons] = useState([ { name: 'Дмитрий, PHP Back end - разработчик, Middle', @@ -33,6 +37,12 @@ export const PartnerBid = () => {
+

Страница заявки

PHP разработчик

@@ -97,8 +107,8 @@ export const PartnerBid = () => {

Подходящие сотрудники по запросу

- {mokPersons.map((person) => { - return
+ {mokPersons.map((person, index) => { + return
avatar

{person.name}

diff --git a/src/pages/PartnerRequests/PartnerRequests.js b/src/pages/PartnerRequests/PartnerRequests.js index 4ff96d3e..01e3b15b 100644 --- a/src/pages/PartnerRequests/PartnerRequests.js +++ b/src/pages/PartnerRequests/PartnerRequests.js @@ -1,12 +1,16 @@ import React, {useState} from 'react'; -import {Link} from "react-router-dom"; +import {Link, Navigate} from "react-router-dom"; import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; +import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs" import {Footer} from "../../components/Footer/Footer"; import './partnerRequests.scss' export const PartnerRequests = () => { + if(localStorage.getItem('role_status') !== '18') { + return + } const [items] = useState([ { name: 'PHP разработчик ', @@ -29,6 +33,11 @@ export const PartnerRequests = () => {
+

Запросы

diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js index 44d329f8..8b96cca2 100644 --- a/src/pages/Profile/Profile.js +++ b/src/pages/Profile/Profile.js @@ -3,6 +3,7 @@ import {useSelector} from "react-redux"; import {Link} from "react-router-dom"; import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; +import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs" import {Footer} from "../../components/Footer/Footer"; import {getProfileInfo} from "../../redux/outstaffingSlice"; @@ -22,7 +23,7 @@ import './profile.scss' export const Profile = () => { const profileInfo = useSelector(getProfileInfo); - const [user] = useState('partner') + const [user] = useState(localStorage.getItem('role_status') === '18' ? 'partner' : 'developer') const [profileItemsInfo] = useState({ developer: [ { @@ -94,6 +95,7 @@ export const Profile = () => {
+

{user === 'developer' ?

Добрый день, 

{profileInfo.fio}
diff --git a/src/pages/Summary/Summary.js b/src/pages/Summary/Summary.js index 48bf6294..c496e028 100644 --- a/src/pages/Summary/Summary.js +++ b/src/pages/Summary/Summary.js @@ -2,6 +2,7 @@ import React, {useEffect, useState} from 'react'; import {useSelector} from "react-redux"; import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; import {getProfileInfo} from "../../redux/outstaffingSlice"; +import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs" import {Footer} from '../../components/Footer/Footer' import {transformHtml, urlForLocal} from "../../helper"; @@ -11,8 +12,12 @@ import gitImgItem from "../../images/gitItemImg.png" import './summary.scss' import {apiRequest} from "../../api/request"; +import {Navigate} from "react-router-dom"; export const Summary = () => { + if(localStorage.getItem('role_status') === '18') { + return + } const profileInfo = useSelector(getProfileInfo); const [openGit, setOpenGit] = useState(false); const [gitInfo, setGitInfo] = useState([]); @@ -26,6 +31,11 @@ export const Summary = () => {
+

Ваше резюме {openGit && - Git}

{openGit &&
setOpenGit(false)}> arrow diff --git a/src/pages/ViewReport/ViewReport.js b/src/pages/ViewReport/ViewReport.js index 99833f7f..4c6fbed6 100644 --- a/src/pages/ViewReport/ViewReport.js +++ b/src/pages/ViewReport/ViewReport.js @@ -1,11 +1,12 @@ import React, {useEffect, useState} from 'react' -import {Link} from "react-router-dom"; +import {Link, Navigate} from "react-router-dom"; import {useSelector} from "react-redux"; import {getReportDate} from "../../redux/reportSlice"; import {Loader} from "../../components/Loader/Loader" import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; +import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs" import {Footer} from "../../components/Footer/Footer"; import arrow from "../../images/right-arrow.png"; @@ -16,6 +17,9 @@ import {getCorrectDate, getCreatedDate} from '../../components/Calendar/calendar import './viewReport.scss' export const ViewReport = () => { + if(localStorage.getItem('role_status') === '18') { + return + } const reportDate = useSelector(getReportDate); const [taskText, setTaskText] = useState([]); @@ -76,6 +80,10 @@ export const ViewReport = () => {
+

Ваши отчеты - просмотр отчета за день

arrow

Вернуться