0
0
Fork 0

fix: refs #7197 setInvoiceInCorrecition

This commit is contained in:
Jorge Penadés 2024-06-19 16:02:43 +02:00
parent 577452df8a
commit 453e3f92e5
1 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
<script setup> <script setup>
import { ref, reactive, computed, onBeforeMount } from 'vue'; 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 { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar'; import { useQuasar } from 'quasar';
import axios from 'axios'; import axios from 'axios';
@ -129,10 +129,10 @@ onBeforeMount(async () => {
totalAmount.value = data.totalDueDay; totalAmount.value = data.totalDueDay;
}); });
onBeforeRouteLeave(async (to, from) => { onBeforeRouteUpdate(async (to, from) => {
invoiceInCorrection.correcting.length = 0; invoiceInCorrection.correcting.length = 0;
invoiceInCorrection.corrected = null; 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) { async function setInvoiceCorrection(id) {
@ -374,7 +374,7 @@ const createInvoiceInCorrection = async () => {
</template> </template>
</VnLv> </VnLv>
</template> </template>
<template #action="{ entity }"> <template #actions="{ entity }">
<QCardActions> <QCardActions>
<QBtn <QBtn
size="md" size="md"