diff --git a/src/i18n/en-ca/index.ts b/src/i18n/en-ca/index.ts index 10ac12f..e8d7503 100644 --- a/src/i18n/en-ca/index.ts +++ b/src/i18n/en-ca/index.ts @@ -201,7 +201,8 @@ export default { REGULAR: "Regular", SICK: "Sick Leave", VACATION: "Vacation", - REMOTE: "Remote work", + REMOTE: "Remote", + OFFICE: "Office", }, fields: { start: "Start (HH:mm)", diff --git a/src/i18n/fr-ca/index.ts b/src/i18n/fr-ca/index.ts index 459feab..814a404 100644 --- a/src/i18n/fr-ca/index.ts +++ b/src/i18n/fr-ca/index.ts @@ -203,6 +203,7 @@ export default { SICK: "Maladie", VACATION: "Vacance", REMOTE: "Télétravail", + OFFICE: "Bureau", }, fields: { start: "Début (HH:mm)", diff --git a/src/modules/timesheets/components/expense-dialog.vue b/src/modules/timesheets/components/expense-dialog.vue index 4ea59a8..4535c11 100644 --- a/src/modules/timesheets/components/expense-dialog.vue +++ b/src/modules/timesheets/components/expense-dialog.vue @@ -13,6 +13,10 @@ const expense_store = useExpensesStore(); + const { isApproved = false} = defineProps<{ + isApproved?: boolean; + }>(); + const onClickExpenseCreate = () => { expense_store.mode = 'create'; expense_store.current_expense = new Expense(date.formatDate(new Date(), 'YYYY-MM-DD')); @@ -50,6 +54,7 @@ /> ('shift', { required: true }); const shift_type_selected = ref(SHIFT_OPTIONS.find(option => option.value == shift.value.type)); const select_ref = useTemplateRef('select'); @@ -98,7 +98,7 @@
@@ -168,7 +168,7 @@ menu-anchor="bottom middle" menu-self="top middle" :options="SHIFT_OPTIONS" - class="col rounded-5 q-mx-xs bg-dark q-pt-xs" + class="col rounded-5 q-mx-xs bg-dark" :class="!shift.is_approved && !isTimesheetApproved ? '' : 'inset-shadow'" popup-content-class="text-uppercase text-weight-bold text-center rounded-5" :style="shift.is_approved ? 'background-color: #0a7d32 !important;' : ''" @@ -178,23 +178,67 @@ > + +
@@ -260,26 +304,24 @@ -
- - +
+ > + diff --git a/src/modules/timesheets/components/timesheet-wrapper.vue b/src/modules/timesheets/components/timesheet-wrapper.vue index a392b6e..46af1ae 100644 --- a/src/modules/timesheets/components/timesheet-wrapper.vue +++ b/src/modules/timesheets/components/timesheet-wrapper.vue @@ -22,6 +22,8 @@ const shift_api = useShiftApi(); const has_shift_errors = computed(() => timesheet_store.all_current_shifts.filter(shift => shift.has_error === true).length > 0); + const is_timesheets_approved = computed(() => timesheet_store.timesheets.every(timesheet => timesheet.is_approved)) + const { mode = 'normal' } = defineProps<{ mode?: 'approval' | 'normal'; }>(); @@ -65,7 +67,7 @@ - +
\ No newline at end of file