fix(approvals): adjustments to date changes on approval page.
This commit is contained in:
parent
097fe9db3c
commit
a0ae870ef3
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user