From a252ad98efa535b951121669beb0676602b1f79b Mon Sep 17 00:00:00 2001 From: Matthieu Haineault Date: Tue, 16 Sep 2025 09:17:30 -0400 Subject: [PATCH] feat(timesheet): added create-edit-delete shifts --- src/i18n/en-ca/index.ts | 12 +- src/i18n/fr-ca/index.ts | 11 +- .../timesheet-details-shifts-row.vue | 76 +++--- .../timesheet/timesheet-details-shifts.vue | 42 +++- .../timesheets/composables/use-shift-api.ts | 171 +++++++++++++ .../pages/timesheet-details-overview.vue | 232 +++++++++++++++++- 6 files changed, 483 insertions(+), 61 deletions(-) create mode 100644 src/modules/timesheets/composables/use-shift-api.ts diff --git a/src/i18n/en-ca/index.ts b/src/i18n/en-ca/index.ts index d53effc..67a4577 100644 --- a/src/i18n/en-ca/index.ts +++ b/src/i18n/en-ca/index.ts @@ -261,7 +261,14 @@ export default { save_button:'Save', cancel_button:'Cancel', remote_button: 'Remote work', + delete_button: 'Delete', + + delete_confirmation_msg: 'Do you want to delete this shift completly?', + add_shift:'Add Shift', + edit_shift: 'Edit shift', + delete_shift: 'Delete shift', + shift_types_label: 'Shift`s Type', shift_types: { EMERGENCY: 'Emergency', @@ -271,10 +278,11 @@ export default { REGULAR: 'Regular', SICK: 'Sick Leave', VACATION: 'Vacation', + REMOTE: 'Remote work', }, fields: { - start:'Start', - end:'End', + start:'Start (HH:mm)', + end:'End (HH:mm)', header_comment:'Shift`s comment', textarea_comment: 'Leave a comment here', }, diff --git a/src/i18n/fr-ca/index.ts b/src/i18n/fr-ca/index.ts index 490c724..670c2be 100644 --- a/src/i18n/fr-ca/index.ts +++ b/src/i18n/fr-ca/index.ts @@ -311,8 +311,14 @@ export default { save_button:'Enregistrer', cancel_button:'Annuler', remote_button: 'Télétravail', + delete_button: 'Supprimer', + + delete_confirmation_msg: 'Voulez-vous supprimer complètement ce quart?', add_shift:'Ajouter une quart', + edit_shift: 'Modifier un quart', + delete_shift: 'Supprimer un quart', + shift_types_label: 'Type de quart', shift_types: { EMERGENCY: 'Urgence', @@ -322,10 +328,11 @@ export default { SICK: 'Absence', REGULAR: 'Régulier', VACATION: 'Vacance', + REMOTE: 'Télétravail', }, fields: { - start:'Entrée', - end:'Sortie', + start:'Entrée (HH:mm)', + end:'Sortie (HH:mm)', header_comment:'Commentaire du Quart', textarea_comment:'Laissez votre commentaire', }, diff --git a/src/modules/timesheets/components/timesheet/timesheet-details-shifts-row.vue b/src/modules/timesheets/components/timesheet/timesheet-details-shifts-row.vue index 2c7fa7b..6b7b8df 100644 --- a/src/modules/timesheets/components/timesheet/timesheet-details-shifts-row.vue +++ b/src/modules/timesheets/components/timesheet/timesheet-details-shifts-row.vue @@ -1,37 +1,27 @@ \ No newline at end of file diff --git a/src/modules/timesheets/components/timesheet/timesheet-details-shifts.vue b/src/modules/timesheets/components/timesheet/timesheet-details-shifts.vue index 24338c1..a2903dd 100644 --- a/src/modules/timesheets/components/timesheet/timesheet-details-shifts.vue +++ b/src/modules/timesheets/components/timesheet/timesheet-details-shifts.vue @@ -1,22 +1,40 @@