รายการลาออก

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-05-23 17:36:55 +07:00
parent 045bd3aee6
commit 474a856eb0
11 changed files with 285 additions and 165 deletions

View file

@ -10,6 +10,7 @@ import genReport from "@/plugins/genreport";
import { useCounterMixin } from "@/stores/mixin";
import { checkPermission } from "@/utils/permissions";
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
import type {
TypeFile,
@ -35,6 +36,7 @@ const $q = useQuasar();
const route = useRoute();
const router = useRouter();
const store = useRetirementDataStore();
const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore();
const { convertStatusText } = store;
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyidEMP");
const mixin = useCounterMixin();
@ -384,7 +386,14 @@ async function confirmpopUp() {
reason: reasonReign.value,
};
await http
.put(config.API.commanderApproveRetirement("-employee", id.value,'approve'), body)
.put(
config.API.commanderApproveRetirement(
"-employee",
id.value,
"approve"
),
body
)
.then(async () => {
await fetchData(id.value);
closeModal();
@ -413,7 +422,14 @@ async function rejectpopUp() {
date: dateBreak.value,
};
await http
.put(config.API.commanderApproveRetirement('-employee', id.value,'reject'), body)
.put(
config.API.commanderApproveRetirement(
"-employee",
id.value,
"reject"
),
body
)
.then(async () => {
await fetchData(id.value);
closeModal();
@ -698,16 +714,13 @@ function onAddPerson(type: string) {
}
async function checkOfficer() {
http
.get(config.API.checkIsofficer + `SYS_RESIGN_EMP`)
.then(async (res) => {
isOfficer.value = await res.data.result.isOfficer;
isStaff.value = await res.data.result.isStaff;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {});
try {
const data = await fetchDataCheckIsoffice("SYS_RESIGN_EMP");
isOfficer.value = data.isOfficer;
isStaff.value = data.isStaff;
} catch (err) {
messageError($q, err);
}
}
function onSend() {