updated format code

This commit is contained in:
Warunee Tamkoo 2024-09-03 11:28:01 +07:00
parent b75d69ea08
commit b14bad2249
241 changed files with 14012 additions and 13811 deletions

View file

@ -1,17 +1,16 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import type { QTableProps } from "quasar";
import type { RowList, Row } from '@/modules/13_salary/interface/response/Main'
import type { RowList, Row } from "@/modules/13_salary/interface/response/Main";
import { useCounterMixin } from "@/stores/mixin";
// store
// store
export const useSalaryDataStore = defineStore("salaryDataStore", () => {
const rows = ref<RowList[]>([]);
const visibleColumns = ref<string[]>([]);
const columns = ref<QTableProps["columns"]>([]);
const mixin = useCounterMixin()
const{ date2Thai }= mixin
const mixin = useCounterMixin();
const { date2Thai } = mixin;
function fetchDataMap(data: RowList[]) {
rows.value = data.map((i: RowList) => ({
@ -26,28 +25,28 @@ export const useSalaryDataStore = defineStore("salaryDataStore", () => {
}));
}
/**
* status Text
* @param val status
* @returns text
*/
function statusTothai(val: string) {
switch (val) {
case "SPECIAL":
return "รอบพิเศษ";
case "APR":
return "รอบเมษายน";
case "OCT":
return "รอบตุลาคม";
default:
return "-";
}
};
/**
* status Text
* @param val status
* @returns text
*/
function statusTothai(val: string) {
switch (val) {
case "SPECIAL":
return "รอบพิเศษ";
case "APR":
return "รอบเมษายน";
case "OCT":
return "รอบตุลาคม";
default:
return "-";
}
}
return {
rows,
visibleColumns,
columns,
fetchDataMap,
statusTothai
statusTothai,
};
});