Merge branch 'nice_dev' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-02-27 15:36:08 +07:00
commit 4f9f8ecc65
11 changed files with 655 additions and 268 deletions

View file

@ -1,8 +1,51 @@
import { defineStore } from "pinia";
import { ref } from "vue";
/** importType*/
import type { ItemsMenu } 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>("tab1");
return { tabGroup, tabType };
const tabType = ref<string>("PENDING");
const groupId = ref<string>("");
/** List Menu*/
const itemMenu = ref<ItemsMenu[]>([
{
label: "แก้ไขเงินเดือน",
icon: "edit",
color: "edit",
type: "edit",
},
{
label: "ย้ายกลุ่ม",
icon: "mdi-account-arrow-right-outline",
color: "indigo-6",
type: "moveGroup",
},
{
label: "ย้ายขั้น",
icon: "mdi-account-arrow-left-outline",
color: "green-6",
type: "moveStep",
},
{
label: "ลบ",
icon: "delete",
color: "red",
type: "delete",
},
]);
function fetchPeriodLatest(data: DataPeriodLatest, type: string) {
groupId.value = type === "group1" ? data.group1id : data.group2id;
titelPage.value =
data.period === "SPECIAL"
? "รอบพิเศษ"
: data.period === "APR"
? "รอบเมษายน"
: "รอบตุลาคม";
}
return { titelPage, tabGroup, tabType, itemMenu, groupId, fetchPeriodLatest };
});