diff --git a/components/records/weekly-timesheet-row-leave.vue b/components/records/weekly-timesheet-row-leave.vue index 322a6e93..d2151bcc 100644 --- a/components/records/weekly-timesheet-row-leave.vue +++ b/components/records/weekly-timesheet-row-leave.vue @@ -39,7 +39,7 @@ nl: - - {{ totalValue }} @@ -110,7 +91,7 @@ export default defineComponent({ } }, emits: ['refresh'], - setup(props: { workscheme: WorkScheme[], status: TimesheetStatus }) { + setup(props: { workscheme: WorkScheme[], status: TimesheetStatus, showWeekends: boolean }) { const totalValue = computed(() => { const total = props.workscheme.reduce((prev: number, curr: WorkScheme) => prev + curr.absenceHours, 0); return hoursToHHmm(total) @@ -120,9 +101,14 @@ export default defineComponent({ return props.status === (recordStatus.NEW as TimesheetStatus); }) + const workschemeDays = computed(() => { + return props.showWeekends ? props.workscheme : props.workscheme.slice(0, 5) + }) + return { totalValue, allowRefresh, + workschemeDays }; }, });