trackerTask #12
@ -51,8 +51,8 @@ export const ProfileCalendar = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
|
`/reports/index?${requestDates}&user_id =${localStorage.getItem(
|
||||||
"cardId"
|
"id"
|
||||||
)}`
|
)}`
|
||||||
).then((reports) => {
|
).then((reports) => {
|
||||||
let spendTime = 0;
|
let spendTime = 0;
|
||||||
|
@ -114,8 +114,8 @@ export const ProfileCalendarComponent = React.memo(
|
|||||||
startDate._d
|
startDate._d
|
||||||
)}`;
|
)}`;
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
|
`/reports/index?${requestDates}&user_id =${localStorage.getItem(
|
||||||
"cardId"
|
"id"
|
||||||
)}`
|
)}`
|
||||||
).then((reports) => {
|
).then((reports) => {
|
||||||
let spendTime = 0;
|
let spendTime = 0;
|
||||||
|
@ -97,6 +97,7 @@ const ReportForm = () => {
|
|||||||
apiRequest("/reports/create", {
|
apiRequest("/reports/create", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
|
user_id: localStorage.getItem("id"),
|
||||||
tasks: inputs,
|
tasks: inputs,
|
||||||
difficulties: troublesInputValue,
|
difficulties: troublesInputValue,
|
||||||
tomorrow: scheduledInputValue,
|
tomorrow: scheduledInputValue,
|
||||||
|
@ -39,8 +39,8 @@ export const ShortReport = () => {
|
|||||||
setTomorrowTask([]);
|
setTomorrowTask([]);
|
||||||
setTotalHours(0);
|
setTotalHours(0);
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`reports/find-by-date?user_card_id=${localStorage.getItem(
|
`reports/find-by-date?user_id=${localStorage.getItem(
|
||||||
"cardId"
|
"id"
|
||||||
)}&date=${day}`
|
)}&date=${day}`
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
let spendTime = 0;
|
let spendTime = 0;
|
||||||
|
@ -504,13 +504,13 @@ $maxWidthContainer: 1123;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
&__finished {
|
&__finished {
|
||||||
background: rgba(255, 255, 255, 0.76);
|
background: white;
|
||||||
mix-blend-mode: normal;
|
mix-blend-mode: normal;
|
||||||
border: 3px solid #52b709;
|
border: 3px solid #52b709;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 13px 16px;
|
padding: 13px 16px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 4px;
|
||||||
left: 0;
|
left: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -1,137 +1,147 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useDispatch } from "react-redux";
|
// import { useDispatch } from "react-redux";
|
||||||
import { Link } from "react-router-dom";
|
// import { Link } from "react-router-dom";
|
||||||
import { Navigate } from "react-router-dom";
|
import { Navigate } from "react-router-dom";
|
||||||
|
// import { setPartnerEmployees } from "@redux/outstaffingSlice";
|
||||||
import { setPartnerEmployees } from "@redux/outstaffingSlice";
|
|
||||||
|
|
||||||
import { Footer } from "@components/Common/Footer/Footer";
|
import { Footer } from "@components/Common/Footer/Footer";
|
||||||
|
import PartnerPersonCard from "@components/PartnerPersonCard/PartnerPersonCard";
|
||||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
||||||
|
import { Navigation } from "@components/Navigation/Navigation";
|
||||||
|
|
||||||
import rightArrow from "assets/icons/arrows/arrowRight.svg";
|
import { apiRequest } from "@api/request";
|
||||||
import avatarImg from "assets/images/avatarMok.png";
|
|
||||||
import AdminImg from "assets/images/partnerProfile/PersonalAdmin.svg";
|
// import rightArrow from "assets/icons/arrows/arrowRight.svg";
|
||||||
import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg";
|
// import avatarImg from "assets/images/avatarMok.png";
|
||||||
import CopyImg from "assets/images/partnerProfile/PersonalCopy.svg";
|
// import AdminImg from "assets/images/partnerProfile/PersonalAdmin.svg";
|
||||||
import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg";
|
// import ArchitectureImg from "assets/images/partnerProfile/PersonalArchitecture.svg";
|
||||||
import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg";
|
// import CopyImg from "assets/images/partnerProfile/PersonalCopy.svg";
|
||||||
import ManageImg from "assets/images/partnerProfile/PersonalMng.svg";
|
// import DesignImg from "assets/images/partnerProfile/PersonalDesign.svg";
|
||||||
import SmmImg from "assets/images/partnerProfile/PersonalSMM.svg";
|
// import FrontendImg from "assets/images/partnerProfile/PersonalFrontend.svg";
|
||||||
import TestImg from "assets/images/partnerProfile/PersonalTesters.svg";
|
// import ManageImg from "assets/images/partnerProfile/PersonalMng.svg";
|
||||||
import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg";
|
// import SmmImg from "assets/images/partnerProfile/PersonalSMM.svg";
|
||||||
|
// import TestImg from "assets/images/partnerProfile/PersonalTesters.svg";
|
||||||
|
// import BackEndImg from "assets/images/partnerProfile/personalBackEnd.svg";
|
||||||
|
|
||||||
import { Navigation } from "../../components/Navigation/Navigation";
|
|
||||||
import "./partnerСategories.scss";
|
import "./partnerСategories.scss";
|
||||||
|
|
||||||
export const PartnerCategories = () => {
|
export const PartnerCategories = () => {
|
||||||
const dispatch = useDispatch();
|
// const dispatch = useDispatch();
|
||||||
if (localStorage.getItem("role_status") !== "18") {
|
if (localStorage.getItem("role_status") !== "18") {
|
||||||
return <Navigate to="/profile" replace />;
|
return <Navigate to="/profile" replace />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const [personalInfoItems] = useState([
|
const [staff, setStaff] = useState([])
|
||||||
{
|
|
||||||
title: "Backend разработчики",
|
|
||||||
link: "/profile/categories/employees",
|
|
||||||
description:
|
|
||||||
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
|
||||||
available: true,
|
|
||||||
img: BackEndImg
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Frontend разработчики",
|
|
||||||
link: "/profile/categories/employees",
|
|
||||||
description:
|
|
||||||
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
|
||||||
available: true,
|
|
||||||
img: FrontendImg
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Архитектура проектов",
|
|
||||||
link: "/profile/categories/employees",
|
|
||||||
description: "Потоки данных ER ERP CRM CQRS UML BPMN",
|
|
||||||
available: true,
|
|
||||||
img: ArchitectureImg
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Дизайн проектов",
|
|
||||||
link: "/profile/categories/employees",
|
|
||||||
description:
|
|
||||||
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
|
||||||
available: true,
|
|
||||||
img: DesignImg
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Тестирование проектов",
|
|
||||||
link: "/profile/add-request",
|
|
||||||
description: "SQL Postman TestRail Kibana Ручное тестирование",
|
|
||||||
available: false,
|
|
||||||
img: TestImg
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Администрирование проектов",
|
|
||||||
link: "/profile/add-request",
|
|
||||||
description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git",
|
|
||||||
available: false,
|
|
||||||
img: AdminImg
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Управление проектом",
|
|
||||||
link: "/profile/add-request",
|
|
||||||
description: "Scrum Kanban Agile Miro CustDev",
|
|
||||||
available: false,
|
|
||||||
img: ManageImg
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Копирайтинг проектов",
|
|
||||||
link: "/profile/add-request",
|
|
||||||
description: "Теги Заголовок H1 Дескриптор Абзац Сценарий",
|
|
||||||
available: false,
|
|
||||||
img: CopyImg
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Реклама и SMM",
|
|
||||||
link: "/profile/add-request",
|
|
||||||
description:
|
|
||||||
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
|
||||||
available: false,
|
|
||||||
img: SmmImg
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
const [mokPersons] = useState([
|
useEffect(() => {
|
||||||
{
|
apiRequest("/project/my-employee").then((el) => {
|
||||||
personAvatar: avatarImg,
|
setStaff(el.managerEmployees)
|
||||||
name: "Макаренко Дмитрий",
|
})
|
||||||
qualification: "PHP Backend - разработчик",
|
}, [])
|
||||||
level: "Middle",
|
|
||||||
project: "Админка НВД Консалтинг",
|
// const [personalInfoItems] = useState([
|
||||||
tasks_in_progress: 5,
|
// {
|
||||||
month_hours: 140,
|
// title: "Backend разработчики",
|
||||||
id: 1
|
// link: "/profile/categories/employees",
|
||||||
},
|
// description:
|
||||||
{
|
// "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
||||||
personAvatar: avatarImg,
|
// available: true,
|
||||||
name: "Макаренко Дмитрий",
|
// img: BackEndImg
|
||||||
qualification: "PHP Backend - разработчик",
|
// },
|
||||||
level: "Middle",
|
// {
|
||||||
project: "Админка НВД Консалтинг",
|
// title: "Frontend разработчики",
|
||||||
tasks_in_progress: 5,
|
// link: "/profile/categories/employees",
|
||||||
month_hours: 140,
|
// description:
|
||||||
id: 2
|
// "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
||||||
},
|
// available: true,
|
||||||
{
|
// img: FrontendImg
|
||||||
personAvatar: avatarImg,
|
// },
|
||||||
name: "Макаренко Дмитрий",
|
// {
|
||||||
qualification: "PHP Backend - разработчик",
|
// title: "Архитектура проектов",
|
||||||
level: "Middle",
|
// link: "/profile/categories/employees",
|
||||||
project: "Админка НВД Консалтинг",
|
// description: "Потоки данных ER ERP CRM CQRS UML BPMN",
|
||||||
tasks_in_progress: 5,
|
// available: true,
|
||||||
month_hours: 140,
|
// img: ArchitectureImg
|
||||||
id: 3
|
// },
|
||||||
}
|
// {
|
||||||
]);
|
// title: "Дизайн проектов",
|
||||||
|
// link: "/profile/categories/employees",
|
||||||
|
// description:
|
||||||
|
// "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
|
||||||
|
// available: true,
|
||||||
|
// img: DesignImg
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: "Тестирование проектов",
|
||||||
|
// link: "/profile/add-request",
|
||||||
|
// description: "SQL Postman TestRail Kibana Ручное тестирование",
|
||||||
|
// available: false,
|
||||||
|
// img: TestImg
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: "Администрирование проектов",
|
||||||
|
// link: "/profile/add-request",
|
||||||
|
// description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git",
|
||||||
|
// available: false,
|
||||||
|
// img: AdminImg
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: "Управление проектом",
|
||||||
|
// link: "/profile/add-request",
|
||||||
|
// description: "Scrum Kanban Agile Miro CustDev",
|
||||||
|
// available: false,
|
||||||
|
// img: ManageImg
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: "Копирайтинг проектов",
|
||||||
|
// link: "/profile/add-request",
|
||||||
|
// description: "Теги Заголовок H1 Дескриптор Абзац Сценарий",
|
||||||
|
// available: false,
|
||||||
|
// img: CopyImg
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: "Реклама и SMM",
|
||||||
|
// 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 (
|
return (
|
||||||
<div className="partnerCategories">
|
<div className="partnerCategories">
|
||||||
<ProfileHeader />
|
<ProfileHeader />
|
||||||
@ -145,39 +155,42 @@ export const PartnerCategories = () => {
|
|||||||
/>
|
/>
|
||||||
<h2 className="partnerCategories__title">Данные персонала</h2>
|
<h2 className="partnerCategories__title">Данные персонала</h2>
|
||||||
<div className="partnerCategories__items">
|
<div className="partnerCategories__items">
|
||||||
{personalInfoItems.map((item, index) => {
|
{staff.map((card) => {
|
||||||
return (
|
return <PartnerPersonCard key={card.id} name={card.employee.fio} img={card.employee.avatar} userId={card.user_id} />
|
||||||
<Link
|
|
||||||
to={item.link}
|
|
||||||
key={index}
|
|
||||||
className={
|
|
||||||
item.available
|
|
||||||
? "partnerCategories__item item"
|
|
||||||
: "partnerCategories__item item item__disable"
|
|
||||||
}
|
|
||||||
onClick={() => {
|
|
||||||
dispatch(setPartnerEmployees(mokPersons));
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className="item__title">
|
|
||||||
<img src={item.img} alt={item.title} />
|
|
||||||
<h4>{item.title}</h4>
|
|
||||||
</div>
|
|
||||||
<div className="item__info">
|
|
||||||
<p>{item.description}</p>
|
|
||||||
<div className="more">
|
|
||||||
<img src={rightArrow} alt="arrow" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{!item.available && (
|
|
||||||
<div className="item__disableHover">
|
|
||||||
<p>У вас нет персонала из категории</p>
|
|
||||||
<button>Подобрать</button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
);
|
|
||||||
})}
|
})}
|
||||||
|
{/*{personalInfoItems.map((item, index) => {*/}
|
||||||
|
{/* return (*/}
|
||||||
|
{/* <Link*/}
|
||||||
|
{/* to={item.link}*/}
|
||||||
|
{/* key={index}*/}
|
||||||
|
{/* className={*/}
|
||||||
|
{/* item.available*/}
|
||||||
|
{/* ? "partnerCategories__item item"*/}
|
||||||
|
{/* : "partnerCategories__item item item__disable"*/}
|
||||||
|
{/* }*/}
|
||||||
|
{/* onClick={() => {*/}
|
||||||
|
{/* dispatch(setPartnerEmployees(mokPersons));*/}
|
||||||
|
{/* }}*/}
|
||||||
|
{/* >*/}
|
||||||
|
{/* <div className="item__title">*/}
|
||||||
|
{/* <img src={item.img} alt={item.title} />*/}
|
||||||
|
{/* <h4>{item.title}</h4>*/}
|
||||||
|
{/* </div>*/}
|
||||||
|
{/* <div className="item__info">*/}
|
||||||
|
{/* <p>{item.description}</p>*/}
|
||||||
|
{/* <div className="more">*/}
|
||||||
|
{/* <img src={rightArrow} alt="arrow" />*/}
|
||||||
|
{/* </div>*/}
|
||||||
|
{/* </div>*/}
|
||||||
|
{/* {!item.available && (*/}
|
||||||
|
{/* <div className="item__disableHover">*/}
|
||||||
|
{/* <p>У вас нет персонала из категории</p>*/}
|
||||||
|
{/* <button>Подобрать</button>*/}
|
||||||
|
{/* </div>*/}
|
||||||
|
{/* )}*/}
|
||||||
|
{/* </Link>*/}
|
||||||
|
{/* );*/}
|
||||||
|
{/*})}*/}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Footer />
|
<Footer />
|
||||||
|
@ -13,10 +13,11 @@
|
|||||||
|
|
||||||
&__items {
|
&__items {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
gap: 10px;
|
||||||
margin-top: 25px;
|
//flex-wrap: wrap;
|
||||||
row-gap: 24px;
|
//margin-top: 25px;
|
||||||
column-gap: 21px;
|
//row-gap: 24px;
|
||||||
|
//column-gap: 21px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,8 +41,8 @@ export const ViewReport = () => {
|
|||||||
setDifficulties([]);
|
setDifficulties([]);
|
||||||
setTomorrowTask([]);
|
setTomorrowTask([]);
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`reports/find-by-date?user_card_id=${localStorage.getItem(
|
`reports/find-by-date?user_id=${localStorage.getItem(
|
||||||
"cardId"
|
"id"
|
||||||
)}&date=${day}`
|
)}&date=${day}`
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
let spendTime = 0;
|
let spendTime = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user