From 850b0d1bb64751bac7291f6660993d511a2f4f43 Mon Sep 17 00:00:00 2001 From: M1kola Date: Thu, 23 Mar 2023 14:00:34 +0300 Subject: [PATCH] partner employees --- src/App.js | 6 +- src/components/ProfileHeader/ProfileHeader.js | 6 +- .../PartnerEmployees/PartnerEmployees.js | 75 ++++++++ src/pages/PartnerEmployees/avatarMok.png | Bin 0 -> 3358 bytes src/pages/PartnerEmployees/emplInfo.png | Bin 0 -> 596 bytes .../PartnerEmployees/partnerEmployees.scss | 170 ++++++++++++++++++ src/pages/PartnerSettings/PartnerSettings.js | 2 +- .../PartnerСategories.js} | 76 ++++++-- .../images/PersonalAdmin.png | Bin .../images/PersonalArchitecture.png | Bin .../images/PersonalCopy.png | Bin .../images/PersonalDesign.png | Bin .../images/PersonalFrontend.png | Bin .../images/PersonalMng.png | Bin .../images/PersonalSMM.png | Bin .../images/PersonalTesters.png | Bin .../images/personalBackEnd.png | Bin .../partnerСategories.scss} | 2 +- src/pages/Profile/Profile.js | 2 +- src/redux/outstaffingSlice.js | 9 +- 20 files changed, 322 insertions(+), 26 deletions(-) create mode 100644 src/pages/PartnerEmployees/PartnerEmployees.js create mode 100644 src/pages/PartnerEmployees/avatarMok.png create mode 100644 src/pages/PartnerEmployees/emplInfo.png create mode 100644 src/pages/PartnerEmployees/partnerEmployees.scss rename src/pages/{PartnerPersonalInfo/PartnerPersonalInfo.js => PartnerСategories/PartnerСategories.js} (66%) rename src/pages/{PartnerPersonalInfo => PartnerСategories}/images/PersonalAdmin.png (100%) rename src/pages/{PartnerPersonalInfo => PartnerСategories}/images/PersonalArchitecture.png (100%) rename src/pages/{PartnerPersonalInfo => PartnerСategories}/images/PersonalCopy.png (100%) rename src/pages/{PartnerPersonalInfo => PartnerСategories}/images/PersonalDesign.png (100%) rename src/pages/{PartnerPersonalInfo => PartnerСategories}/images/PersonalFrontend.png (100%) rename src/pages/{PartnerPersonalInfo => PartnerСategories}/images/PersonalMng.png (100%) rename src/pages/{PartnerPersonalInfo => PartnerСategories}/images/PersonalSMM.png (100%) rename src/pages/{PartnerPersonalInfo => PartnerСategories}/images/PersonalTesters.png (100%) rename src/pages/{PartnerPersonalInfo => PartnerСategories}/images/personalBackEnd.png (100%) rename src/pages/{PartnerPersonalInfo/parthnerPersonalInfo.scss => PartnerСategories/partnerСategories.scss} (99%) diff --git a/src/App.js b/src/App.js index 75b8d6dc..2bec9c98 100644 --- a/src/App.js +++ b/src/App.js @@ -25,8 +25,9 @@ import { PartnerSettings } from "./pages/PartnerSettings/PartnerSettings" import {PartnerRequests} from './pages/PartnerRequests/PartnerRequests' import {PartnerAddRequest} from './pages/PartnerAddRequest/PartnerAddRequest' import {PartnerBid} from './pages/PartnerBid/PartnerBid' -import {PartnerPersonalInfo} from "./pages/PartnerPersonalInfo/PartnerPersonalInfo"; +import {PartnerCategories} from "./pages/PartnerСategories/PartnerСategories"; import {PartnerTreaties} from "./pages/PartnerTreaties/PartnerTreaties"; +import {PartnerEmployees} from "./pages/PartnerEmployees/PartnerEmployees"; import './fonts/stylesheet.css' import 'bootstrap/dist/css/bootstrap.min.css' @@ -71,8 +72,9 @@ const App = () => { }/> }/> }/> - }/> + }/> }/> + }/> }/> diff --git a/src/components/ProfileHeader/ProfileHeader.js b/src/components/ProfileHeader/ProfileHeader.js index 5be4cf30..8c165ad9 100644 --- a/src/components/ProfileHeader/ProfileHeader.js +++ b/src/components/ProfileHeader/ProfileHeader.js @@ -46,12 +46,16 @@ export const ProfileHeader = () => { }, ], partner: [ + { + path: '/', + name: 'Каталог' + }, { path: '/requests', name: 'Запросы' }, { - path: '/employees', + path: '/categories', name: 'Персонал' }, { diff --git a/src/pages/PartnerEmployees/PartnerEmployees.js b/src/pages/PartnerEmployees/PartnerEmployees.js new file mode 100644 index 00000000..3d86e3fa --- /dev/null +++ b/src/pages/PartnerEmployees/PartnerEmployees.js @@ -0,0 +1,75 @@ +import React from 'react'; +import {Link, Navigate} from "react-router-dom"; +import {useSelector} from "react-redux"; +import {getPartnerEmployees} from "../../redux/outstaffingSlice"; + +import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; +import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs" +import {Footer} from "../../components/Footer/Footer"; + +import imgInfo from "./emplInfo.png" +import rightArrow from "../../images/arrowRight.png" + +import "./partnerEmployees.scss" + +export const PartnerEmployees = () => { + const partnerEmployees = useSelector(getPartnerEmployees); + if(localStorage.getItem('role_status') !== '18' || !partnerEmployees.length) { + console.log(partnerEmployees.length) + return + } + return( +
+ +
+ +

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

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

{person.name}

+
+
+
+
{person.qualification}
+ {person.level} +
+ img +

Данные и резюме

+
+ arrow +
+
+
+
+ Проект: +
{person.project}
+
+
+

Открытые задачи

+ {person.tasks_in_progress} +
+
+

Отработанных часов в марте

+ {person.month_hours} +
+
+
+
+
+ }) + + } +
+
+
+
+ ) +} diff --git a/src/pages/PartnerEmployees/avatarMok.png b/src/pages/PartnerEmployees/avatarMok.png new file mode 100644 index 0000000000000000000000000000000000000000..3dad1696ca1e01b82a11f802422574dfcf70dd8b GIT binary patch literal 3358 zcmV+(4dL>MP)&?ptP(nd~bG2@)EJQ9w`xwF)Q*h?QCjr4^xgTnbiCId!Y2Qjhkya1XsAv`03Mqs|f&>U5+a!}cv%L3i|N8=2CzmWCN0Yjoy4kk!}oX`n6!v2+oa6&f(-F!`g&VFUzb3oE?>99Ab>`G#t{= zkqHT2^dlJh0Vk@eVl_iu6x5A7h{$l#J^_({p^G-nf3+Kl1c5rQ z2m8PL0*ChP#)Y$I(b&)cL(^J2B@;xsTu4eu!(~H3NU37nXZx_%-8A(j^6!!Jq}3@y5$bQLt|xfSYdYs>ABlZo6rtCrJz+tn}R1XQOJ>t0)pPd9I} z>Ev&4b z*73VGt-h<_@rH({?985qdN1BuxdO8C{bXxGmsQU_3$Lfrvb-K-ORG7LyYyWf!6v_V zo(AJ;ScI_HmiN|298j#n-_nBZn>J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9b6I6BH(dub7yjmTOQZkcxtI6Hd-j|+F7X}+WFBah>%nw7G|}wOt8{s z$Hq3X@f(bdXyFH1s01C~Ch;Sin7IC%ot=5}n>TOXdkiiK8|NCij|huPIjIZ z0L)+%N;SN(DKF*&Qz3tKEl$plqjF(;u+R&${sI*w4Bgi;^j~E%88taSqJ$9`P_01L5 zHWFa`A?_JM*(rs|Lvzd1I%AM_Y;UtPMDcK0P;4tfp9H)}7@Cg)sJ;CE3KiLy0aZS* z?6XbPWj})$4~gDjq{!^8{kdX%P&7Ous~)JkMt~BO-Ptt1D6QRSSx-c7VBD!@G91hr zD;5X;5^?H==EGpD|0Pc-@rwb$0jiB2;PyGl^fD7p3vl4s9^yOzL*3JQRRO^GP0dI} zoC1^9!O812t>ODBrTdhoSAQi?T+_cDX}bRp!GyahCCPPDT3acUx~3Cg3N+MxIN$xq iWA187^rWbuQZ|p9s;;d#z||fA0000 {
diff --git a/src/pages/PartnerPersonalInfo/PartnerPersonalInfo.js b/src/pages/PartnerСategories/PartnerСategories.js similarity index 66% rename from src/pages/PartnerPersonalInfo/PartnerPersonalInfo.js rename to src/pages/PartnerСategories/PartnerСategories.js index 55867f2d..caaed3b2 100644 --- a/src/pages/PartnerPersonalInfo/PartnerPersonalInfo.js +++ b/src/pages/PartnerСategories/PartnerСategories.js @@ -1,10 +1,14 @@ import React, {useState} from 'react'; import {Link} from "react-router-dom"; +import {Navigate} from "react-router-dom"; +import {useDispatch} from "react-redux"; import {ProfileHeader} from "../../components/ProfileHeader/ProfileHeader"; import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs" import {Footer} from "../../components/Footer/Footer"; +import {setPartnerEmployees} from "../../redux/outstaffingSlice"; + import BackEndImg from "./images/personalBackEnd.png" import FrontendImg from "./images/PersonalFrontend.png" import ArchitectureImg from "./images/PersonalArchitecture.png" @@ -15,12 +19,12 @@ import ManageImg from "./images/PersonalMng.png" import CopyImg from "./images/PersonalCopy.png" import SmmImg from "./images/PersonalSMM.png" import rightArrow from "../../images/arrowRight.png" +import avatarImg from "../PartnerEmployees/avatarMok.png"; -import {Navigate} from "react-router-dom"; +import "./partnerСategories.scss" -import "./parthnerPersonalInfo.scss" - -export const PartnerPersonalInfo = () => { +export const PartnerCategories = () => { + const dispatch = useDispatch(); if(localStorage.getItem('role_status') !== '18') { return } @@ -28,81 +32,117 @@ export const PartnerPersonalInfo = () => { const [personalInfoItems] = useState([ { title: 'Backend разработчики', - link: '/profile', + link: '/profile/categories/employees', description: 'Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript', available: true, img: BackEndImg }, { title: 'Frontend разработчики', - link: '/profile', + link: '/profile/categories/employees', description: 'Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript', available: true, img: FrontendImg }, { title: 'Архитектура проектов', - link: '/profile', + link: '/profile/categories/employees', description: 'Потоки данных ER ERP CRM CQRS UML BPMN', available: true, img: ArchitectureImg }, { title: 'Дизайн проектов', - link: '/profile', + link: '/profile/categories/employees', description: 'Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript', available: true, img: DesignImg }, { title: 'Тестирование проектов', - link: '/profile', + link: '/profile/add-request', description: 'SQL Postman TestRail Kibana Ручное тестирование', available: false, img: TestImg }, { title: 'Администрирование проектов', - link: '/profile', + link: '/profile/add-request', description: 'DevOps ELK Kubernetes Docker Bash Apache Oracle Git', available: false, img: AdminImg }, { title: 'Управление проектом', - link: '/profile', + link: '/profile/add-request', description: 'Scrum Kanban Agile Miro CustDev', available: false, img: ManageImg }, { title: 'Копирайтинг проектов', - link: '/profile', + link: '/profile/add-request', description: 'Теги Заголовок H1 Дескриптор Абзац Сценарий', available: false, img: CopyImg }, { title: 'Реклама и SMM', - link: '/profile', + link: '/profile/add-request', description: 'Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript', available: false, img: SmmImg }, ]) + + const [mokPersons] = useState([ + { + personAvatar: avatarImg, + name: "Макаренко Дмитрий", + qualification: "PHP Backend - разработчик", + level: "Middle", + project: "Админка НВД Консалтинг", + tasks_in_progress: 5, + month_hours: 140, + id: 1 + }, + { + personAvatar: avatarImg, + name: "Макаренко Дмитрий", + qualification: "PHP Backend - разработчик", + level: "Middle", + project: "Админка НВД Консалтинг", + tasks_in_progress: 5, + month_hours: 140, + id: 2 + }, + { + personAvatar: avatarImg, + name: "Макаренко Дмитрий", + qualification: "PHP Backend - разработчик", + level: "Middle", + project: "Админка НВД Консалтинг", + tasks_in_progress: 5, + month_hours: 140, + id: 3 + }, + ]) return ( -
+
-

Данные персонала

-
+

Данные персонала

+
{personalInfoItems.map((item, index) => { - return + return { + dispatch(setPartnerEmployees(mokPersons)) + }}>
{item.title}

{item.title}

diff --git a/src/pages/PartnerPersonalInfo/images/PersonalAdmin.png b/src/pages/PartnerСategories/images/PersonalAdmin.png similarity index 100% rename from src/pages/PartnerPersonalInfo/images/PersonalAdmin.png rename to src/pages/PartnerСategories/images/PersonalAdmin.png diff --git a/src/pages/PartnerPersonalInfo/images/PersonalArchitecture.png b/src/pages/PartnerСategories/images/PersonalArchitecture.png similarity index 100% rename from src/pages/PartnerPersonalInfo/images/PersonalArchitecture.png rename to src/pages/PartnerСategories/images/PersonalArchitecture.png diff --git a/src/pages/PartnerPersonalInfo/images/PersonalCopy.png b/src/pages/PartnerСategories/images/PersonalCopy.png similarity index 100% rename from src/pages/PartnerPersonalInfo/images/PersonalCopy.png rename to src/pages/PartnerСategories/images/PersonalCopy.png diff --git a/src/pages/PartnerPersonalInfo/images/PersonalDesign.png b/src/pages/PartnerСategories/images/PersonalDesign.png similarity index 100% rename from src/pages/PartnerPersonalInfo/images/PersonalDesign.png rename to src/pages/PartnerСategories/images/PersonalDesign.png diff --git a/src/pages/PartnerPersonalInfo/images/PersonalFrontend.png b/src/pages/PartnerСategories/images/PersonalFrontend.png similarity index 100% rename from src/pages/PartnerPersonalInfo/images/PersonalFrontend.png rename to src/pages/PartnerСategories/images/PersonalFrontend.png diff --git a/src/pages/PartnerPersonalInfo/images/PersonalMng.png b/src/pages/PartnerСategories/images/PersonalMng.png similarity index 100% rename from src/pages/PartnerPersonalInfo/images/PersonalMng.png rename to src/pages/PartnerСategories/images/PersonalMng.png diff --git a/src/pages/PartnerPersonalInfo/images/PersonalSMM.png b/src/pages/PartnerСategories/images/PersonalSMM.png similarity index 100% rename from src/pages/PartnerPersonalInfo/images/PersonalSMM.png rename to src/pages/PartnerСategories/images/PersonalSMM.png diff --git a/src/pages/PartnerPersonalInfo/images/PersonalTesters.png b/src/pages/PartnerСategories/images/PersonalTesters.png similarity index 100% rename from src/pages/PartnerPersonalInfo/images/PersonalTesters.png rename to src/pages/PartnerСategories/images/PersonalTesters.png diff --git a/src/pages/PartnerPersonalInfo/images/personalBackEnd.png b/src/pages/PartnerСategories/images/personalBackEnd.png similarity index 100% rename from src/pages/PartnerPersonalInfo/images/personalBackEnd.png rename to src/pages/PartnerСategories/images/personalBackEnd.png diff --git a/src/pages/PartnerPersonalInfo/parthnerPersonalInfo.scss b/src/pages/PartnerСategories/partnerСategories.scss similarity index 99% rename from src/pages/PartnerPersonalInfo/parthnerPersonalInfo.scss rename to src/pages/PartnerСategories/partnerСategories.scss index 3caf5003..d26d118a 100644 --- a/src/pages/PartnerPersonalInfo/parthnerPersonalInfo.scss +++ b/src/pages/PartnerСategories/partnerСategories.scss @@ -1,4 +1,4 @@ -.personalInfo { +.partnerCategories { background: #F1F1F1; height: 100%; min-height: 100vh; diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js index bd5cfb5e..aa163181 100644 --- a/src/pages/Profile/Profile.js +++ b/src/pages/Profile/Profile.js @@ -65,7 +65,7 @@ export const Profile = () => { description: 'У вас 2 вакансии
открытые от лица компании' }, { - path: '/employees', + path: '/categories', img: summaryIcon, title: 'Данные персонала', description: 'Наши специалисты
уже работающие у вас' diff --git a/src/redux/outstaffingSlice.js b/src/redux/outstaffingSlice.js index f48d9711..b2c02687 100644 --- a/src/redux/outstaffingSlice.js +++ b/src/redux/outstaffingSlice.js @@ -9,7 +9,8 @@ const initialState = { auth: false, positionId: null, profileInfo: {}, - reportsDates: '' + reportsDates: '', + partnerEmployees: [] }; export const outstaffingSlice = createSlice({ @@ -46,10 +47,13 @@ export const outstaffingSlice = createSlice({ setReportsDates: (state, action) => { state.reportsDates = action.payload; }, + setPartnerEmployees: (state, action) => { + state.partnerEmployees = action.payload + } }, }); -export const { tags, profiles, selectedItems, auth, currentCandidate, filteredCandidates, setPositionId, setUserInfo, setProfileInfo, setReportsDates } = outstaffingSlice.actions; +export const { tags, profiles, selectedItems, auth, currentCandidate, filteredCandidates, setPositionId, setUserInfo, setProfileInfo, setReportsDates, setPartnerEmployees } = outstaffingSlice.actions; export const selectProfiles = (state) => state.outstaffing.profiles; export const selectTags = (state) => state.outstaffing.tags; @@ -61,5 +65,6 @@ export const getPositionId = (state) => state.outstaffing.positionId; export const getProfileInfo = (state) => state.outstaffing.profileInfo; export const selectUserInfo = (state) => state.outstaffing.userInfo; export const getReportsDates = (state) => state.outstaffing.reportsDates; +export const getPartnerEmployees = (state) => state.outstaffing.partnerEmployees; export default outstaffingSlice.reducer;