fix bug
This commit is contained in:
parent
51707646e7
commit
df481043b1
9 changed files with 138 additions and 91 deletions
|
|
@ -19,13 +19,13 @@ import type {
|
|||
import type { DataPosition } from "@/modules/02_organization/interface/index/organizational";
|
||||
|
||||
/** importComponents*/
|
||||
import DialogFormPosotion from "@/modules/02_organization/components/DialogFormPosition.vue";
|
||||
import DialogPositionDetail from "@/modules/02_organization/components/DialogPositionDetail.vue";
|
||||
import DialogSort from "@/modules/02_organization/components/DialogSortPosition.vue";
|
||||
import DialogMovePos from "@/modules/02_organization/components/DialogMovePos.vue";
|
||||
import DialogHistoryPos from "@/modules/02_organization/components/DialogHistoryPos.vue";
|
||||
import DialogSelectPerson from "@/modules/02_organization/components/DialogSelectPerson.vue";
|
||||
import DialogSuccession from "@/modules/02_organization/components/DialogSuccession.vue";
|
||||
import DialogFormPosotion from "@/modules/02_organization/components/DialogFormPosition.vue"; //อัตรากำลัง
|
||||
import DialogPositionDetail from "@/modules/02_organization/components/DialogPositionDetail.vue"; //รายละเอียดตำแหน่ง
|
||||
import DialogSort from "@/modules/02_organization/components/DialogSortPosition.vue"; // จัดลำดับ
|
||||
import DialogMovePos from "@/modules/02_organization/components/DialogMovePos.vue"; // ย้ายตำแหน่ง
|
||||
import DialogHistoryPos from "@/modules/02_organization/components/DialogHistoryPos.vue"; // ประวัติตำแหน่ง
|
||||
import DialogSelectPerson from "@/modules/02_organization/components/DialogSelectPerson.vue"; // เลือกคนครอง
|
||||
import DialogSuccession from "@/modules/02_organization/components/DialogSuccession.vue"; // สืบทอดตำแหน่ง
|
||||
|
||||
/** importStore*/
|
||||
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
||||
|
|
@ -291,10 +291,17 @@ function onClickDelete(id: string) {
|
|||
showLoader();
|
||||
await http
|
||||
.delete(config.API.orgPosMasterById(id))
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
props.fetchDataTable?.(reqMaster.value.id, reqMaster.value.type, false);
|
||||
getSummary();
|
||||
.then(async () => {
|
||||
await Promise.all([
|
||||
props.fetchDataTable?.(
|
||||
reqMaster.value.id,
|
||||
reqMaster.value.type,
|
||||
false
|
||||
),
|
||||
getSummary(),
|
||||
]);
|
||||
|
||||
await success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -357,14 +364,16 @@ function removePerson(id: string) {
|
|||
showLoader();
|
||||
await http
|
||||
.post(config.API.orgDeleteProfile(id))
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
props.fetchDataTable?.(
|
||||
reqMaster.value.id,
|
||||
reqMaster.value.type,
|
||||
false
|
||||
);
|
||||
getSummary();
|
||||
.then(async () => {
|
||||
await Promise.all([
|
||||
props.fetchDataTable?.(
|
||||
reqMaster.value.id,
|
||||
reqMaster.value.type,
|
||||
false
|
||||
),
|
||||
getSummary(),
|
||||
]);
|
||||
await success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -571,7 +580,7 @@ watch(
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" >
|
||||
<q-tr :props="props">
|
||||
<q-td>
|
||||
<q-btn
|
||||
v-if="store.typeOrganizational === 'draft'"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue