+
+
+
+ :initial-state="props.row.is_approved"
+ @click-details="email => onClickedDetails(email, props.row.employee_name)"
+ />
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 98a03c8..fd6b6bd 100644
--- a/src/modules/timesheet-approval/components/timesheet-approval-period-picker.vue
+++ b/src/modules/timesheet-approval/components/timesheet-approval-period-picker.vue
@@ -14,8 +14,8 @@
const emit = defineEmits<{
'date-selected': [value: string, reason?: string, details?: QDateDetails]
- 'pressed-previous-button': void
- 'pressed-next-button': void
+ 'pressed-previous-button': []
+ 'pressed-next-button': []
}>();
const onDateSelected = (value: string, reason: string, details: QDateDetails) => {
@@ -31,7 +31,7 @@
push rounded
icon="keyboard_arrow_left"
color="primary"
- @click="$emit('pressed-previous-button')"
+ @click="emit('pressed-previous-button')"
:disable="props.isPreviousLimit || props.isDisabled"
class="q-mr-sm q-px-sm"
/>
@@ -47,7 +47,7 @@
push rounded
icon="keyboard_arrow_right"
color="primary"
- @click="$emit('pressed-next-button')"
+ @click="emit('pressed-next-button')"
:disable="props.isDisabled"
class="q-ml-sm q-px-sm"
/>
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 16b8b6d..baf85b8 100644
--- a/src/modules/timesheet-approval/composables/use-timesheet-approval-api.ts
+++ b/src/modules/timesheet-approval/composables/use-timesheet-approval-api.ts
@@ -40,8 +40,13 @@ export const useTimesheetApprovalApi = () => {
}
}
+ const getTimesheetsByPayPeriodAndEmail = async (employee_email: string) => {
+ await timesheet_store.getTimesheetsByPayPeriodAndEmail(employee_email);
+ }
+
return {
getPayPeriodOverviewByDate,
getNextPayPeriodOverview,
+ getTimesheetsByPayPeriodAndEmail
}
};
\ No newline at end of file
diff --git a/src/modules/timesheet-approval/pages/timesheet-approval.vue b/src/modules/timesheet-approval/pages/timesheet-approval.vue
index 8c00a74..391bc69 100644
--- a/src/modules/timesheet-approval/pages/timesheet-approval.vue
+++ b/src/modules/timesheet-approval/pages/timesheet-approval.vue
@@ -13,12 +13,18 @@
year: 'numeric',
};
-
const pay_period_label = computed(() => {
const dates = timesheet_store.current_pay_period.label.split('.');
const start_date = new Intl.DateTimeFormat(locale.value, date_options).format(date.extractDate(dates[0] as string, 'YYYY-MM-DD'));
const end_date = new Intl.DateTimeFormat(locale.value, date_options).format(date.extractDate(dates[1] as string, 'YYYY-MM-DD'));
+ if ( dates.length === 1 ) {
+ return {
+ start_date: '—',
+ end_date: '—'
+ }
+ }
+
return { start_date, end_date };
});
@@ -42,6 +48,7 @@
{{ pay_period_label.end_date }}