add: บันทึกรักษาการในตำแหน่ง (owner only)
This commit is contained in:
parent
28fa6fbaf7
commit
81fcb1253f
2 changed files with 54 additions and 2 deletions
|
|
@ -194,4 +194,7 @@ export default {
|
||||||
workflowCommanderSign: `${workflow}/commander/sign`,
|
workflowCommanderSign: `${workflow}/commander/sign`,
|
||||||
|
|
||||||
orgAssistance: (id: string) => `${orgProfile}/assistance/${id}`,
|
orgAssistance: (id: string) => `${orgProfile}/assistance/${id}`,
|
||||||
|
|
||||||
|
// active รักษาการในตำแหน่งตามหน่วยงาน
|
||||||
|
activeActPosition: (id: string) => `${orgPosAct}/${id}`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,9 @@ const {
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
messageError,
|
messageError,
|
||||||
|
success,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
|
dialogConfirm,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
} = useCounterMixin();
|
} = 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 () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -367,6 +399,16 @@ onMounted(async () => {
|
||||||
<div>
|
<div>
|
||||||
<div class="text-weight-medium">
|
<div class="text-weight-medium">
|
||||||
{{ prop.node.orgTreeName }}
|
{{ 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>
|
||||||
<div class="text-weight-light text-grey-8">
|
<div class="text-weight-light text-grey-8">
|
||||||
{{ prop.node.orgCode == null ? null : prop.node.orgCode }}
|
{{ prop.node.orgCode == null ? null : prop.node.orgCode }}
|
||||||
|
|
@ -508,7 +550,7 @@ onMounted(async () => {
|
||||||
v-if="props.row.posNo && props.row.isDirector"
|
v-if="props.row.posNo && props.row.isDirector"
|
||||||
name="mdi-star"
|
name="mdi-star"
|
||||||
color="primary"
|
color="primary"
|
||||||
><q-tooltip>ผู้อำนวยการ/หัวหน้า</q-tooltip>
|
><q-tooltip>ผู้อำนวยการ/หัวหน้า</q-tooltip>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
@ -593,7 +635,14 @@ onMounted(async () => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props">
|
<q-tr
|
||||||
|
:props="props"
|
||||||
|
:class="
|
||||||
|
props.row.statusReport === 'DONE'
|
||||||
|
? 'text-green'
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
>
|
||||||
<q-td
|
<q-td
|
||||||
auto-width
|
auto-width
|
||||||
v-if="
|
v-if="
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue