fix errors, change logo

This commit is contained in:
Victor Batischev
2023-12-04 18:01:04 +03:00
parent 887656da3b
commit 5bfc953ecc
33 changed files with 139 additions and 136 deletions

View File

@ -64,8 +64,8 @@ export const ProfileCalendar = () => {
}
apiRequest(
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
"cardId"
)}`
"cardId",
)}`,
).then((reports) => {
let spendTime = 0;
for (const report of reports) {

View File

@ -86,7 +86,7 @@ export const ProfileCalendarComponent = React.memo(
for (const date of reports) {
if (
`${new Date(day).getFullYear()}-${correctDay(
new Date(day).getMonth() + 1
new Date(day).getMonth() + 1,
)}-${correctDay(new Date(day).getDate())}` === date.created_at
) {
return `before`;
@ -101,7 +101,7 @@ export const ProfileCalendarComponent = React.memo(
for (const date of reports) {
if (
`${new Date(day).getFullYear()}-${correctDay(
new Date(day).getMonth() + 1
new Date(day).getMonth() + 1,
)}-${correctDay(new Date(day).getDate())}` === date.created_at
) {
return "#";
@ -122,15 +122,15 @@ export const ProfileCalendarComponent = React.memo(
const requestDates =
startDate < endDay
? `fromDate=${getCorrectYYMMDD(
startDate._d
startDate._d,
)}&toDate=${getCorrectYYMMDD(endDay._d)}`
: `fromDate=${getCorrectYYMMDD(endDay._d)}&toDate=${getCorrectYYMMDD(
startDate._d
startDate._d,
)}`;
apiRequest(
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
"cardId"
)}`
"cardId",
)}`,
).then((reports) => {
let spendTime = 0;
for (const report of reports) {
@ -298,7 +298,7 @@ export const ProfileCalendarComponent = React.memo(
{currentMonthAndDay(day)}
</Link>
</button>
))
)),
)}
</div>
</div>
@ -316,8 +316,8 @@ export const ProfileCalendarComponent = React.memo(
? `${getCorrectDate(startDate)} - ${getCorrectDate(endDate)}`
: `${getCorrectDate(endDate)} - ${getCorrectDate(startDate)}`
: activePeriod
? "Выберите начало диапазона"
: "Выбрать диапазон"}
? "Выберите начало диапазона"
: "Выбрать диапазон"}
</span>
<span>
{totalRangeHours
@ -340,5 +340,5 @@ export const ProfileCalendarComponent = React.memo(
{shortReport && <ShortReport />}
</div>
);
}
},
);