Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 2m42s

* develop:
  add: บันทึกรักษาการในตำแหน่ง (owner only)
This commit is contained in:
Warunee Tamkoo 2026-02-02 17:06:03 +07:00
commit 67066797fd
2 changed files with 54 additions and 2 deletions

View file

@ -194,4 +194,7 @@ export default {
workflowCommanderSign: `${workflow}/commander/sign`,
orgAssistance: (id: string) => `${orgProfile}/assistance/${id}`,
// active รักษาการในตำแหน่งตามหน่วยงาน
activeActPosition: (id: string) => `${orgPosAct}/${id}`,
};

View file

@ -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 () => {
<div>
<div class="text-weight-medium">
{{ prop.node.orgTreeName }}
<q-icon
v-if="checkPermission($route)?.attrOwnership == 'OWNER'"
name="mdi-content-save-edit"
color="blue"
@click.stop="
actActive(prop.node.orgTreeId, prop.node.orgTreeName)
"
size="xs"
><q-tooltip> นทกการกำหนดรกษาการ </q-tooltip></q-icon
>
</div>
<div class="text-weight-light text-grey-8">
{{ 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"
><q-tooltip>อำนวยการ/วหน</q-tooltip>
><q-tooltip>อำนวยการ/วหน</q-tooltip>
</q-icon>
</div>
<div v-else>
@ -593,7 +635,14 @@ onMounted(async () => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-tr
:props="props"
:class="
props.row.statusReport === 'DONE'
? 'text-green'
: ''
"
>
<q-td
auto-width
v-if="