From 6b25dff32a198053db9fa6ada9591475a31d8f1f Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:07:45 +0700 Subject: [PATCH] =?UTF-8?q?refactor:=20=E0=B9=81=E0=B8=88=E0=B9=89?= =?UTF-8?q?=E0=B8=87=E0=B9=80=E0=B8=95=E0=B8=B7=E0=B8=AD=E0=B8=99=E0=B8=96?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=AA=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87?= =?UTF-8?q?=E0=B8=9A=E0=B8=B8=E0=B8=84=E0=B8=A5=E0=B8=B2=E0=B8=81=E0=B8=A3?= =?UTF-8?q?=E0=B8=81=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B8=97=E0=B8=B5=E0=B9=88?= =?UTF-8?q?=E0=B8=88=E0=B8=B0=E0=B8=AA=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87?= =?UTF-8?q?=E0=B8=AA=E0=B8=B2=E0=B8=82=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../02_personnel-management/MainPage.vue | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/pages/02_personnel-management/MainPage.vue b/src/pages/02_personnel-management/MainPage.vue index 893f9366..705db843 100644 --- a/src/pages/02_personnel-management/MainPage.vue +++ b/src/pages/02_personnel-management/MainPage.vue @@ -266,7 +266,30 @@ async function openDialog( agencyFileList.value = result; } } - } else hqId.value = userStore.userOption.hqOpts[0].value; + } if(userStore.userOption.hqOpts.length !== 0) { + + hqId.value = userStore.userOption.hqOpts[0].value; + } + if(userStore.userOption.hqOpts.length === 0) { + console.log('no hq'); + + dialog({ + color: 'warning', + icon: 'mdi-alert', + title: t('warning'), + actionText: t('agree'), + persistent: true, + message: t('headquartersNotEstablished'), + action: async () => { + + }, + }); + + + return + + } + if (action === 'FORM') { modal.value = true; @@ -407,10 +430,10 @@ async function onDelete(id: string) { dialog({ color: 'negative', icon: 'mdi-trash-can-outline', - title: 'ยืนยันการลบข้อมูล', - actionText: 'ตกลง', + title: t('deleteConfirmTitle'), + actionText: t('agree'), persistent: true, - message: 'คุณต้องการลบข้อมูล ใช่หรือไม่', + message: t('deleteConfirmMessage'), action: async () => { await userStore.deleteById(id);