fix:convertDateToAPI
This commit is contained in:
parent
97aa731d2f
commit
1fc7882918
8 changed files with 42 additions and 13 deletions
|
|
@ -133,6 +133,20 @@ interface Position2 {
|
|||
positionExecutiveField: string; // ด้านทางการบริหาร
|
||||
positionArea: string; // ด้าน/สาขา
|
||||
positionIsSelected: string; // เป็นตำแหน่งที่ถูกเลือกในรอบนั้นๆ หรือไม่?
|
||||
orgShortname: string; // อักษรย่อตำแหน่ง
|
||||
posMasterNoPrefix: string; // Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ)
|
||||
posMasterNo: number | string; // เลขที่ตำแหน่ง เป็นตัวเลข
|
||||
posMasterNoSuffix: string | null; // Suffix หลังเลขที่ตำแหน่ง เช่น ช.
|
||||
fullNameCurrentHolder: string | null;
|
||||
fullNameNextHolder: string | null;
|
||||
positions: Position[]; // ตำแหน่ง
|
||||
isSit: boolean;
|
||||
profilePosition: string;
|
||||
profilePostype: string;
|
||||
profilePoslevel: string;
|
||||
conditionReason: string;
|
||||
isCondition: boolean;
|
||||
isDirector: boolean;
|
||||
}
|
||||
|
||||
interface PosMaster2 {
|
||||
|
|
@ -162,7 +176,7 @@ interface PosMaster2 {
|
|||
current_holderId?: string;
|
||||
next_holderId?: string;
|
||||
isSit?: boolean;
|
||||
ancestorDNA: string;
|
||||
ancestorDNA?: string;
|
||||
}
|
||||
|
||||
interface HistoryPos {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import type {
|
|||
DataActive,
|
||||
SumPosition,
|
||||
PosMaster,
|
||||
PosMaster2,
|
||||
} from "@/modules/02_organization/interface/response/organizational";
|
||||
|
||||
export const useOrganizational = defineStore("organizationalStore", () => {
|
||||
|
|
@ -88,7 +89,7 @@ export const useOrganizational = defineStore("organizationalStore", () => {
|
|||
* @returns ข้อมูลตำแหน่งที่ผ่านการประมวลผลแล้ว
|
||||
*/
|
||||
function fetchPosMaster(data: PosMaster[]) {
|
||||
const newPosMaster = data.map((e: PosMaster) => ({
|
||||
const newPosMaster: PosMaster2[] = data.map((e: PosMaster) => ({
|
||||
...e,
|
||||
positionIsSelected:
|
||||
typeOrganizational.value === "draft" && e.fullNameNextHolder !== null
|
||||
|
|
@ -109,7 +110,7 @@ export const useOrganizational = defineStore("organizationalStore", () => {
|
|||
isSit: e.isSit,
|
||||
}));
|
||||
|
||||
return newPosMaster;
|
||||
return newPosMaster || [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue