From 81fcb1253f0870399797583df11df22498470029 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Mon, 2 Feb 2026 17:05:47 +0700 Subject: [PATCH] =?UTF-8?q?add:=20=E0=B8=9A=E0=B8=B1=E0=B8=99=E0=B8=97?= =?UTF-8?q?=E0=B8=B6=E0=B8=81=E0=B8=A3=E0=B8=B1=E0=B8=81=E0=B8=A9=E0=B8=B2?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B9=83=E0=B8=99=E0=B8=95=E0=B8=B3?= =?UTF-8?q?=E0=B9=81=E0=B8=AB=E0=B8=99=E0=B9=88=E0=B8=87=20(owner=20only)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/02_organizational/api.organization.ts | 3 ++ src/modules/17_acting/views/main.vue | 53 ++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index 6588f5db0..f2f8f34bb 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -194,4 +194,7 @@ export default { workflowCommanderSign: `${workflow}/commander/sign`, orgAssistance: (id: string) => `${orgProfile}/assistance/${id}`, + + // active รักษาการในตำแหน่งตามหน่วยงาน + activeActPosition: (id: string) => `${orgPosAct}/${id}`, }; diff --git a/src/modules/17_acting/views/main.vue b/src/modules/17_acting/views/main.vue index d634ad81b..1349a6af8 100644 --- a/src/modules/17_acting/views/main.vue +++ b/src/modules/17_acting/views/main.vue @@ -33,7 +33,9 @@ const { showLoader, hideLoader, messageError, + success, dialogRemove, + dialogConfirm, onSearchDataTable, } = useCounterMixin(); @@ -298,6 +300,36 @@ function onSearchListPerson() { ); } +function actActive(id: string, orgName: string) { + // confirm dialog active acting + dialogConfirm( + $q, + () => { + showLoader(); + http + .post(config.API.activeActPosition(id), { + activeId: id, + }) + .then(async () => { + success($q, "กำหนดรักษาการในตำแหน่งสำเร็จ"); + await fetchOrganizationActive(); + posmasterId.value = ""; + storeActing.rootId = ""; + rowPosition.value = []; + rowListPerson.value = []; + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); + }, + `ยืนยันการกำหนดรักษาการในตำแหน่ง`, + `คุณต้องการกำหนดรักษาการในตำแหน่งของ${orgName} ใช่หรือไม่?` + ); +} + onMounted(async () => { try { showLoader(); @@ -367,6 +399,16 @@ onMounted(async () => {
{{ prop.node.orgTreeName }} + บันทึกการกำหนดรักษาการ
{{ prop.node.orgCode == null ? null : prop.node.orgCode }} @@ -508,7 +550,7 @@ onMounted(async () => { v-if="props.row.posNo && props.row.isDirector" name="mdi-star" color="primary" - >ผู้อำนวยการ/หัวหน้า + >ผู้อำนวยการ/หัวหน้า
@@ -593,7 +635,14 @@ onMounted(async () => {