0
0
Fork 0

fix: refs #7323 use timeStamp

This commit is contained in:
Jorge Penadés 2024-08-21 14:18:01 +02:00
parent 635ac2716d
commit 517ec87e16
1 changed files with 6 additions and 2 deletions

View File

@ -34,6 +34,10 @@ const weekdayStore = useWeekdayStore();
const weekDays = ref([]);
const { openConfirmationModal } = useVnConfirm();
const { getWeekOfYear } = date;
const defaultDate = computed(() => {
const timestamp = route.query.timestamp;
return timestamp ? new Date(timestamp * 1000) : Date.vnNew();
});
const workerTimeFormDialogRef = ref(null);
const workerTimeReasonFormDialogRef = ref(null);
@ -56,7 +60,7 @@ const workerTimeFormProps = reactive({
// Array utilizado por QCalendar para seleccionar un rango de fechas
const selectedCalendarDates = ref([]);
// Date formateada para bindear al componente QDate
const selectedDateFormatted = ref(toDateString(Date.vnNew()));
const selectedDateFormatted = ref(toDateString(defaultDate.value));
const arrayData = useArrayData('workerData');
@ -423,7 +427,7 @@ onBeforeMount(() => {
});
onMounted(async () => {
await setDate(Date.vnNew());
await setDate(defaultDate.value);
await getMailStates(selectedDate.value);
stateStore.rightDrawer = true;
});