diff --git a/backend/src/routes/staff/time.ts b/backend/src/routes/staff/time.ts index edaddbc..75afdb4 100644 --- a/backend/src/routes/staff/time.ts +++ b/backend/src/routes/staff/time.ts @@ -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." }); diff --git a/frontend/pages/staff/time/[id]/evaluate.vue b/frontend/pages/staff/time/[id]/evaluate.vue index 32da562..b21e039 100644 --- a/frontend/pages/staff/time/[id]/evaluate.vue +++ b/frontend/pages/staff/time/[id]/evaluate.vue @@ -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, });