ข้อมูลทะเบียนประวัติ => test
This commit is contained in:
parent
e9fd48f7f3
commit
e5c730875f
5 changed files with 500 additions and 17 deletions
|
|
@ -0,0 +1,28 @@
|
|||
import { defineStore } from "pinia";
|
||||
|
||||
import type { DataOption } from "@/modules/04_registryNew/interface/index/Main";
|
||||
import type {
|
||||
DataType,
|
||||
DataLevel,
|
||||
} from "@/modules/04_registryNew/interface/response/Main";
|
||||
|
||||
export const useRegistryNewDataStore = defineStore("registryNew", () => {
|
||||
function fetchType(data: DataType[]) {
|
||||
const list: DataOption[] = data.map((e: DataType) => ({
|
||||
id: e.id,
|
||||
name: e.posTypeName,
|
||||
}));
|
||||
return list;
|
||||
}
|
||||
function fetchLevel(data: DataLevel[]) {
|
||||
const list: DataOption[] = data.map((e: DataLevel) => ({
|
||||
id: e.id,
|
||||
name: e.posLevelName,
|
||||
}));
|
||||
return list;
|
||||
}
|
||||
return {
|
||||
fetchType,
|
||||
fetchLevel,
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue