diff --git a/src/modules/02_organization/components/DialogFormAgency.vue b/src/modules/02_organization/components/DialogFormAgency.vue index d94a89858..500e38279 100644 --- a/src/modules/02_organization/components/DialogFormAgency.vue +++ b/src/modules/02_organization/components/DialogFormAgency.vue @@ -316,6 +316,43 @@ async function onCheckIsDeputy() { }); } +/** ถ้ามีการเลือก สกจ. และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสกจ. */ +function onChangeIsOfficer() { + if (formData.isOfficer === true && checkIsOfficer.value === true) { + dialogConfirm( + $q, + () => (formData.isOfficer = true), + "ยืนยันการแก้ไข", + "คุณต้องการแก้ไข สกจ. เป็นส่วนราชการนี้ใช่หรือไม่?", + () => (formData.isOfficer = false) + ); + } +} + +/** ถ้ามีการเลือก สำนักปลัด และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสำนักปลัด */ +function onChangeIsDeputy() { + if (formData.isDeputy == true && checkIsDeputy.value == true) { + dialogConfirm( + $q, + () => (formData.isDeputy = true), + "ยืนยันการแก้ไข", + "คุณต้องการแก้ไข สำนักปลัด เป็นส่วนราชการนี้ใช่หรือไม่?", + () => (formData.isDeputy = false) + ); + } +} + +/** + * class input + * @param val + */ +function classInput(val: boolean) { + return { + "full-width cursor-pointer ": val, + "full-width cursor-pointer inputgreen": !val, + }; +} + /** * callback function ทำงานเมื่อ props.modal เป็น true */ @@ -375,32 +412,6 @@ watch( } } ); - -/** ถ้ามีการเลือก สกจ. และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสกจ. */ -function onChangeIsOfficer() { - if (formData.isOfficer === true && checkIsOfficer.value === true) { - dialogConfirm( - $q, - () => (formData.isOfficer = true), - "ยืนยันการแก้ไข", - "คุณต้องการแก้ไข สกจ. เป็นส่วนราชการนี้ใช่หรือไม่?", - () => (formData.isOfficer = false) - ); - } -} - -/** ถ้ามีการเลือก สำนักปลัด และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสำนักปลัด */ -function onChangeIsDeputy() { - if (formData.isDeputy == true && checkIsDeputy.value == true) { - dialogConfirm( - $q, - () => (formData.isDeputy = true), - "ยืนยันการแก้ไข", - "คุณต้องการแก้ไข สำนักปลัด เป็นส่วนราชการนี้ใช่หรือไม่?", - () => (formData.isDeputy = false) - ); - } -}