รายชื่อผู้สอบในรอบ => คืนตำแหน่ง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-06-05 13:49:01 +07:00
parent fde7bd6f11
commit 2c0823f700

View file

@ -675,6 +675,30 @@ watch(containStatus, () => {
}
});
function onRestorePos(id: string) {
dialogConfirm(
$q,
async () => {
showLoader();
await http
.post(config.API.clearPosition(id), {})
.then(() => {
success($q, "คืนตำแหน่งสำเร็จ");
getTable();
props.statCard();
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
hideLoader();
});
},
"ยืนยันการคืนตำแหน่ง",
"ต้องการยืนยันการคืนตำแหน่งนี้ใช่หรือไม่ ?"
);
}
onMounted(async () => {
if (keycloak.tokenParsed != null) {
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
@ -869,6 +893,29 @@ onMounted(async () => {
>เลอกหนวยงานทบบรรจและแตงต</q-item-section
>
</q-item>
<q-item
v-if="
roleAdmin &&
props.row.draft === 'รอส่งตัว' &&
props.row.statusId === 'PREPARE-CONTAIN'
"
clickable
v-close-popup
@click="onRestorePos(props.row.personalId)"
>
<q-item-section
style="min-width: 0px"
avatar
class="q-py-sm"
>
<q-icon
color="orange-7"
size="xs"
name="mdi-backup-restore"
/>
</q-item-section>
<q-item-section>นคาตำแหน</q-item-section>
</q-item>
<q-item
v-if="
props.row.bmaOfficer !== 'บุคคลภายนอก' &&