From a4747e1f899ba0567c76cbf79f65a0e34917c997 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Fri, 6 Oct 2023 15:08:22 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B8=AD?= =?UTF-8?q?=E0=B8=B1=E0=B8=9E=E0=B9=82=E0=B8=AB=E0=B8=A5=E0=B8=94=E0=B8=A3?= =?UTF-8?q?=E0=B8=B9=E0=B8=9B=E0=B8=96=E0=B9=88=E0=B8=B2=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/01_exam/components/ExamForm.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/01_exam/components/ExamForm.vue b/src/modules/01_exam/components/ExamForm.vue index 30bea2b..dfe1101 100644 --- a/src/modules/01_exam/components/ExamForm.vue +++ b/src/modules/01_exam/components/ExamForm.vue @@ -233,10 +233,15 @@ const saveForm = async () => { const clickSave = async () => { saveAuto.value = false - await saveData() + if (defaultInformation.value.profileImg == null || '') { + notifyError($q, 'กรุณาอัพโหลดรูปถ่าย') + } else { + await saveData() + } } const saveData = async () => { + //เช็ครูป await formInformation.value.validate().then(async (suc: boolean) => { if (suc) { await formAddress.value.validate().then(async (suc: boolean) => { @@ -304,7 +309,8 @@ const saveData = async () => { contactfirstname: defaultContact.value.contactfirstname, contactlastname: defaultContact.value.contactlastname, contactrelations: defaultContact.value.contactrelations, - contacttel: defaultContact.value.contacttel + contacttel: defaultContact.value.contacttel, + profileImg: defaultInformation.value.profileImg }) .then(async () => { success($q, 'บันทึกข้อมูลส่วนตัวสำเร็จ')