ผูก API สรุปผลการพิจารณา
This commit is contained in:
parent
e0fa2d9632
commit
4dac59a781
11 changed files with 467 additions and 117 deletions
42
src/modules/11_discipline/store.ts
Normal file
42
src/modules/11_discipline/store.ts
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import { defineStore } from "pinia";
|
||||
|
||||
export const useStoreResultMain = defineStore("resultMain", () => {
|
||||
/** function ผู้ถูกสอบสวน*/
|
||||
function convertRespondentType(val: string) {
|
||||
switch (val) {
|
||||
case "PERSON":
|
||||
return "บุคคล";
|
||||
case "ORGANIZATION":
|
||||
return "หน่วยงาน";
|
||||
case "BANGKOK":
|
||||
return "กรุงเทพมหานคร";
|
||||
}
|
||||
}
|
||||
|
||||
/** function ลักษณะความผิด*/
|
||||
function convertFault(val: string) {
|
||||
switch (val) {
|
||||
case "NOT_SPECIFIED":
|
||||
return "ความผิดวินัยยังไม่ระบุ";
|
||||
case "NOT_DEADLY":
|
||||
return "ความผิดวินัยไม่ร้ายแรง";
|
||||
case "DEADLY":
|
||||
return "ความผิดวินัยร้ายแรง";
|
||||
default:
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
|
||||
/** function ลักษณะความผิด*/
|
||||
function convertStatus(val: string) {
|
||||
switch (val) {
|
||||
case "NEW":
|
||||
return "กำลังสอบสวน";
|
||||
case "STOP":
|
||||
return "ยุติเรื่อง";
|
||||
case "SEND_DISCIPLINARY":
|
||||
return "ส่งไปสอบสวน";
|
||||
}
|
||||
}
|
||||
return { convertRespondentType, convertFault, convertStatus };
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue