Refactoring code module 01_metadata => 02_position
This commit is contained in:
parent
3b9df73811
commit
a8d794abe6
15 changed files with 1188 additions and 1436 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue