diff --git a/src/i18n/en-ca/index.ts b/src/i18n/en-ca/index.ts index 79802dd..67a4577 100644 --- a/src/i18n/en-ca/index.ts +++ b/src/i18n/en-ca/index.ts @@ -261,19 +261,28 @@ 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', EVENING: 'Evening', HOLIDAY: 'Holiday', + OVERTIME: 'Overtime', 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 f7cd6e9..670c2be 100644 --- a/src/i18n/fr-ca/index.ts +++ b/src/i18n/fr-ca/index.ts @@ -311,20 +311,28 @@ 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', EVENING: 'Soir', HOLIDAY: 'Férier', + OVERTIME: 'Supplémentaire', 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/timesheet-approval/components/timesheet-approval-period-picker.vue b/src/modules/timesheet-approval/components/timesheet-approval-period-picker.vue index 8681c73..e185ee2 100644 --- a/src/modules/timesheet-approval/components/timesheet-approval-period-picker.vue +++ b/src/modules/timesheet-approval/components/timesheet-approval-period-picker.vue @@ -20,7 +20,7 @@ const onDateSelected = (value: string, reason: string, details: QDateDetails) => { calendar_date.value = value; - is_showing_calendar_picker.value = false; + is_showing_calendar_picker.value = false; emit('date-selected', value, reason, details); } diff --git a/src/modules/timesheet-approval/composables/use-timesheet-approval-api.ts b/src/modules/timesheet-approval/composables/use-timesheet-approval-api.ts index 952b192..ecdf20a 100644 --- a/src/modules/timesheet-approval/composables/use-timesheet-approval-api.ts +++ b/src/modules/timesheet-approval/composables/use-timesheet-approval-api.ts @@ -2,6 +2,7 @@ import { useTimesheetStore } from "src/stores/timesheet-store"; import { useAuthStore } from "src/stores/auth-store"; import type { PayPeriodReportFilters } from "../types/timesheet-approval-pay-period-report-interface"; import { default_pay_period_overview_employee, type PayPeriodOverviewEmployee } from "../types/timesheet-approval-pay-period-overview-employee-interface"; +import { date } from "quasar"; export const useTimesheetApprovalApi = () => { const timesheet_store = useTimesheetStore(); @@ -63,11 +64,29 @@ export const useTimesheetApprovalApi = () => { await timesheet_store.getTimesheetApprovalCSVReport(options); }; + const getCurrentPayPerdioOverview = async (): Promise => { + const today = date.formatDate(new Date(), 'YYYY-MM-DD'); + const success = await timesheet_store.getPayPeriodByDate(today); + if(!success) return; + + const { pay_year, pay_period_no } = timesheet_store.current_pay_period; + + await timesheet_store.getTimesheetApprovalPayPeriodEmployeeOverviews( + pay_year, + pay_period_no, + auth_store.user.email + ); + + await timesheet_store.getTimesheetsByPayPeriodAndEmail(auth_store.user.email); + + }; + return { getPayPeriodOverviewByDate, getNextPayPeriodOverview, getPayPeriodOverviewByEmployeeEmail, getTimesheetsByPayPeriodAndEmail, - getTimesheetApprovalCSVReport + getTimesheetApprovalCSVReport, + getCurrentPayPerdioOverview } }; \ No newline at end of file diff --git a/src/modules/timesheets/components/shift/timesheet-shift-comment.vue b/src/modules/timesheets/components/shift/shift-comment.vue similarity index 100% rename from src/modules/timesheets/components/shift/timesheet-shift-comment.vue rename to src/modules/timesheets/components/shift/shift-comment.vue diff --git a/src/modules/timesheets/components/shift/shifts-legend.vue b/src/modules/timesheets/components/shift/shifts-legend.vue new file mode 100644 index 0000000..039abfc --- /dev/null +++ b/src/modules/timesheets/components/shift/shifts-legend.vue @@ -0,0 +1,48 @@ + + + \ No newline at end of file diff --git a/src/modules/timesheets/components/time-sheet-employee-container.vue b/src/modules/timesheets/components/time-sheet-employee-container.vue deleted file mode 100644 index e69de29..0000000 diff --git a/src/modules/timesheets/components/timesheet/timesheet-details-shifts-row-header.vue b/src/modules/timesheets/components/timesheet/timesheet-details-shifts-row-header.vue new file mode 100644 index 0000000..37d2af7 --- /dev/null +++ b/src/modules/timesheets/components/timesheet/timesheet-details-shifts-row-header.vue @@ -0,0 +1,33 @@ + \ No newline at end of file diff --git a/src/modules/timesheets/components/timesheet/timesheet-details-shifts-row.vue b/src/modules/timesheets/components/timesheet/timesheet-details-shifts-row.vue new file mode 100644 index 0000000..6b7b8df --- /dev/null +++ b/src/modules/timesheets/components/timesheet/timesheet-details-shifts-row.vue @@ -0,0 +1,133 @@ + + + \ 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 new file mode 100644 index 0000000..a2903dd --- /dev/null +++ b/src/modules/timesheets/components/timesheet/timesheet-details-shifts.vue @@ -0,0 +1,96 @@ + + + \ No newline at end of file diff --git a/src/modules/timesheets/components/timesheet/timesheet-navigation.vue b/src/modules/timesheets/components/timesheet/timesheet-navigation.vue index 1a1136b..ada6b56 100644 --- a/src/modules/timesheets/components/timesheet/timesheet-navigation.vue +++ b/src/modules/timesheets/components/timesheet/timesheet-navigation.vue @@ -1,70 +1,53 @@