fix bug display bma office status
This commit is contained in:
parent
ee29b596f0
commit
4d6c9295b0
2 changed files with 40 additions and 29 deletions
|
|
@ -133,6 +133,34 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
|
||||
const convertBmaOfficer = (val: string) => {
|
||||
switch (val) {
|
||||
case "OFFICER":
|
||||
return "ขรก.กทม. สามัญ";
|
||||
case "EMPLOYEE_PERM":
|
||||
return "ลูกจ้างประจำ";
|
||||
case "EMPLOYEE_TEMP":
|
||||
return "ลูกจ้างชั่วคราว";
|
||||
default:
|
||||
return "บุคคลภายนอก";
|
||||
}
|
||||
};
|
||||
|
||||
const convertContainStatus = (val: string) => {
|
||||
switch (val) {
|
||||
case "UN-CONTAIN":
|
||||
return "ยังไม่บรรจุ";
|
||||
case "PREPARE-CONTAIN":
|
||||
return "เตรียมบรรจุ";
|
||||
case "CONTAIN":
|
||||
return "บรรจุแล้ว";
|
||||
case "DISCLAIM":
|
||||
return "สละสิทธิ์";
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
};
|
||||
|
||||
const getTable = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -153,27 +181,10 @@ const getTable = async () => {
|
|||
positionPath: data.positionPath,
|
||||
reportingDate: dateText(new Date(data.reportingDate)),
|
||||
number: data.number,
|
||||
bmaOfficer:
|
||||
data.bmaOfficer == "OFFICER"
|
||||
? "ขรก.กทม. สามัญ"
|
||||
: data.bmaOfficer == "EMPLOYEE_PERM"
|
||||
? "ลูกจ้างประจำ"
|
||||
: data.bmaOfficer == "EMPLOYEE_TEMP"
|
||||
? "ลูกจ้างชั่วคราว"
|
||||
: data.bmaOfficer == null
|
||||
? "บุคคลภายนอก"
|
||||
: "-",
|
||||
bmaOfficer: convertBmaOfficer(data.bmaOfficer),
|
||||
statusId: data.statusId,
|
||||
statusName:
|
||||
data.statusId == "UN-CONTAIN"
|
||||
? "ยังไม่บรรจุ"
|
||||
: data.statusId == "PREPARE-CONTAIN"
|
||||
? "เตรียมบรรจุ"
|
||||
: data.statusId == "CONTAIN"
|
||||
? "บรรจุแล้ว"
|
||||
: data.statusId == "DISCLAIM"
|
||||
? "สละสิทธิ์"
|
||||
: "-",
|
||||
statusName: convertContainStatus(data.statusId)
|
||||
,
|
||||
deferment: data.deferment,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -149,19 +149,17 @@ const fetchData = async () => {
|
|||
};
|
||||
const formBmaofficer = (val: string) => {
|
||||
switch (val) {
|
||||
case "officer":
|
||||
case "OFFICER":
|
||||
return "ขรก.กทม. สามัญ";
|
||||
break;
|
||||
case "employee_perm":
|
||||
case "EMPLOYEE_PERM":
|
||||
return "ลูกจ้างประจำ";
|
||||
break;
|
||||
case "employee_temp":
|
||||
case "EMPLOYEE_TEMP":
|
||||
return "ลูกจ้างชั่วคราว";
|
||||
break;
|
||||
default:
|
||||
"";
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
const close = async () => {
|
||||
props.close();
|
||||
selection.value = [];
|
||||
|
|
@ -199,8 +197,10 @@ const putpersonalForm = async () => {
|
|||
<q-card bordered class="card-panding">
|
||||
<div class="row items-center q-pa-xs header-text">
|
||||
ข้อมูลทั่วไป
|
||||
<span class="check-officer"><q-icon name="mdi-check" v-if="personalForm.bmaofficer !== null && ''" />{{
|
||||
formBmaofficer(personalForm.bmaofficer) }}</span>
|
||||
<span v-if="personalForm.bmaOfficer != null" class="check-officer">
|
||||
<q-icon name="mdi-check" />
|
||||
{{ formBmaofficer(personalForm.bmaOfficer) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row q-pa-xs">
|
||||
<div class="col-3 header-sub-text">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue