forked from verdnatura/salix-front
fix: refs #7197 setInvoiceInCorrecition
This commit is contained in:
parent
577452df8a
commit
453e3f92e5
|
@ -1,6 +1,6 @@
|
|||
<script setup>
|
||||
import { ref, reactive, computed, onBeforeMount } from 'vue';
|
||||
import { useRouter, onBeforeRouteLeave } from 'vue-router';
|
||||
import { useRouter, onBeforeRouteUpdate } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useQuasar } from 'quasar';
|
||||
import axios from 'axios';
|
||||
|
@ -129,10 +129,10 @@ onBeforeMount(async () => {
|
|||
totalAmount.value = data.totalDueDay;
|
||||
});
|
||||
|
||||
onBeforeRouteLeave(async (to, from) => {
|
||||
onBeforeRouteUpdate(async (to, from) => {
|
||||
invoiceInCorrection.correcting.length = 0;
|
||||
invoiceInCorrection.corrected = null;
|
||||
if (to.params.id !== from.params.id) await setInvoiceCorrection(entityId.value);
|
||||
if (to.params.id !== from.params.id) await setInvoiceCorrection(to.params.id);
|
||||
});
|
||||
|
||||
async function setInvoiceCorrection(id) {
|
||||
|
@ -374,7 +374,7 @@ const createInvoiceInCorrection = async () => {
|
|||
</template>
|
||||
</VnLv>
|
||||
</template>
|
||||
<template #action="{ entity }">
|
||||
<template #actions="{ entity }">
|
||||
<QCardActions>
|
||||
<QBtn
|
||||
size="md"
|
||||
|
|
Loading…
Reference in New Issue