CambiosSolicitadosEntries #201
|
@ -59,6 +59,10 @@ const $props = defineProps({
|
|||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
clearStoreOnUnmount: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['onFetch', 'onDataSaved']);
|
||||
|
@ -91,7 +95,12 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
state.unset($props.model);
|
||||
// Restauramos los datos originales en el store si se realizaron cambios en el formulario pero no se guardaron, evitando modificaciones erróneas.
|
||||
if (hasChanges.value) {
|
||||
state.set($props.model, originalData.value);
|
||||
return;
|
||||
}
|
||||
if ($props.clearStoreDataOnUnmount) state.unset($props.model);
|
||||
});
|
||||
|
||||
const isLoading = ref(false);
|
||||
|
|
|
@ -61,6 +61,7 @@ const onFilterTravelSelected = (formData, id) => {
|
|||
:url-update="`Entries/${route.params.id}`"
|
||||
model="entry"
|
||||
auto-load
|
||||
:clear-store-on-unmount="false"
|
||||
jsegarra marked this conversation as resolved
|
||||
>
|
||||
<template #form="{ data }">
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
|
|
|
@ -97,17 +97,6 @@ const getEntryRedirectionFilter = (entry) => {
|
|||
});
|
||||
};
|
||||
|
||||
const refetchEntryDescriptorData = async () => {
|
||||
await entryDescriptorRef.value.getData();
|
||||
};
|
||||
|
||||
watch(
|
||||
() => route.name,
|
||||
async (_, from) => {
|
||||
if (from === 'EntryBasicData') await refetchEntryDescriptorData();
|
||||
}
|
||||
);
|
||||
|
||||
const showEntryReport = () => {
|
||||
openReport(`Entries/${route.params.id}/entry-order-pdf`);
|
||||
jsegarra marked this conversation as resolved
Outdated
jsegarra
commented
Yo movería la línea si refetch solo hace eso Yo movería la línea si refetch solo hace eso
wbuezas
commented
Quedo solucionado en el siguiente commit: Quedo solucionado en el siguiente commit: https://gitea.verdnatura.es/verdnatura/salix-front/commit/740eedbe44f9bb0d8095efb4fe89371040543807
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Ya que tenemos que resolver conflictos, podemos poner el icono relleno con "font-variation-settings: 'FILL' 1;"
Añadido!
Commit:
fe8e4a8342