import { defineStore } from "pinia"; import { ref } from "vue"; import type { DataOption } from "@/modules/10_registry/interface/index/Main"; export const useIndividualDevelopmentPlan = defineStore( "individualDevelopmentPlan", () => { const optionStatus = ref([ { id: "ALL", name: "ทั้งหมด" }, { id: "PENDING", name: "รอดำเนินการ" }, { id: "COMPLETE", name: "ดำเนินการแก้ไขแล้ว" }, { id: "REJECT", name: "ไม่อนุมัตการแก้ไข" }, ]); function convertStatus(val: string) { switch (val) { case "PENDING": return "รอดำเนินการ"; case "APPROVE": return "อนุมัติ"; case "REJECT": return "ไม่อนุมัติ"; default: return "-"; } } return { convertStatus, optionStatus }; } );