diff --git a/src/modules/shared/models/user.models.ts b/src/modules/shared/models/user.models.ts index d97ae27..a4c46c8 100644 --- a/src/modules/shared/models/user.models.ts +++ b/src/modules/shared/models/user.models.ts @@ -3,7 +3,7 @@ export interface User { last_name: string; email: string; role: UserRole; - user_module_access: UserModuleAccess; + user_module_access: UserModuleAccess[]; } export type UserRole = 'ADMIN' | 'SUPERVISOR' | 'HR' | 'ACCOUNTING' | 'EMPLOYEE' | 'DEALER' | 'CUSTOMER' | 'GUEST'; 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 c623cc6..eec21e6 100644 --- a/src/modules/timesheet-approval/composables/use-timesheet-approval-api.ts +++ b/src/modules/timesheet-approval/composables/use-timesheet-approval-api.ts @@ -5,10 +5,10 @@ export const useTimesheetApprovalApi = () => { const timesheet_store = useTimesheetStore(); const DATE_REGEX = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/; - const getTimesheetOverviews = async () => { + const getTimesheetOverviews = async (date?: string) => { timesheet_store.is_loading = true; - const success = await timesheet_store.getPayPeriodByDateOrYearAndNumber(); + const success = await timesheet_store.getPayPeriodByDateOrYearAndNumber(date); if (success) await timesheet_store.getTimesheetOverviews(); timesheet_store.is_loading = false;