diff --git a/src/modules/04_registryNew/views/detailView.vue b/src/modules/04_registryNew/views/detailView.vue index f8d5b02d0..652113a19 100644 --- a/src/modules/04_registryNew/views/detailView.vue +++ b/src/modules/04_registryNew/views/detailView.vue @@ -421,18 +421,17 @@ function closePassaway() { dialogPassaway.value = false; } -async function clickSaveDeceased() { - const formData = new FormData(); - formData.append("File", filePassaway.value); - formData.append("Number", deathCertificateNo.value); - formData.append("Date", dateToISO(dateDeath.value)); - formData.append("Location", placeDeathCertificate.value); - formData.append("Reason", reasonDeath.value); - formData.append("ProfileId", profileId.value); - - dialogConfirm($q, () => { +function clickSaveDeceased() { + dialogConfirm($q, async () => { showLoader(); - http + const formData = new FormData(); + formData.append("File", filePassaway.value); + formData.append("Number", deathCertificateNo.value); + formData.append("Date", dateToISO(dateDeath.value)); + formData.append("Location", placeDeathCertificate.value); + formData.append("Reason", reasonDeath.value); + formData.append("ProfileId", profileId.value); + await http .post(config.API.listDeceased(), formData) .then(() => { success($q, "บันทึกข้อมูลสำเร็จ"); @@ -740,7 +739,7 @@ onMounted(async () => { -