รายการลาออก
This commit is contained in:
parent
2c3be4c51e
commit
e2e24b7717
9 changed files with 231 additions and 132 deletions
|
|
@ -76,4 +76,10 @@ export default {
|
||||||
|
|
||||||
//รายงาน
|
//รายงาน
|
||||||
retirementReport: `${report}`,
|
retirementReport: `${report}`,
|
||||||
|
|
||||||
|
addResign: (profileType:string,type: string, id: string) =>
|
||||||
|
`${retirement}/resign${profileType}/officer/add-resign/${type}/${id}`,
|
||||||
|
|
||||||
|
sendApproveRetirement:(type:string,id:string)=>`${retirement}/resign${type}/admin/approve/officer/${id}`,
|
||||||
|
commanderApproveRetirement:(type:string,id:string,typeApprove:string,path:string)=>`${retirement}/resign${type}/admin/${typeApprove}${path}/${id}`
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import config from "@/app.config";
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
||||||
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
|
@ -31,6 +32,9 @@ import DialogAddCommander from "@/modules/06_retirement/components/DialogAddComm
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
const store = useRetirementDataStore();
|
||||||
|
const { convertStatusText } = store;
|
||||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyid");
|
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyid");
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
|
|
@ -49,11 +53,14 @@ const modalPersonal = ref<boolean>(false);
|
||||||
const personId = ref<string>("");
|
const personId = ref<string>("");
|
||||||
const roleUser = ref<string>("");
|
const roleUser = ref<string>("");
|
||||||
const dataProfile = ref<DataProfile>();
|
const dataProfile = ref<DataProfile>();
|
||||||
|
const approveStep = ref<string>("");
|
||||||
|
|
||||||
const approveCheck = computed(() => {
|
const approveCheck = computed(() => {
|
||||||
return (
|
return (
|
||||||
rowsApprover.value?.commanders?.every(
|
rowsApprover.value?.commanders?.every(
|
||||||
(commander) => commander.approveStatus === "APPROVE"
|
(commander) =>
|
||||||
|
commander.approveStatus === "APPROVE" ||
|
||||||
|
commander.approveStatus === "REJECT"
|
||||||
) ?? false
|
) ?? false
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
@ -97,7 +104,9 @@ const approvePendingCheck = computed(() => {
|
||||||
|
|
||||||
const previousApproved = commanders
|
const previousApproved = commanders
|
||||||
.slice(0, index)
|
.slice(0, index)
|
||||||
.every((c) => c.approveStatus === "APPROVE");
|
.every(
|
||||||
|
(c) => c.approveStatus === "APPROVE" || c.approveStatus === "REJECT"
|
||||||
|
);
|
||||||
return previousApproved;
|
return previousApproved;
|
||||||
});
|
});
|
||||||
const isOfficer = ref<boolean>(false);
|
const isOfficer = ref<boolean>(false);
|
||||||
|
|
@ -141,20 +150,11 @@ const columnsCommanders = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "org",
|
name: "approveStatus",
|
||||||
align: "left",
|
|
||||||
label: "สังกัด",
|
|
||||||
sortable: true,
|
|
||||||
field: "org",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "สถานะ",
|
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สถานะ",
|
label: "สถานะ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "สถานะ",
|
field: "approveStatus",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -175,6 +175,9 @@ const columnsCommanders = ref<QTableProps["columns"]>([
|
||||||
sortable: true,
|
sortable: true,
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return `${row.rejectDate ? date2Thai(row.rejectDate) : "-"}`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const id = ref<string>(route.params.id.toString());
|
const id = ref<string>(route.params.id.toString());
|
||||||
|
|
@ -341,7 +344,8 @@ async function fetchData(id: string) {
|
||||||
isNoDebt.value = data.isNoDebt;
|
isNoDebt.value = data.isNoDebt;
|
||||||
isNoBurden.value = data.isNoBurden;
|
isNoBurden.value = data.isNoBurden;
|
||||||
isDiscipline.value = data.isDiscipline;
|
isDiscipline.value = data.isDiscipline;
|
||||||
|
statusCheck.value = data.status;
|
||||||
|
approveStep.value = data.approveStep;
|
||||||
profileType.value = data.profileType;
|
profileType.value = data.profileType;
|
||||||
keycloakUserId.value = data.keycloakUserId;
|
keycloakUserId.value = data.keycloakUserId;
|
||||||
rowsApprover.value = {
|
rowsApprover.value = {
|
||||||
|
|
@ -367,16 +371,24 @@ function popUp(action: "pass" | "passNot", type: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//เงื่อนไขpop up
|
//เงื่อนไขpop up
|
||||||
function onSubmit() {
|
function onSubmit(type: string) {
|
||||||
if (actionPass.value) {
|
if (actionPass.value) {
|
||||||
confirmpopUp();
|
if (type !== "approver") {
|
||||||
|
confirmpopUp("/comander");
|
||||||
|
} else {
|
||||||
|
confirmpopUp("");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
rejectpopUp();
|
if (type !== "approver") {
|
||||||
|
rejectpopUp("/comander");
|
||||||
|
} else {
|
||||||
|
rejectpopUp("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//pop up ยืนยันการอนุญาต
|
//pop up ยืนยันการอนุญาต
|
||||||
async function confirmpopUp() {
|
async function confirmpopUp(path: string) {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
@ -385,7 +397,10 @@ async function confirmpopUp() {
|
||||||
reason: reasonReign.value,
|
reason: reasonReign.value,
|
||||||
};
|
};
|
||||||
await http
|
await http
|
||||||
.put(config.API.resignConfirm(roleUser.value, id.value), body)
|
.put(
|
||||||
|
config.API.commanderApproveRetirement("", id.value, "approve", path),
|
||||||
|
body
|
||||||
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
closeModal();
|
closeModal();
|
||||||
|
|
@ -404,7 +419,7 @@ async function confirmpopUp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//pop up การยับยั้งสำเร็จ
|
//pop up การยับยั้งสำเร็จ
|
||||||
async function rejectpopUp() {
|
async function rejectpopUp(path: string) {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
@ -414,7 +429,10 @@ async function rejectpopUp() {
|
||||||
date: dateBreak.value,
|
date: dateBreak.value,
|
||||||
};
|
};
|
||||||
await http
|
await http
|
||||||
.put(config.API.resignReject(roleUser.value, id.value), body)
|
.put(
|
||||||
|
config.API.commanderApproveRetirement("", id.value, "reject", path),
|
||||||
|
body
|
||||||
|
)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
closeModal();
|
closeModal();
|
||||||
|
|
@ -717,10 +735,10 @@ function onSend() {
|
||||||
() => {
|
() => {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.sendApprove(id.value))
|
.get(config.API.sendApproveRetirement("", id.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await fetchData(id.value);
|
|
||||||
await fetchFile();
|
await fetchFile();
|
||||||
|
await fetchData(id.value);
|
||||||
success($q, "ส่งไปพิจารณา");
|
success($q, "ส่งไปพิจารณา");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -733,11 +751,26 @@ function onSend() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchKeycloakPosition() {
|
||||||
|
if (keycloakId.value == "") {
|
||||||
|
await http
|
||||||
|
.get(config.API.keycloakPosition())
|
||||||
|
.then(async (res) => {
|
||||||
|
const data = await res.data.result;
|
||||||
|
keycloakId.value = data.profileId;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Hook */
|
/** Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
await fetchData(id.value),
|
await fetchData(id.value),
|
||||||
|
await fetchKeycloakPosition(),
|
||||||
await checkOfficer(),
|
await checkOfficer(),
|
||||||
fetchFile(),
|
fetchFile(),
|
||||||
]).finally(() => {
|
]).finally(() => {
|
||||||
|
|
@ -1202,7 +1235,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
<!-- ตัวอย่างเช็คของ การลา -->
|
<!-- ตัวอย่างเช็คของ การลา -->
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
@ -1276,6 +1309,7 @@ onMounted(async () => {
|
||||||
props.row.approveStatus == 'PENDING' &&
|
props.row.approveStatus == 'PENDING' &&
|
||||||
props.row.comment == ''
|
props.row.comment == ''
|
||||||
"
|
"
|
||||||
|
class="q-gutter-x-xs"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
:disable="
|
:disable="
|
||||||
|
|
@ -1324,6 +1358,13 @@ onMounted(async () => {
|
||||||
{{ props.row.comment ? props.row.comment : "-" }}
|
{{ props.row.comment ? props.row.comment : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.name == 'approveStatus'">
|
||||||
|
{{
|
||||||
|
props.row.approveStatus
|
||||||
|
? convertStatusText(props.row.approveStatus)
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1340,9 +1381,8 @@ onMounted(async () => {
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">
|
<div class="q-pl-sm text-weight-bold text-dark">
|
||||||
ผลการพิจารณาของผู้มีอำนาจ
|
ผลการพิจารณาของผู้มีอำนาจ
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
@ -1360,8 +1400,7 @@ onMounted(async () => {
|
||||||
class="q-gutter-x-sm"
|
class="q-gutter-x-sm"
|
||||||
v-if="
|
v-if="
|
||||||
checkPermission($route)?.attrIsUpdate &&
|
checkPermission($route)?.attrIsUpdate &&
|
||||||
dataDetail.oligarchReject === null &&
|
approveStep == 'st3' &&
|
||||||
dataDetail.statusMain === 'WAITTING' &&
|
|
||||||
rowsApprover &&
|
rowsApprover &&
|
||||||
rowsApprover.approvers &&
|
rowsApprover.approvers &&
|
||||||
rowsApprover.approvers[0]?.profileId == keycloakId &&
|
rowsApprover.approvers[0]?.profileId == keycloakId &&
|
||||||
|
|
@ -1408,8 +1447,10 @@ onMounted(async () => {
|
||||||
<div class="col-12 text-top">สถานะ</div>
|
<div class="col-12 text-top">สถานะ</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{
|
{{
|
||||||
dataDetail.oligarchReject !== null
|
rowsApprover &&
|
||||||
? statusOrder(dataDetail.oligarchReject)
|
rowsApprover.approvers &&
|
||||||
|
rowsApprover.approvers[0]?.approveStatus
|
||||||
|
? convertStatusText(rowsApprover?.approvers[0].approveStatus)
|
||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1418,8 +1459,10 @@ onMounted(async () => {
|
||||||
<div class="col-12 text-top">วันสุดท้ายที่ยับยั้ง</div>
|
<div class="col-12 text-top">วันสุดท้ายที่ยับยั้ง</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{
|
{{
|
||||||
dataDetail.oligarchRejectDate !== null
|
rowsApprover &&
|
||||||
? date2Thai(dataDetail.oligarchRejectDate)
|
rowsApprover.approvers &&
|
||||||
|
rowsApprover.approvers[0]?.rejectDate
|
||||||
|
? date2Thai(rowsApprover?.approvers[0].rejectDate)
|
||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1428,9 +1471,11 @@ onMounted(async () => {
|
||||||
<div class="col-12 text-top">ความคิดเห็นและเหตุผล</div>
|
<div class="col-12 text-top">ความคิดเห็นและเหตุผล</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{
|
{{
|
||||||
dataDetail.oligarchReject
|
rowsApprover &&
|
||||||
? dataDetail.oligarchRejectReason
|
rowsApprover.approvers &&
|
||||||
: dataDetail.oligarchApproveReason
|
rowsApprover.approvers[0]?.comment
|
||||||
|
? rowsApprover?.approvers[0].comment
|
||||||
|
: "-"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1441,7 +1486,7 @@ onMounted(async () => {
|
||||||
<q-card
|
<q-card
|
||||||
bordered
|
bordered
|
||||||
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
@click="onSend"
|
@click="onSend"
|
||||||
|
|
@ -1707,7 +1752,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card style="width: 800px">
|
<q-card style="width: 800px">
|
||||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
<q-form greedy @submit.prevent @validation-success="onSubmit('approver')">
|
||||||
<DialogHeader
|
<DialogHeader
|
||||||
:tittle="`${actionPass ? 'อนุญาตการลาออก' : 'ยับยั้งการลาออก'}`"
|
:tittle="`${actionPass ? 'อนุญาตการลาออก' : 'ยับยั้งการลาออก'}`"
|
||||||
:close="closeModal"
|
:close="closeModal"
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
||||||
|
|
||||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -24,6 +25,8 @@ import DialogAddCommander from "@/modules/06_retirement/components/DialogAddComm
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const store = useRetirementDataStore();
|
||||||
|
const { convertStatusText } = store;
|
||||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailReject");
|
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailReject");
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
|
|
@ -129,21 +132,13 @@ const columnsCommanders = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "org",
|
name: "approveStatus",
|
||||||
align: "left",
|
|
||||||
label: "สังกัด",
|
|
||||||
sortable: true,
|
|
||||||
field: "org",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "สถานะ",
|
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สถานะ",
|
label: "สถานะ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "สถานะ",
|
field: "approveStatus",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -275,6 +270,7 @@ async function fetchData(id: string) {
|
||||||
isNoBurden.value = data.isNoBurden;
|
isNoBurden.value = data.isNoBurden;
|
||||||
isDiscipline.value = data.isDiscipline;
|
isDiscipline.value = data.isDiscipline;
|
||||||
|
|
||||||
|
statusCheck.value = data.status;
|
||||||
profileType.value = data.profileType;
|
profileType.value = data.profileType;
|
||||||
keycloakUserId.value = data.keycloakUserId;
|
keycloakUserId.value = data.keycloakUserId;
|
||||||
rowsApprover.value = {
|
rowsApprover.value = {
|
||||||
|
|
@ -428,7 +424,7 @@ function onSend() {
|
||||||
() => {
|
() => {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.sendApprove(id.value))
|
.get(config.API.sendApproveRetirement("", id.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
success($q, "ส่งไปพิจารณา");
|
success($q, "ส่งไปพิจารณา");
|
||||||
|
|
@ -443,9 +439,24 @@ function onSend() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchKeycloakPosition() {
|
||||||
|
if (keycloakId.value == "") {
|
||||||
|
await http
|
||||||
|
.get(config.API.keycloakPosition())
|
||||||
|
.then(async (res) => {
|
||||||
|
const data = await res.data.result;
|
||||||
|
keycloakId.value = data.profileId;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Hook */
|
/** Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
|
await fetchKeycloakPosition()
|
||||||
await checkOfficer();
|
await checkOfficer();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -566,7 +577,7 @@ onMounted(async () => {
|
||||||
ผลการพิจารณาของผู้บังคับบัญชา
|
ผลการพิจารณาของผู้บังคับบัญชา
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
@ -688,6 +699,13 @@ onMounted(async () => {
|
||||||
{{ props.row.comment ? props.row.comment : "-" }}
|
{{ props.row.comment ? props.row.comment : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.name == 'approveStatus'">
|
||||||
|
{{
|
||||||
|
props.row.approveStatus
|
||||||
|
? convertStatusText(props.row.approveStatus)
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -705,7 +723,7 @@ onMounted(async () => {
|
||||||
ผลการพิจารณาของผู้มีอำนาจ
|
ผลการพิจารณาของผู้มีอำนาจ
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
@ -771,8 +789,10 @@ onMounted(async () => {
|
||||||
<div class="col-12 text-top">สถานะ</div>
|
<div class="col-12 text-top">สถานะ</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{
|
{{
|
||||||
dataDetail.oligarchReject !== null
|
rowsApprover &&
|
||||||
? statusOrder(dataDetail.oligarchReject)
|
rowsApprover.approvers &&
|
||||||
|
rowsApprover.approvers[0]?.approveStatus
|
||||||
|
? convertStatusText(rowsApprover?.approvers[0].approveStatus)
|
||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -803,7 +823,7 @@ onMounted(async () => {
|
||||||
<q-card
|
<q-card
|
||||||
bordered
|
bordered
|
||||||
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
@click="onSend"
|
@click="onSend"
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import config from "@/app.config";
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
TypeFile,
|
TypeFile,
|
||||||
|
|
@ -33,6 +34,8 @@ import DialogAddCommander from "@/modules/06_retirement/components/DialogAddComm
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const store = useRetirementDataStore();
|
||||||
|
const { convertStatusText } = store;
|
||||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyidEMP");
|
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyidEMP");
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
|
|
@ -142,21 +145,13 @@ const columnsCommanders = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "org",
|
name: "approveStatus",
|
||||||
align: "left",
|
|
||||||
label: "สังกัด",
|
|
||||||
sortable: true,
|
|
||||||
field: "org",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "สถานะ",
|
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สถานะ",
|
label: "สถานะ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "สถานะ",
|
field: "approveStatus",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -345,6 +340,7 @@ async function fetchData(id: string) {
|
||||||
isNoBurden.value = data.isNoBurden;
|
isNoBurden.value = data.isNoBurden;
|
||||||
isDiscipline.value = data.isDiscipline;
|
isDiscipline.value = data.isDiscipline;
|
||||||
|
|
||||||
|
statusCheck.value = data.status;
|
||||||
profileType.value = data.profileType;
|
profileType.value = data.profileType;
|
||||||
keycloakUserId.value = data.keycloakUserId;
|
keycloakUserId.value = data.keycloakUserId;
|
||||||
rowsApprover.value = {
|
rowsApprover.value = {
|
||||||
|
|
@ -388,7 +384,7 @@ async function confirmpopUp() {
|
||||||
reason: reasonReign.value,
|
reason: reasonReign.value,
|
||||||
};
|
};
|
||||||
await http
|
await http
|
||||||
.put(config.API.resignConfirmEMP(roleUser.value, id.value), body)
|
.put(config.API.commanderApproveRetirement("-employee", id.value,'approve'), body)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
closeModal();
|
closeModal();
|
||||||
|
|
@ -417,7 +413,7 @@ async function rejectpopUp() {
|
||||||
date: dateBreak.value,
|
date: dateBreak.value,
|
||||||
};
|
};
|
||||||
await http
|
await http
|
||||||
.put(config.API.resignRejectEMP(roleUser.value, id.value), body)
|
.put(config.API.commanderApproveRetirement('-employee', id.value,'reject'), body)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
closeModal();
|
closeModal();
|
||||||
|
|
@ -720,7 +716,7 @@ function onSend() {
|
||||||
() => {
|
() => {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.sendApprove(id.value))
|
.get(config.API.sendApproveRetirement("-employee", id.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
success($q, "ส่งไปพิจารณา");
|
success($q, "ส่งไปพิจารณา");
|
||||||
|
|
@ -735,11 +731,26 @@ function onSend() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchKeycloakPosition() {
|
||||||
|
if (keycloakId.value == "") {
|
||||||
|
await http
|
||||||
|
.get(config.API.keycloakPosition())
|
||||||
|
.then(async (res) => {
|
||||||
|
const data = await res.data.result;
|
||||||
|
keycloakId.value = data.profileId;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Hook */
|
/** Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
await fetchData(id.value),
|
await fetchData(id.value),
|
||||||
|
await fetchKeycloakPosition(),
|
||||||
fetchFile(),
|
fetchFile(),
|
||||||
await checkOfficer(),
|
await checkOfficer(),
|
||||||
]).finally(() => {
|
]).finally(() => {
|
||||||
|
|
@ -1205,7 +1216,7 @@ onMounted(async () => {
|
||||||
ผลการพิจารณาของผู้บังคับบัญชา
|
ผลการพิจารณาของผู้บังคับบัญชา
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
@ -1327,6 +1338,13 @@ onMounted(async () => {
|
||||||
{{ props.row.comment ? props.row.comment : "-" }}
|
{{ props.row.comment ? props.row.comment : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.name == 'approveStatus'">
|
||||||
|
{{
|
||||||
|
props.row.approveStatus
|
||||||
|
? convertStatusText(props.row.approveStatus)
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1335,41 +1353,6 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row col-12 q-pa-md">
|
|
||||||
<div class="col-12 row bg-white q-col-gutter-md">
|
|
||||||
<div class="col-xs-6 row items-start">
|
|
||||||
<div class="col-12 text-top">สถานะ</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{
|
|
||||||
dataDetail.commanderReject !== null
|
|
||||||
? statusOrder(dataDetail.commanderReject)
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-6 row items-start">
|
|
||||||
<div class="col-12 text-top">วันสุดท้ายที่ยับยั้ง</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{
|
|
||||||
dataDetail.commanderRejectDate !== null
|
|
||||||
? date2Thai(dataDetail.commanderRejectDate)
|
|
||||||
: "-"
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 row items-start">
|
|
||||||
<div class="col-12 text-top">ความคิดเห็นและเหตุผล</div>
|
|
||||||
<div class="col-12 text-detail">
|
|
||||||
{{
|
|
||||||
dataDetail.commanderReject
|
|
||||||
? dataDetail.commanderRejectReason
|
|
||||||
: dataDetail.commanderApproveReason
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<!-- ผลการพิจารณาของผู้มีอำนาจ -->
|
<!-- ผลการพิจารณาของผู้มีอำนาจ -->
|
||||||
|
|
@ -1379,7 +1362,7 @@ onMounted(async () => {
|
||||||
ผลการพิจารณาของผู้มีอำนาจ
|
ผลการพิจารณาของผู้มีอำนาจ
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
@ -1443,8 +1426,10 @@ onMounted(async () => {
|
||||||
<div class="col-12 text-top">สถานะ</div>
|
<div class="col-12 text-top">สถานะ</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{
|
{{
|
||||||
dataDetail.oligarchReject !== null
|
rowsApprover &&
|
||||||
? statusOrder(dataDetail.oligarchReject)
|
rowsApprover.approvers &&
|
||||||
|
rowsApprover.approvers[0]?.approveStatus
|
||||||
|
? convertStatusText(rowsApprover?.approvers[0].approveStatus)
|
||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1475,7 +1460,7 @@ onMounted(async () => {
|
||||||
<q-card
|
<q-card
|
||||||
bordered
|
bordered
|
||||||
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
@click="onSend"
|
@click="onSend"
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import genReport from "@/plugins/genreport";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
TypeFile,
|
TypeFile,
|
||||||
|
|
@ -32,6 +33,8 @@ import WorkFlow from "@/components/Workflow/Main.vue";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const store = useRetirementDataStore();
|
||||||
|
const { convertStatusText } = store;
|
||||||
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailRejectEMP");
|
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailRejectEMP");
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
|
|
@ -139,20 +142,11 @@ const columnsCommanders = ref<QTableProps["columns"]>([
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "org",
|
name: "approveStatus",
|
||||||
align: "left",
|
|
||||||
label: "สังกัด",
|
|
||||||
sortable: true,
|
|
||||||
field: "org",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "สถานะ",
|
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "สถานะ",
|
label: "สถานะ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "สถานะ",
|
field: "approveStatus",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
|
@ -281,6 +275,7 @@ async function fetchData(id: string) {
|
||||||
status.value = data.status ?? "";
|
status.value = data.status ?? "";
|
||||||
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||||
isNoDebt.value = data.isNoDebt;
|
isNoDebt.value = data.isNoDebt;
|
||||||
|
statusCheck.value = data.status;
|
||||||
isNoBurden.value = data.isNoBurden;
|
isNoBurden.value = data.isNoBurden;
|
||||||
isDiscipline.value = data.isDiscipline;
|
isDiscipline.value = data.isDiscipline;
|
||||||
})
|
})
|
||||||
|
|
@ -446,7 +441,7 @@ function onSend() {
|
||||||
() => {
|
() => {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.get(config.API.sendApprove(id.value))
|
.get(config.API.sendApproveRetirement("-employee", id.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
success($q, "ส่งไปพิจารณา");
|
success($q, "ส่งไปพิจารณา");
|
||||||
|
|
@ -461,9 +456,23 @@ function onSend() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchKeycloakPosition() {
|
||||||
|
if (keycloakId.value == "") {
|
||||||
|
await http
|
||||||
|
.get(config.API.keycloakPosition())
|
||||||
|
.then(async (res) => {
|
||||||
|
const data = await res.data.result;
|
||||||
|
keycloakId.value = data.profileId;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Hook */
|
/** Hook */
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await Promise.all([fetchData(id.value), checkOfficer()]);
|
await Promise.all([await fetchKeycloakPosition(),fetchData(id.value), checkOfficer()]);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -581,7 +590,7 @@ onMounted(async () => {
|
||||||
ผลการพิจารณาของผู้บังคับบัญชา
|
ผลการพิจารณาของผู้บังคับบัญชา
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
@ -702,6 +711,13 @@ onMounted(async () => {
|
||||||
{{ props.row.comment ? props.row.comment : "-" }}
|
{{ props.row.comment ? props.row.comment : "-" }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="col.name == 'approveStatus'">
|
||||||
|
{{
|
||||||
|
props.row.approveStatus
|
||||||
|
? convertStatusText(props.row.approveStatus)
|
||||||
|
: "-"
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -719,7 +735,7 @@ onMounted(async () => {
|
||||||
ผลการพิจารณาของผู้มีอำนาจ
|
ผลการพิจารณาของผู้มีอำนาจ
|
||||||
</div>
|
</div>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
icon="add"
|
icon="add"
|
||||||
|
|
@ -784,8 +800,10 @@ onMounted(async () => {
|
||||||
<div class="col-12 text-top">สถานะ</div>
|
<div class="col-12 text-top">สถานะ</div>
|
||||||
<div class="col-12 text-detail">
|
<div class="col-12 text-detail">
|
||||||
{{
|
{{
|
||||||
dataDetail.oligarchReject !== null
|
rowsApprover &&
|
||||||
? statusOrder(dataDetail.oligarchReject)
|
rowsApprover.approvers &&
|
||||||
|
rowsApprover.approvers[0]?.approveStatus
|
||||||
|
? convertStatusText(rowsApprover?.approvers[0].approveStatus)
|
||||||
: "-"
|
: "-"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -816,7 +834,7 @@ onMounted(async () => {
|
||||||
<q-card
|
<q-card
|
||||||
bordered
|
bordered
|
||||||
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
class="row col-12 text-dark q-mt-sm q-pa-sm"
|
||||||
v-if="statusCheck == 'NEW' && (isOfficer || isStaff)"
|
v-if="statusCheck == 'WAITTING' && (isOfficer || isStaff)"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
@click="onSend"
|
@click="onSend"
|
||||||
|
|
|
||||||
|
|
@ -148,9 +148,11 @@ function onSubmit() {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(
|
.post(
|
||||||
config.API.addApproverByType(
|
config.API.addResign(
|
||||||
|
(props.profileType?.toLocaleLowerCase() as string) == "officer"
|
||||||
|
? ""
|
||||||
|
: "-employee",
|
||||||
props.type?.toLocaleLowerCase() as string,
|
props.type?.toLocaleLowerCase() as string,
|
||||||
props.profileType?.toLocaleLowerCase() as string,
|
|
||||||
pageId.value
|
pageId.value
|
||||||
),
|
),
|
||||||
body
|
body
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ interface SeqTypeRow {
|
||||||
keycloakId: string;
|
keycloakId: string;
|
||||||
approveStatus: string;
|
approveStatus: string;
|
||||||
comment: string;
|
comment: string;
|
||||||
|
rejectDate: Date|null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ export const useRetirementDataStore = defineStore("retirement", () => {
|
||||||
const statusText = (val: string) => {
|
const statusText = (val: string) => {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "WAITTING":
|
case "WAITTING":
|
||||||
return "รอดำเนินการ";
|
return "ใหม่";
|
||||||
case "PENDING":
|
case "PENDING":
|
||||||
return "เลือกตำแหน่งแล้ว";
|
return "รอดำเนินการ";
|
||||||
case "APPROVE":
|
case "APPROVE":
|
||||||
return "อนุมัติ";
|
return "อนุมัติ";
|
||||||
case "REJECT":
|
case "REJECT":
|
||||||
|
|
@ -28,7 +28,19 @@ export const useRetirementDataStore = defineStore("retirement", () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function convertStatusText(val: string) {
|
||||||
|
switch (val) {
|
||||||
|
case "PENDING":
|
||||||
|
return "รอดำเนินการ";
|
||||||
|
case "APPROVE":
|
||||||
|
return "อนุญาต";
|
||||||
|
case "REJECT":
|
||||||
|
return "ยับยั้ง";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
statusText,
|
statusText,
|
||||||
|
convertStatusText
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,15 @@ export const useDataStore = defineStore("resign", () => {
|
||||||
const mainTabsEMP = ref<string>("1");
|
const mainTabsEMP = ref<string>("1");
|
||||||
const baseOptionStatus = ref<DataStatus[]>([
|
const baseOptionStatus = ref<DataStatus[]>([
|
||||||
{
|
{
|
||||||
name: "รอดำเนินการ",
|
name: "ใหม่",
|
||||||
value: "WAITTING",
|
value: "WAITTING",
|
||||||
group: "1",
|
group: "1",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "รอดำเนินการ",
|
||||||
|
value: "PENDING",
|
||||||
|
group: "1",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "อนุมัติแล้ว",
|
name: "อนุมัติแล้ว",
|
||||||
value: "APPROVE",
|
value: "APPROVE",
|
||||||
|
|
@ -39,10 +44,15 @@ export const useDataStore = defineStore("resign", () => {
|
||||||
group: "1",
|
group: "1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "รอดำเนินการ",
|
name: "ใหม่",
|
||||||
value: "WAITTING",
|
value: "WAITTING",
|
||||||
group: "2",
|
group: "2",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "รอดำเนินการ",
|
||||||
|
value: "PENDING",
|
||||||
|
group: "2",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "อนุมัติแล้ว",
|
name: "อนุมัติแล้ว",
|
||||||
value: "APPROVE",
|
value: "APPROVE",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue