feat(placement): add UpdateDraftStatus menu option
This commit is contained in:
parent
0d5cb36fb2
commit
c700cf0abd
2 changed files with 47 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ export default {
|
||||||
placementDefermentInfo: (id: string) => `${placement}/pass/deferment/${id}`,
|
placementDefermentInfo: (id: string) => `${placement}/pass/deferment/${id}`,
|
||||||
placementDisclaimInfo: (id: string) => `${placement}/pass/disclaim/${id}`,
|
placementDisclaimInfo: (id: string) => `${placement}/pass/disclaim/${id}`,
|
||||||
placementUpdatePass: `${placement}/pass/update-status`,
|
placementUpdatePass: `${placement}/pass/update-status`,
|
||||||
|
placementUpdateDraftStatus: `${placement}/update/draft-status`,
|
||||||
|
|
||||||
//personal
|
//personal
|
||||||
placementPersonalId: (personalId: string) =>
|
placementPersonalId: (personalId: string) =>
|
||||||
|
|
|
||||||
|
|
@ -967,6 +967,28 @@ function onUpdateStatus(id: string) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onUpdateDraftStatus(id: string) {
|
||||||
|
dialogConfirm(
|
||||||
|
$q,
|
||||||
|
async () => {
|
||||||
|
showLoader();
|
||||||
|
try {
|
||||||
|
await http.post(config.API.placementUpdateDraftStatus, {
|
||||||
|
personalId: id,
|
||||||
|
});
|
||||||
|
await success($q, "บันทึกสำเร็จ");
|
||||||
|
await getTable();
|
||||||
|
} catch (error) {
|
||||||
|
messageError($q, error);
|
||||||
|
} finally {
|
||||||
|
hideLoader();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ยืนยันการยกเลิกการส่งตัว",
|
||||||
|
"ต้องการยกเลิกการส่งตัวรายชื่อนี้ใช่หรือไม่ ?"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getWorkFlow();
|
await getWorkFlow();
|
||||||
await getTable();
|
await getTable();
|
||||||
|
|
@ -1029,6 +1051,30 @@ onMounted(async () => {
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>รายละเอียด</q-item-section>
|
<q-item-section>รายละเอียด</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
<q-item
|
||||||
|
v-if="
|
||||||
|
checkPermission($route)?.attrIsUpdate &&
|
||||||
|
props.row.isDraft &&
|
||||||
|
props.row.statusId === 'PREPARE-CONTAIN' &&
|
||||||
|
DataStore.isOfficer
|
||||||
|
"
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="onUpdateDraftStatus(props.row.personalId)"
|
||||||
|
>
|
||||||
|
<q-item-section
|
||||||
|
style="min-width: 0px"
|
||||||
|
avatar
|
||||||
|
class="q-py-sm"
|
||||||
|
>
|
||||||
|
<q-icon
|
||||||
|
color="red"
|
||||||
|
size="xs"
|
||||||
|
name="mdi-account-arrow-left-outline"
|
||||||
|
/>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>ยกเลิกการส่งตัว</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
v-if="
|
v-if="
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue