trackerTask #12
@ -51,9 +51,7 @@ export const ProfileCalendar = () => {
|
||||
return;
|
||||
}
|
||||
apiRequest(
|
||||
`/reports/index?${requestDates}&user_id =${localStorage.getItem(
|
||||
"id"
|
||||
)}`
|
||||
`/reports/index?${requestDates}&user_id =${localStorage.getItem("id")}`
|
||||
).then((reports) => {
|
||||
let spendTime = 0;
|
||||
|
||||
|
@ -114,9 +114,7 @@ export const ProfileCalendarComponent = React.memo(
|
||||
startDate._d
|
||||
)}`;
|
||||
apiRequest(
|
||||
`/reports/index?${requestDates}&user_id =${localStorage.getItem(
|
||||
"id"
|
||||
)}`
|
||||
`/reports/index?${requestDates}&user_id =${localStorage.getItem("id")}`
|
||||
).then((reports) => {
|
||||
let spendTime = 0;
|
||||
reports.map((report) => {
|
||||
|
@ -39,9 +39,7 @@ export const ShortReport = () => {
|
||||
setTomorrowTask([]);
|
||||
setTotalHours(0);
|
||||
apiRequest(
|
||||
`reports/find-by-date?user_id=${localStorage.getItem(
|
||||
"id"
|
||||
)}&date=${day}`
|
||||
`reports/find-by-date?user_id=${localStorage.getItem("id")}&date=${day}`
|
||||
).then((res) => {
|
||||
let spendTime = 0;
|
||||
for (const item of res) {
|
||||
|
@ -2,15 +2,15 @@ import React, { useEffect, useState } from "react";
|
||||
// import { useDispatch } from "react-redux";
|
||||
// import { Link } from "react-router-dom";
|
||||
import { Navigate } from "react-router-dom";
|
||||
// import { setPartnerEmployees } from "@redux/outstaffingSlice";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
// import { setPartnerEmployees } from "@redux/outstaffingSlice";
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
import PartnerPersonCard from "@components/PartnerPersonCard/PartnerPersonCard";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
// import rightArrow from "assets/icons/arrows/arrowRight.svg";
|
||||
// import avatarImg from "assets/images/avatarMok.png";
|
||||
@ -23,7 +23,6 @@ import { apiRequest } from "@api/request";
|
||||
// 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 "./partnerСategories.scss";
|
||||
|
||||
export const PartnerCategories = () => {
|
||||
@ -32,13 +31,13 @@ export const PartnerCategories = () => {
|
||||
return <Navigate to="/profile" replace />;
|
||||
}
|
||||
|
||||
const [staff, setStaff] = useState([])
|
||||
const [staff, setStaff] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
apiRequest("/project/my-employee").then((el) => {
|
||||
setStaff(el.managerEmployees)
|
||||
})
|
||||
}, [])
|
||||
setStaff(el.managerEmployees);
|
||||
});
|
||||
}, []);
|
||||
|
||||
// const [personalInfoItems] = useState([
|
||||
// {
|
||||
@ -156,7 +155,14 @@ export const PartnerCategories = () => {
|
||||
<h2 className="partnerCategories__title">Данные персонала</h2>
|
||||
<div className="partnerCategories__items">
|
||||
{staff.map((card) => {
|
||||
return <PartnerPersonCard key={card.id} name={card.employee.fio} img={card.employee.avatar} userId={card.user_id} />
|
||||
return (
|
||||
<PartnerPersonCard
|
||||
key={card.id}
|
||||
name={card.employee.fio}
|
||||
img={card.employee.avatar}
|
||||
userId={card.user_id}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{/*{personalInfoItems.map((item, index) => {*/}
|
||||
{/* return (*/}
|
||||
|
@ -41,9 +41,7 @@ export const ViewReport = () => {
|
||||
setDifficulties([]);
|
||||
setTomorrowTask([]);
|
||||
apiRequest(
|
||||
`reports/find-by-date?user_id=${localStorage.getItem(
|
||||
"id"
|
||||
)}&date=${day}`
|
||||
`reports/find-by-date?user_id=${localStorage.getItem("id")}&date=${day}`
|
||||
).then((res) => {
|
||||
let spendTime = 0;
|
||||
for (const item of res) {
|
||||
|
Loading…
Reference in New Issue
Block a user