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 00000000..3dad1696 Binary files /dev/null and b/src/pages/PartnerEmployees/avatarMok.png differ diff --git a/src/pages/PartnerEmployees/emplInfo.png b/src/pages/PartnerEmployees/emplInfo.png new file mode 100644 index 00000000..695fc9c7 Binary files /dev/null and b/src/pages/PartnerEmployees/emplInfo.png differ diff --git a/src/pages/PartnerEmployees/partnerEmployees.scss b/src/pages/PartnerEmployees/partnerEmployees.scss new file mode 100644 index 00000000..8d4496d3 --- /dev/null +++ b/src/pages/PartnerEmployees/partnerEmployees.scss @@ -0,0 +1,170 @@ +.partnerEmployees { + background: #F1F1F1; + height: 100%; + min-height: 100vh; + font-family: 'LabGrotesque', sans-serif; + + &__title { + font-weight: 500; + font-size: 18px; + line-height: 22px; + color: #000000; + margin-bottom: 22px; + } + + &__items { + display: flex; + flex-direction: column; + row-gap: 20px; + } + + &__item { + background: #E1FCCF; + border-radius: 12px; + display: flex; + position: relative; + + &__name { + background: #FFFFFF; + border-radius: 12px; + padding: 25px 22px 25px; + display: flex; + align-items: center; + max-width: 274px; + width: 100%; + + img { + width: 77px; + height: 77px; + } + + h4 { + margin-left: 13px; + margin-bottom: 0; + font-weight: 500; + font-size: 16px; + line-height: 26px; + max-width: 96px; + color: #000000; + } + } + + &__info { + display: flex; + padding: 15px 50px 14px 16px; + width: 100%; + justify-content: space-between; + + &__qualification { + display: flex; + flex-direction: column; + justify-content: space-between; + + h5 { + font-weight: 500; + font-size: 18px; + color: #000000; + margin-bottom: 0; + } + + span { + color: #6F6F6F; + font-weight: 500; + font-size: 14px; + } + + .info_summary { + display: flex; + align-items: center; + + p { + font-weight: 400; + font-size: 14px; + line-height: 22px; + color: #000000; + margin: 0 18px 0 10px; + } + + .arrow { + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + background: #FFFFFF; + border-radius: 50px; + width: 41px; + height: 41px; + } + } + } + + &__project { + .name { + font-weight: 500; + font-size: 18px; + color: #111112; + } + + h5 { + margin-bottom: 0; + font-weight: 500; + font-size: 18px; + color: #111112; + } + + &__details { + display: flex; + margin-top: 24px; + column-gap: 25px; + + .details__item { + display: flex; + align-items: center; + + p { + margin-bottom: 0; + color: #6F6F6F; + font-weight: 500; + font-size: 13px; + line-height: 24px; + + span { + color: #406128; + font-weight: 700; + text-decoration: underline; + } + } + + .count { + display: flex; + align-items: center; + justify-content: center; + margin-left: 8px; + padding: 0 6px; + background: #DDDDDD; + border-radius: 4px; + font-weight: 500; + font-size: 14px; + line-height: 24px; + color: #6F6F6F; + } + } + } + } + } + } + + + .container { + max-width: 1160px; + margin-top: 23px; + + @media (max-width: 570px) { + margin-top: 0; + } + } + + footer { + margin-top: 70px; + } +} diff --git a/src/pages/PartnerSettings/PartnerSettings.js b/src/pages/PartnerSettings/PartnerSettings.js index eb8b4066..db633a98 100644 --- a/src/pages/PartnerSettings/PartnerSettings.js +++ b/src/pages/PartnerSettings/PartnerSettings.js @@ -16,7 +16,7 @@ export const PartnerSettings = () => {
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;