fix: refs #4774 fix delete translations
This commit is contained in:
parent
dc93ec8fb5
commit
2b6909d60e
|
@ -149,7 +149,7 @@ function sendPdfInvoice({ address }) {
|
|||
const createInvoiceInCorrection = async () => {
|
||||
const { data: correctingId } = await axios.post(
|
||||
'InvoiceIns/corrective',
|
||||
Object.assign(correctionFormData, { id: entityId.value })
|
||||
Object.assign(correctionFormData, { id: entityId.value }),
|
||||
);
|
||||
push({ path: `/invoice-in/${correctingId}/summary` });
|
||||
};
|
||||
|
@ -272,7 +272,6 @@ const createInvoiceInCorrection = async () => {
|
|||
>
|
||||
<template #option="{ itemProps, opt }">
|
||||
<QItem v-bind="itemProps">
|
||||
{{ console.log('opt: ', opt) }}
|
||||
<QItemSection>
|
||||
<QItemLabel
|
||||
>{{ opt.id }} -
|
||||
|
@ -311,11 +310,11 @@ const createInvoiceInCorrection = async () => {
|
|||
|
||||
<i18n>
|
||||
en:
|
||||
isNotLinked: The entry {bookEntry} has been deleted with {accountingEntries} entries
|
||||
isLinked: The entry has been linked to Sage. Please contact administration for further information
|
||||
isNotLinked: The entry {bookEntry} has been deleted with {accountingEntries} entries
|
||||
isLinked: The entry has been linked to Sage. Please contact administration for further information
|
||||
assertAction: Are you sure you want to {action} this invoice?
|
||||
es:
|
||||
isNotLinked: Se ha eliminado el asiento nº {bookEntry} con {accountingEntries} apuntes
|
||||
isLinked: El asiento fue enlazado a Sage, por favor contacta con administración
|
||||
isNotLinked: Se ha eliminado el asiento nº {bookEntry} con {accountingEntries} apuntes
|
||||
isLinked: El asiento fue enlazado a Sage, por favor contacta con administración
|
||||
assertAction: Estas seguro de querer {action} esta factura?
|
||||
</i18n>
|
||||
|
|
|
@ -69,7 +69,7 @@ async function loadTable(data) {
|
|||
|
||||
row.en = row[field.value];
|
||||
const translation = originalData.value.find(
|
||||
(o) => o.lang == lang.value && o[primaryKey.value] == row[primaryKey.value]
|
||||
(o) => o.lang == lang.value && o[primaryKey.value] == row[primaryKey.value],
|
||||
);
|
||||
|
||||
row[lang.value] = translation?.[field.value];
|
||||
|
@ -90,6 +90,7 @@ function resetOriginalData() {
|
|||
}
|
||||
|
||||
async function save(data, changes) {
|
||||
const { deletes } = data;
|
||||
const { updates, creates } = changes();
|
||||
|
||||
for (const update of updates ?? []) {
|
||||
|
@ -105,7 +106,7 @@ async function save(data, changes) {
|
|||
delete create[lang.value];
|
||||
}
|
||||
|
||||
await axios.post(url.value + '/crud', { updates, creates });
|
||||
await axios.post(url.value + '/crud', { updates, creates, deletes });
|
||||
tableRef.value.reload();
|
||||
tableRef.value.CrudModelRef.hasChanges = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue