รายการเงินเดือน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-02-27 16:58:33 +07:00
parent 4f9f8ecc65
commit 0a367f7c57
6 changed files with 209 additions and 73 deletions

View file

@ -2,13 +2,20 @@ import { defineStore } from "pinia";
import { ref } from "vue";
/** importType*/
import type { ItemsMenu } from "@/modules/13_salary/interface/index/Main";
import type {
ItemsMenu,
DataOption,
} from "@/modules/13_salary/interface/index/Main";
import type { DataPeriodLatest } from "@/modules/13_salary/interface/response/SalaryList";
export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
const titelPage = ref<string>("");
const tabGroup = ref<string>("group1");
const tabType = ref<string>("PENDING");
const groupOp = ref<DataOption[]>([
{ id: "", name: "กลุ่ม1" },
{ id: "", name: "กลุ่ม2" },
]);
const groupId = ref<string>("");
/** List Menu*/
const itemMenu = ref<ItemsMenu[]>([
@ -28,7 +35,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
label: "ย้ายขั้น",
icon: "mdi-account-arrow-left-outline",
color: "green-6",
type: "moveStep",
type: "moveLevel",
},
{
label: "ลบ",
@ -46,6 +53,16 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
: data.period === "APR"
? "รอบเมษายน"
: "รอบตุลาคม";
groupOp.value[0].id = data.group1id;
groupOp.value[1].id = data.group2id;
}
return { titelPage, tabGroup, tabType, itemMenu, groupId, fetchPeriodLatest };
return {
titelPage,
tabGroup,
tabType,
itemMenu,
groupId,
fetchPeriodLatest,
groupOp,
};
});