Fixed Date #30
This commit is contained in:
@@ -388,7 +388,9 @@ export default async function staffTimeRoutes(server: FastifyInstance) {
|
||||
const evaluatedUserId = targetUserId || actingUserId;
|
||||
|
||||
const startDate = new Date(from);
|
||||
const endDate = new Date(to);
|
||||
let endDateQuery = new Date(to);
|
||||
endDateQuery.setDate(endDateQuery.getDate() + 1);
|
||||
const endDate = endDateQuery;
|
||||
|
||||
if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
|
||||
return reply.code(400).send({ error: "Ungültiges Datumsformat." });
|
||||
|
||||
@@ -119,8 +119,8 @@ async function loadWorkingTimeInfo() {
|
||||
|
||||
// Erstellt Query-Parameter für den neuen Backend-Endpunkt
|
||||
const queryParams = new URLSearchParams({
|
||||
from: selectedStartDay.value,
|
||||
to: selectedEndDay.value,
|
||||
from: $dayjs(selectedStartDay.value).format("YYYY-MM-DD"),
|
||||
to: $dayjs(selectedEndDay.value).format("YYYY-MM-DD"),
|
||||
targetUserId: evaluatedUserId.value,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user