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