forked from verdnatura/salix-front
fix: refs #7197 setInvoiceInCorrecition
This commit is contained in:
parent
577452df8a
commit
453e3f92e5
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue