-
+
+
@@ -96,6 +101,7 @@ nl:
();
@@ -168,6 +182,7 @@ export default defineComponent({
const isSaving = ref(false);
const lastSaved = ref();
+ const showEndOfLife = computed(() => isEndOfLife && !isFreelancer);
const customers = computed(() => store.state.customers.customers);
const timesheet = computed(() => store.state.timesheets.weeklyTimesheet);
const showBridgeError = computed(() => store.state.timesheets.isErrored.bridge);
@@ -408,6 +423,7 @@ export default defineComponent({
getTimesheet();
return {
+ showEndOfLife,
isLoading,
startDate,
timesheet,
diff --git a/pages/_year/_week.vue b/pages/_year/_week.vue
index af011b97..f3931e7b 100644
--- a/pages/_year/_week.vue
+++ b/pages/_year/_week.vue
@@ -5,6 +5,8 @@
:employee="employee"
:year="year"
:week="week"
+ :is-freelancer="isFreelancer"
+ :is-end-of-life="isEndOfLife"
/>
@@ -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,
};
},