diff --git a/src/components/Dialogs/DialogDebug.vue b/src/components/Dialogs/DialogDebug.vue index 42230b6f4..e84ef99da 100644 --- a/src/components/Dialogs/DialogDebug.vue +++ b/src/components/Dialogs/DialogDebug.vue @@ -354,11 +354,6 @@ function onClose() {
-
-
- ผู้ดูแลระบบจะติดต่อกลับผ่านทางอีเมลที่ท่านระบุ กรุณาตรวจสอบอีเมลของท่านเป็นระยะ -
-
@@ -384,6 +378,12 @@ function onClose() { v-model="formData.phone" class="inputgreen" hide-bottom-space + :rules="[ + () => + !!formData.email || + !!formData.phone || + 'กรุณากรอกอีเมลหรือเบอร์โทรติดต่อกลับ', + ]" />
diff --git a/src/modules/04_registryPerson/views/edit/components/FormPosition.vue b/src/modules/04_registryPerson/views/edit/components/FormPosition.vue index b6ef8c829..c30fec131 100644 --- a/src/modules/04_registryPerson/views/edit/components/FormPosition.vue +++ b/src/modules/04_registryPerson/views/edit/components/FormPosition.vue @@ -706,7 +706,6 @@ function classInput(val: boolean) { hide-bottom-space autocomplete="on" name="organization" - :label="`${'หน่วยงาน'}`" /> diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 557139d8b..bdf4ae494 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -1056,7 +1056,7 @@ onMounted(async () => { checkPermission($route)?.attrIsUpdate && props.row.isDraft && props.row.statusId === 'PREPARE-CONTAIN' && - (DataStore.isOfficer || checkPermission($route)?.attrOwnership == 'OWNER') + DataStore.isOfficer " clickable v-close-popup diff --git a/src/modules/18_command/components/Step/1_Detail.vue b/src/modules/18_command/components/Step/1_Detail.vue index 2a3f3b60f..ff3f564a6 100644 --- a/src/modules/18_command/components/Step/1_Detail.vue +++ b/src/modules/18_command/components/Step/1_Detail.vue @@ -61,6 +61,7 @@ let formData = reactive({ }); const commandVolume = ref(""); //เล่มที่ const commandChapter = ref(""); //ตอนที่ +const isIdofficer = ref(false); //เช็ค สกจ. const rows = ref>([]); const columns = ref([ @@ -113,7 +114,17 @@ const visibleColumns = ref>([ const modalAddOperator = ref(false); // แสดงเพิ่มรายชื่อลงนามในแนบท้ายคำสั่ง - +/** ฟังก์ชันเช็ค สกจ.*/ +async function fetchCheckIdofficer() { + await http + .get(config.API.checkIdofficer) + .then((res) => { + isIdofficer.value = res.data.result; + }) + .catch((err) => { + messageError($q, err); + }); +} /** * ฟังก์ชันบันทึกข้อมูลรายละเอียดคำสั่ง @@ -122,7 +133,7 @@ const modalAddOperator = ref(false); // แสดงเพิ่มร async function onSubmit() { //ถ้าเป็น สกจ. ต้องเลือกประเภทคำสั่งด้วย if ( - store.isIdofficer && + isIdofficer.value && formData.isBangkok !== "BANGKOK" && formData.isBangkok !== "OFFICE" ) { @@ -214,6 +225,7 @@ function onDeleteData(id: string) { onMounted(async () => { try { showLoader(); + await fetchCheckIdofficer(); await fetchDataOperatorList(); formData.commandNo = props.formCommandList.commandNo; formData.commandYear = props.formCommandList.commandYear; @@ -223,7 +235,7 @@ onMounted(async () => { formData.issue = props.formCommandList.issue; formData.commandAffectDate = props.formCommandList.commandAffectDate; formData.commandExcecuteDate = props.formCommandList.commandExcecuteDate; - formData.isBangkok = !store.isIdofficer + formData.isBangkok = !isIdofficer.value ? null : props.formCommandList.isBangkok; commandCode.value = props.formCommandList.commandCode; @@ -488,7 +500,7 @@ onMounted(async () => {
{ const readonly = ref(false); const dataCommand = ref(); const status = ref(""); - const isSalary = ref(false); - const isIdofficer = ref(false); + const isSalary = ref(false) function checkStep(val: string) { status.value = val; switch (val) { @@ -40,7 +39,6 @@ export const useCommandDetail = defineStore("commandDetailStore", () => { readonly, status, dataCommand, - isSalary, - isIdofficer, + isSalary }; }); diff --git a/src/modules/18_command/views/detail.vue b/src/modules/18_command/views/detail.vue index 5e41124dc..37ab3326f 100644 --- a/src/modules/18_command/views/detail.vue +++ b/src/modules/18_command/views/detail.vue @@ -92,25 +92,12 @@ async function fetchDataCommandList() { }); } -/** ฟังก์ชันเช็ค สกจ.*/ -async function fetchCheckIdofficer() { - await http - .get(config.API.checkIdofficer) - .then((res) => { - store.isIdofficer = res.data.result; - }) - .catch((err) => { - messageError($q, err); - }); -} - /** * ทำงานเมื่อ Components ถูกเรียกใช้งาน * กำหนดค่า `store.readonly` เมื่อ route.name เป็น "commandViewDetailPage" จะอ่านข้อมูลได้อย่างเดียว */ onMounted(async () => { await fetchDataCommandList(); - await fetchCheckIdofficer(); store.readonly = route.name === "commandViewDetailPage" || formCommandList.status === "REPORTED" ||