catalogSpecialists

This commit is contained in:
Mikola
2024-02-01 22:33:22 +03:00
parent 6dbb4eb609
commit 0acbef4195
5 changed files with 24 additions and 26 deletions

View File

@ -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;

View File

@ -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) => {
@ -273,15 +271,15 @@ export const ProfileCalendarComponent = React.memo(
? `${getCorrectDate(startDate)} - ${getCorrectDate(endDate)}`
: `${getCorrectDate(endDate)} - ${getCorrectDate(startDate)}`
: activePeriod
? "Выберите диапазон на календаре"
: "Выбрать диапазон"}
? "Выберите диапазон на календаре"
: "Выбрать диапазон"}
</span>
<span>
{totalRangeHours
? `${totalRangeHours} ${hourOfNum(totalRangeHours)}`
: endDate
? "0 часов"
: ""}
? "0 часов"
: ""}
</span>
{endDate && (
<BaseButton

View File

@ -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) {