diff --git a/components/end-of-life.vue b/components/end-of-life.vue new file mode 100644 index 00000000..45c8b6d8 --- /dev/null +++ b/components/end-of-life.vue @@ -0,0 +1,44 @@ + + + diff --git a/components/records/weekly-timesheet.vue b/components/records/weekly-timesheet.vue index 49bb8f39..6e197388 100644 --- a/components/records/weekly-timesheet.vue +++ b/components/records/weekly-timesheet.vue @@ -23,7 +23,7 @@ nl: />
- + + @@ -24,10 +26,12 @@ export default defineComponent({ const week = computed(() => parseInt(router.currentRoute.params.week, 10)); const pageTitle = computed(() => `${i18n.t('timesheets')} - ${employee.value?.name}`); + const isFreelancer = computed(() => !!employee?.value?.freelancer); + const isEndOfLife = computed(() => year.value >= 2024 && week.value >= 14); + if (!router.currentRoute.params.year || !router.currentRoute.params.week) { router.replace(format(new Date(), '/yyyy/I')); } - watch([employee], () => { if (employee.value && !employee.value?.billable) { router.push(store.state.employee.employee?.isAdmin ? '/admin/reports' : '/welcome') @@ -42,6 +46,8 @@ export default defineComponent({ employee, year, week, + isFreelancer, + isEndOfLife, }; },