Refactoring code module 01_metadata => 02_position

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-05 14:14:15 +07:00
parent 3b9df73811
commit a8d794abe6
15 changed files with 1188 additions and 1436 deletions

View file

@ -1,17 +1,23 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import type {
DataResponse,
DataRow,
} from "../interface/response/position/ListType";
import { useCounterMixin } from "@/stores/mixin";
const { date2Thai } = useCounterMixin();
export const usePositionTypeDataStore = defineStore("PositionTypeData", () => {
const row = ref<DataRow[]>([]);
function save(data: DataResponse[]) {
/**
* row.value
* @param data API
*/
async function save(data: DataResponse[]) {
const list = data.map((e) => ({
...e,
posTypes: undefined,