รายการลาออก
This commit is contained in:
parent
045bd3aee6
commit
474a856eb0
11 changed files with 285 additions and 165 deletions
|
|
@ -9,6 +9,7 @@ import genReport from "@/plugins/genreport";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
||||
|
||||
/** importType */
|
||||
import type { FremData } from "@/modules/09_leave/interface/request/leave";
|
||||
|
|
@ -38,6 +39,7 @@ import DialogAddCommander from "@/modules/09_leave/components/05_Leave/Dialog/Di
|
|||
/** use */
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore();
|
||||
const {
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
|
|
@ -426,10 +428,7 @@ function checkLeaveType(leaveTypeId: string, formData: FremData) {
|
|||
checkForm.value = "FormHajj";
|
||||
} else if (type === "LV-007") {
|
||||
checkForm.value = "FormCheckSelect";
|
||||
} else if (
|
||||
type === "LV-008" &&
|
||||
formData.leaveSubTypeName === "ศึกษาต่อ"
|
||||
) {
|
||||
} else if (type === "LV-008" && formData.leaveSubTypeName === "ศึกษาต่อ") {
|
||||
checkForm.value = "FormStudy";
|
||||
} else if (
|
||||
(type === "LV-008" && formData.leaveSubTypeName === "ฝึกอบรม") ||
|
||||
|
|
@ -615,23 +614,19 @@ function onSend() {
|
|||
}
|
||||
|
||||
async function checkOfficer() {
|
||||
http
|
||||
.get(
|
||||
config.API.checkIsofficer +
|
||||
`${
|
||||
formData.profileType == "OFFICER"
|
||||
? "SYS_LEAVE_LIST"
|
||||
: "SYS_LEAVE_LIST_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(
|
||||
`${
|
||||
formData.profileType == "OFFICER"
|
||||
? "SYS_LEAVE_LIST"
|
||||
: "SYS_LEAVE_LIST_EMP"
|
||||
}`
|
||||
);
|
||||
isOfficer.value = data.isOfficer;
|
||||
isStaff.value = data.isStaff;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchKeycloakPosition() {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import genReport from "@/plugins/genreport";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
|
||||
|
||||
/** importType */
|
||||
import type {
|
||||
|
|
@ -35,6 +36,7 @@ import FormVocationalRehabilitation from "@/modules/09_leave/components/05_Leave
|
|||
|
||||
/** use */
|
||||
const $q = useQuasar();
|
||||
const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
dialogConfirm,
|
||||
|
|
@ -450,23 +452,19 @@ async function onClickDownloadFile(id: string, fileName: string, type: string) {
|
|||
}
|
||||
|
||||
async function checkOfficer() {
|
||||
http
|
||||
.get(
|
||||
config.API.checkIsofficer +
|
||||
`${
|
||||
formData.profileType == "OFFICER"
|
||||
? "SYS_LEAVE_LIST"
|
||||
: "SYS_LEAVE_LIST_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(
|
||||
`${
|
||||
formData.profileType == "OFFICER"
|
||||
? "SYS_LEAVE_LIST"
|
||||
: "SYS_LEAVE_LIST_EMP"
|
||||
}`
|
||||
);
|
||||
isOfficer.value = data.isOfficer;
|
||||
isStaff.value = data.isStaff;
|
||||
} catch (err) {
|
||||
messageError($q, err);
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchKeycloakPosition() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue