From 123befb5f8956f86885aac79c19b03d6afe76873 Mon Sep 17 00:00:00 2001 From: Matthieu Haineault Date: Wed, 10 Sep 2025 16:21:32 -0400 Subject: [PATCH] feat(timesheet): added comment popup data --- .../components/timesheet/timesheet-save-payload.vue | 2 +- src/modules/timesheets/types/timesheet-details-interface.ts | 4 ++++ src/modules/timesheets/types/timesheet-interface.ts | 4 ++-- .../timesheets/types/timesheet-shifts-payload-interface.ts | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/modules/timesheets/components/timesheet/timesheet-save-payload.vue b/src/modules/timesheets/components/timesheet/timesheet-save-payload.vue index b359c64..1308ba4 100644 --- a/src/modules/timesheets/components/timesheet/timesheet-save-payload.vue +++ b/src/modules/timesheets/components/timesheet/timesheet-save-payload.vue @@ -30,7 +30,7 @@ const buildPayload = (): CreateShiftPayload[] => { end_time: row.end_time, is_remote: row.is_remote, }; - if(row.comment) item.description = row.comment; + if(row.comment) item.comment = row.comment; return[item]; }) }; diff --git a/src/modules/timesheets/types/timesheet-details-interface.ts b/src/modules/timesheets/types/timesheet-details-interface.ts index 21b42ee..b3e6a28 100644 --- a/src/modules/timesheets/types/timesheet-details-interface.ts +++ b/src/modules/timesheets/types/timesheet-details-interface.ts @@ -12,12 +12,15 @@ export interface TimesheetDetailsDailySchedule { evening_hours: number; emergency_hours: number; overtime_hours: number; + comment: string; short_date: string; // ex. 08/24 break_duration?: number; } export interface Expense { is_approved: boolean; + comment: string; + supervisor_comment: string; amount: number; }; @@ -61,6 +64,7 @@ const emptyDailySchedule = (): TimesheetDetailsDailySchedule => ({ evening_hours: 0, emergency_hours: 0, overtime_hours: 0, + comment: "", short_date: "", break_duration: 0, }); diff --git a/src/modules/timesheets/types/timesheet-interface.ts b/src/modules/timesheets/types/timesheet-interface.ts index 927cfd0..12334fd 100644 --- a/src/modules/timesheets/types/timesheet-interface.ts +++ b/src/modules/timesheets/types/timesheet-interface.ts @@ -12,7 +12,7 @@ type Shifts = { date: string; start_time: string; end_time: string; - description: string; + comment: string; is_approved: boolean; is_remote: boolean; } @@ -22,7 +22,7 @@ type Expenses = { date: string; amount: number; km: number; - description: string; + comment: string; supervisor_comment: string; is_approved: boolean; } \ No newline at end of file diff --git a/src/modules/timesheets/types/timesheet-shifts-payload-interface.ts b/src/modules/timesheets/types/timesheet-shifts-payload-interface.ts index e03b7df..dc8776d 100644 --- a/src/modules/timesheets/types/timesheet-shifts-payload-interface.ts +++ b/src/modules/timesheets/types/timesheet-shifts-payload-interface.ts @@ -3,7 +3,7 @@ export interface CreateShiftPayload { type: string; start_time: string; end_time: string; - description?: string; + comment?: string; is_remote?: boolean; };