refactor: แจ้งเตือนถ้าสร้างบุคลากรก่อนที่จะสร้างสาขา
This commit is contained in:
parent
f0fadfdc1b
commit
6b25dff32a
1 changed files with 27 additions and 4 deletions
|
|
@ -266,7 +266,30 @@ async function openDialog(
|
||||||
agencyFileList.value = result;
|
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') {
|
if (action === 'FORM') {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
|
|
@ -407,10 +430,10 @@ async function onDelete(id: string) {
|
||||||
dialog({
|
dialog({
|
||||||
color: 'negative',
|
color: 'negative',
|
||||||
icon: 'mdi-trash-can-outline',
|
icon: 'mdi-trash-can-outline',
|
||||||
title: 'ยืนยันการลบข้อมูล',
|
title: t('deleteConfirmTitle'),
|
||||||
actionText: 'ตกลง',
|
actionText: t('agree'),
|
||||||
persistent: true,
|
persistent: true,
|
||||||
message: 'คุณต้องการลบข้อมูล ใช่หรือไม่',
|
message: t('deleteConfirmMessage'),
|
||||||
action: async () => {
|
action: async () => {
|
||||||
await userStore.deleteById(id);
|
await userStore.deleteById(id);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue