fix:convertDateToAPI
This commit is contained in:
parent
97aa731d2f
commit
1fc7882918
8 changed files with 42 additions and 13 deletions
|
|
@ -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