From 46bced52a6dbd388d1ba022a2669d91be7a2d159 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 20 Jan 2025 11:46:58 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87?= =?UTF-8?q?=E0=B8=AA=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=AD=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=A3=E0=B8=B2=E0=B8=81=E0=B8=B3=E0=B8=A5=E0=B8=B1?= =?UTF-8?q?=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DialogFormAgency.vue | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/modules/02_organization/components/DialogFormAgency.vue b/src/modules/02_organization/components/DialogFormAgency.vue index 31963fbd6..53f3f93f5 100644 --- a/src/modules/02_organization/components/DialogFormAgency.vue +++ b/src/modules/02_organization/components/DialogFormAgency.vue @@ -121,28 +121,25 @@ function onSubmit() { ["org" + type + "Fax"]: formData.orgFax, ["org" + type + "Rank"]: formData.orgLevel, ["org" + type + "RankSub"]: formData.orgLevelSub, - misId: formData.misId, + misId: formData.misId ? formData.misId : "", + isDeputy: + type === "Root" + ? formData.isDeputy + ? formData.isDeputy + : false + : undefined, + isOfficer: + type === "Child1" + ? formData.isOfficer + ? formData.isOfficer + : false + : undefined, [nameId]: rootId, responsibility: formData.responsibility != null ? formData.responsibility : "", }; - if (type === "Root") { - body = { - ...body, - isDeputy: - formData.isDeputy !== undefined ? String(formData.isDeputy) : "", - }; - } - if (type === "Child1") { - body = { - ...body, - isOfficer: - formData.isOfficer !== undefined ? String(formData.isOfficer) : "", - }; - } - //เพิ่มข้อมูล if (actionType.value === "ADD") { await http @@ -208,6 +205,7 @@ function closeClear() { formData.orgLevel = ""; formData.responsibility = ""; formData.isOfficer = false; + formData.isDeputy = false; formData.misId = ""; props.close?.(); }