forked from verdnatura/salix-front
fix: refs #7323 use timeStamp
This commit is contained in:
parent
635ac2716d
commit
517ec87e16
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue