targo-frontend/src/modules/timesheet-approval/composables/use-timesheet-approval-api.ts

18 lines
685 B
TypeScript

import { useTimesheetStore } from "src/stores/timesheet-store";
export const useTimesheetApprovalApi = () => {
const timesheet_store = useTimesheetStore();
const getCurrentAndAllPayPeriods = async () => {
await timesheet_store.getCurrentAndAllPayPeriods();
}
const getTimesheetApprovalPayPeriodEmployeeOverviews = async (year: number, period_number: number, supervisor_email: string): Promise<void> => {
await timesheet_store.getTimesheetApprovalPayPeriodEmployeeOverviews(year, period_number, supervisor_email);
}
return {
getTimesheetApprovalPayPeriodEmployeeOverviews,
getCurrentAndAllPayPeriods,
}
};