fix(approval): still trying to fix email issue.

This commit is contained in:
Nic D 2026-01-27 15:38:39 -05:00
parent 7e4b163aa4
commit e8d9e9c4dc
3 changed files with 9 additions and 8 deletions

View File

@ -4,7 +4,7 @@
>
import { useI18n } from 'vue-i18n';
import { computed, onMounted, ref } from 'vue';
import { QSelect, QInput, useQuasar, QSelectProps } from 'quasar';
import { QSelect, QInput, useQuasar, type QSelectProps } from 'quasar';
import { useUiStore } from 'src/stores/ui-store';
import { SHIFT_OPTIONS } from 'src/modules/timesheets/utils/shift.util';
import type { Shift } from 'src/modules/timesheets/models/shift.models';

View File

@ -9,9 +9,9 @@
import { useTimesheetStore } from 'src/stores/timesheet-store';
import { useShiftApi } from 'src/modules/timesheets/composables/use-shift-api';
import { useTimesheetApi } from 'src/modules/timesheets/composables/use-timesheet-api';
import { isShiftOverlap } from 'src/modules/timesheets/utils/shift.util';
import type { Shift } from 'src/modules/timesheets/models/shift.models';
import type { TimesheetDay } from 'src/modules/timesheets/models/timesheet.models';
import { isShiftOverlap } from 'src/modules/timesheets/utils/shift.util';
// ================== State ==================
@ -33,6 +33,7 @@
const timesheet_store = useTimesheetStore();
const preset_mouseover = ref(false);
const shift_error_message = ref<string | undefined>();
const employeeEmail = inject<string>('employeeEmail');
// ================== Methods ==================
@ -41,7 +42,8 @@
shift.id = 0;
emit('deleteUnsavedShift');
} else {
await shift_api.deleteShiftById(shift.id, timesheet_store.current_pay_period_overview?.email ?? undefined);
console.log('email: ', employeeEmail);
await shift_api.deleteShiftById(shift.id, employeeEmail);
}
if (day.shifts.length < 2 && shift_error_message.value !== undefined) {

View File

@ -14,9 +14,12 @@
import type { TimesheetDay } from 'src/modules/timesheets/models/timesheet.models';
import { useI18n } from 'vue-i18n';
const CURRENT_DATE_STRING = new Date().toISOString().slice(0, 10);
const emit = defineEmits<{
'onCurrentDayComponentFound': [component: HTMLElement | undefined];
}>();
const { extractDate } = date;
const { locale } = useI18n();
const q = useQuasar();
@ -31,10 +34,6 @@
const animation_style = computed(() => ui_store.is_mobile_mode ? mobile_animation_direction.value : 'fadeInDown');
const emit = defineEmits<{
'onCurrentDayComponentFound': [component: HTMLElement | undefined];
}>();
const addNewShift = (day_shifts: Shift[], date: string, timesheet_id: number) => {
ui_store.focus_next_component = true;
const new_shift = new Shift;