From d97f69456327c153b0defc6e46d9277269554513 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 23 Nov 2023 08:42:09 +0100 Subject: [PATCH] refs #5835 upsert refactor --- src/pages/InvoiceIn/Card/InvoiceInBasicData.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue index b169339d4..20144d8ca 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInBasicData.vue @@ -102,7 +102,7 @@ async function upsert() { formData.append(dms.value.files[i].name, dms.value.files[i]); dms.value.hasFileAttached = true; } - const url = !isEdit ? 'Dms/uploadFile' : `dms/${dms.value.id}/updateFile`; + const url = isEdit ? `dms/${dms.value.id}/updateFile` : 'Dms/uploadFile'; const { data } = await axios.post(url, formData, { params: dms.value, }); @@ -111,7 +111,7 @@ async function upsert() { if (!isEdit) { createDmsRef.value.hide(); - } else if (isEdit) { + } else { editDmsRef.value.hide(); }