report kpi1,2,3,7,9

This commit is contained in:
Bright 2024-07-10 18:34:23 +07:00
parent f0af5a5c83
commit 20ec8579e0
2 changed files with 292 additions and 45 deletions

View file

@ -1,6 +1,30 @@
import HttpStatus from "../interfaces/http-status";
import HttpError from "../interfaces/http-error";
class Extension {
public static EvaluationResult(value: string) {
switch (value) {
case "PENDING":
return "รอดำเนินการ";
case "PASSED":
return "ผ่านการประเมิน";
case "NOTPASSED":
return "ไม่ผ่านการประเมิน";
case "EXCELLENT":
return "ดีเด่น";
case "VERY_GOOD":
return "ดีมาก";
case "GOOD":
return "ดี";
case "FAIR":
return "พอใช้";
case "IMPROVEMENT":
return "ต้องปรับปรุง";
default:
return "";
}
}
public static ToThaiMonth(value: number) {
switch (value) {
case 1:
@ -100,6 +124,17 @@ class Extension {
);
}
public static ToThaiFullDate2(value: Date) {
let yy = value.getFullYear() < 2400 ? value.getFullYear() + 543 : value.getFullYear();
return (
value.getDate() +
" " +
Extension.ToThaiMonth(value.getMonth() + 1) +
" " +
yy
);
}
public static ToThaiShortDate(value: Date) {
let yy = value.getFullYear() < 2400 ? value.getFullYear() + 543 : value.getFullYear();
return (