fix:convertDateToAPI

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-17 17:22:40 +07:00
parent 97aa731d2f
commit 1fc7882918
8 changed files with 42 additions and 13 deletions

View file

@ -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 || [];
}
/**