From 42de823b870dcde58820edbf11362ab867b5b193 Mon Sep 17 00:00:00 2001 From: "Nic D." <91558719+Venti-Bear@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:05:47 -0500 Subject: [PATCH 1/2] fix(date-time-utils): fix rounding error in util method that converts hours float to HHmm string --- src/utils/date-and-time-utils.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/utils/date-and-time-utils.ts b/src/utils/date-and-time-utils.ts index 3360f77..52a4758 100644 --- a/src/utils/date-and-time-utils.ts +++ b/src/utils/date-and-time-utils.ts @@ -21,7 +21,13 @@ export const getMinutes = (hours: number) => { } export const getHoursMinutesStringFromHoursFloat = (hours: number): string => { - const flat_hours = Math.floor(hours); - const minutes = Math.round((hours - flat_hours) * 60); + let flat_hours = Math.floor(hours); + let minutes = Math.round((hours - flat_hours) * 60); + + if (minutes === 60) { + flat_hours += 1; + minutes = 0; + } + return `${flat_hours}h${minutes > 1 ? ' ' + minutes : ''}` } \ No newline at end of file From 8231b3084da9ca4d4778d8134c6b82466bce4b7f Mon Sep 17 00:00:00 2001 From: "Nic D." <91558719+Venti-Bear@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:08:53 -0500 Subject: [PATCH 2/2] fix(timesheets): fix error where shift payload is not sent when modify employee timesheets from approval page --- src/modules/timesheets/services/shift-service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/timesheets/services/shift-service.ts b/src/modules/timesheets/services/shift-service.ts index aef90ec..5abf09a 100644 --- a/src/modules/timesheets/services/shift-service.ts +++ b/src/modules/timesheets/services/shift-service.ts @@ -15,7 +15,7 @@ export const ShiftService = { createNewShifts: async (new_shifts: Shift[], employee_email?: string):Promise> => { if (employee_email) { - const response = await api.post(`/shift/create/${employee_email}`); + const response = await api.post(`/shift/create/${employee_email}`, new_shifts); return response.data; } @@ -25,7 +25,7 @@ export const ShiftService = { updateShifts: async (existing_shifts: Shift[], employee_email?: string):Promise> => { if (employee_email) { - const response = await api.patch(`/shift/update/${employee_email}`); + const response = await api.patch(`/shift/update/${employee_email}`, existing_shifts); return response.data; }