employeeReport
This commit is contained in:
@ -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}
|
||||
<span>
|
||||
|
Reference in New Issue
Block a user