reports adaptive
This commit is contained in:
parent
7f0e5be087
commit
93c1dd3945
@ -63,7 +63,7 @@ export const AuthBox = ({ title }) => {
|
|||||||
localStorage.setItem("role_status", res.status);
|
localStorage.setItem("role_status", res.status);
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
"access_token_expired_at",
|
"access_token_expired_at",
|
||||||
res.access_token_expired_at
|
res.access_token_expired_at,
|
||||||
);
|
);
|
||||||
dispatch(auth(true));
|
dispatch(auth(true));
|
||||||
dispatch(setUserInfo(res));
|
dispatch(setUserInfo(res));
|
||||||
|
@ -64,8 +64,8 @@ export const ProfileCalendar = () => {
|
|||||||
}
|
}
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
|
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
|
||||||
"cardId"
|
"cardId",
|
||||||
)}`
|
)}`,
|
||||||
).then((reports) => {
|
).then((reports) => {
|
||||||
let spendTime = 0;
|
let spendTime = 0;
|
||||||
for (const report of reports) {
|
for (const report of reports) {
|
||||||
|
@ -322,7 +322,9 @@ export const ProfileCalendarComponent = React.memo(
|
|||||||
<span>
|
<span>
|
||||||
{totalRangeHours
|
{totalRangeHours
|
||||||
? `${totalRangeHours} ${hourOfNum(totalRangeHours)}`
|
? `${totalRangeHours} ${hourOfNum(totalRangeHours)}`
|
||||||
: endDate ? "0 часов" : ""}
|
: endDate
|
||||||
|
? "0 часов"
|
||||||
|
: ""}
|
||||||
</span>
|
</span>
|
||||||
{endDate && (
|
{endDate && (
|
||||||
<BaseButton
|
<BaseButton
|
||||||
|
@ -43,7 +43,7 @@ const ReportForm = () => {
|
|||||||
const [isFetching, setIsFetching] = useState(false);
|
const [isFetching, setIsFetching] = useState(false);
|
||||||
const [reportSuccess, setReportSuccess] = useState("");
|
const [reportSuccess, setReportSuccess] = useState("");
|
||||||
const [startDate, setStartDate] = useState(
|
const [startDate, setStartDate] = useState(
|
||||||
reportDate ? new Date(reportDate._d) : new Date()
|
reportDate ? new Date(reportDate._d) : new Date(),
|
||||||
);
|
);
|
||||||
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ const ReportForm = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("report-form__block-img") ||
|
(div.classList.contains("report-form__block-img") ||
|
||||||
div.classList.contains("react-datepicker-popper"))
|
div.classList.contains("react-datepicker-popper")),
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setDatePickerOpen(false);
|
setDatePickerOpen(false);
|
||||||
@ -210,7 +210,7 @@ const ReportForm = () => {
|
|||||||
task: e.target.value,
|
task: e.target.value,
|
||||||
}
|
}
|
||||||
: input;
|
: input;
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -236,7 +236,7 @@ const ReportForm = () => {
|
|||||||
hours_spent: Number(e.target.value),
|
hours_spent: Number(e.target.value),
|
||||||
}
|
}
|
||||||
: input;
|
: input;
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user