พ้นจากราชการ ==> ปรับ form Exit interview

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-02 10:27:59 +07:00
parent c01031c687
commit f09860b79b
4 changed files with 503 additions and 515 deletions

View file

@ -177,8 +177,8 @@ const getData = async () => {
showLoader();
await http
.get(config.API.questionExitInterview())
.then((res: any) => {
const data = res.data.result;
.then(async (res) => {
const data = await res.data.result;
question1Score.value = data.question1Score ?? 0;
question2Score.value = data.question2Score ?? 0;
question3Score.value = data.question3Score ?? 0;
@ -269,14 +269,15 @@ const putData = () => {
showLoader();
http
.put(config.API.questionExitInterview(), body)
.then((res) => {
.then(() => {
router.push(`/retirement/exit-interview`);
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
router.push(`/retirement/exit-interview`);
.finally(() => {
hideLoader();
});
};
</script>

View file

@ -170,8 +170,8 @@ const fecthlist = async () => {
showLoader();
await http
.get(config.API.listExitInterview())
.then((res: any) => {
const data = res.data.result;
.then(async (res) => {
const data = await res.data.result;
let list: ResponseItems[] = [];
data.map((r: ResponseItems) => {
list.push({
@ -215,7 +215,8 @@ const saveAppoint = async () => {
showLoader();
await http
.put(config.API.AppointInterview(id.value), body)
.then((res: any) => {
.then(async () => {
await fecthlist();
success($q, "วันนัดหมายเพื่อทําการสัมภาษณ์การลาออกสำเร็จ");
closeModal();
})
@ -223,7 +224,6 @@ const saveAppoint = async () => {
messageError($q, e);
})
.finally(async () => {
await fecthlist();
hideLoader();
});
});
@ -378,7 +378,10 @@ const openModalCalendar = (rows: any) => {
<q-tooltip>รายละเอยด</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsGet && checkPermission($route)?.attrIsUpdate"
v-if="
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
flat
dense
round
@ -393,7 +396,11 @@ const openModalCalendar = (rows: any) => {
<q-tooltip>แกไขขอม</q-tooltip>
</q-btn>
<q-btn
v-if="!props.row.appointDate && checkPermission($route)?.attrIsGet && checkPermission($route)?.attrIsUpdate"
v-if="
!props.row.appointDate &&
checkPermission($route)?.attrIsGet &&
checkPermission($route)?.attrIsUpdate
"
icon="mdi-calendar"
color="blue-7"
flat
@ -407,63 +414,36 @@ const openModalCalendar = (rows: any) => {
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td
key="fullname"
:props="props"
>
<q-td key="fullname" :props="props">
{{ props.row.fullname }}
</q-td>
<q-td
key="realReason"
:props="props"
>
<q-td key="realReason" :props="props">
{{ props.row.realReason }}
</q-td>
<q-td
key="notExitFactor"
:props="props"
>
<q-td key="notExitFactor" :props="props">
{{ props.row.notExitFactor }}
</q-td>
<q-td
key="futureWork"
:props="props"
>
<q-td key="futureWork" :props="props">
{{ props.row.futureWork ? "ใช่" : "ไม่" }}
</q-td>
<q-td
key="futureWorkReason"
:props="props"
>
<q-td key="futureWorkReason" :props="props">
{{ props.row.futureWorkReason }}
</q-td>
<q-td
key="havejob"
:props="props"
>
<q-td key="havejob" :props="props">
{{ props.row.havejob ? "ใช่" : "ไม่" }}
</q-td>
<q-td
key="havejobReason"
:props="props"
>
<q-td key="havejobReason" :props="props">
<div class="table_ellipsis">
{{ props.row.havejobReason }}
</div>
</q-td>
<q-td
key="appointDate"
:props="props"
>
<q-td key="appointDate" :props="props">
{{
props.row.appointDate == null ? "-" : props.row.appointDate
}}
</q-td>
<q-td
key="datetext"
:props="props"
>
<q-td key="datetext" :props="props">
{{ props.row.datetext }}
</q-td>
</q-tr>