employeeReport

This commit is contained in:
Mikola
2024-02-02 18:44:11 +03:00
parent 5825015706
commit 8a2876e30b
5 changed files with 100 additions and 89 deletions

View File

@ -96,14 +96,14 @@ export const ProfileCalendarComponent = React.memo(
)}-${correctDay(new Date(day).getDate())}` === date.created_at
) {
if (userId) {
return `../view/${date.created_at}/${userId}`
return `../view/${date.created_at}/${userId}`;
}
return `../view/${date.created_at}/${localStorage.getItem("id")}`;
}
}
if (userId) {
return "#"
return "#";
}
return "../../report";
@ -123,7 +123,9 @@ export const ProfileCalendarComponent = React.memo(
startDate._d
)}`;
apiRequest(
`/reports/index?${requestDates}&user_id=${userId ? userId : localStorage.getItem("id")}`
`/reports/index?${requestDates}&user_id=${
userId ? userId : localStorage.getItem("id")
}`
).then((reports) => {
let spendTime = 0;
reports.map((report) => {
@ -172,9 +174,7 @@ export const ProfileCalendarComponent = React.memo(
<div className="calendar-component">
<div className="calendar-component__header">
<div className="calendar-component__header-info">
{!userId &&
<h3>Мои отчеты за </h3>
}
{!userId && <h3>Мои отчеты за </h3>}
<p className="calendar__hours">
{month}&nbsp;
<span>