add ui dialog create or select command

This commit is contained in:
Warunee Tamkoo 2024-09-24 11:19:41 +07:00
parent df4cb61671
commit 874cd33e9d
6 changed files with 388 additions and 22 deletions

View file

@ -0,0 +1,29 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import type { ListCommand } from "@/modules/18_command/interface/index/Main";
export const useCommandMainStore = defineStore("commandMainStore", () => {
const commandTypes = ref<ListCommand[]>([
{
id: "c94b8ce3-46f2-4ecb-9d3c-4d6b08f33dd9",
name: "คำสั่งให้โอนข้าราชการกรุงเทพมหานครสามัญ",
code: "C-PM-13",
subtitle: "",
commandSysId: "PLACEMENT",
},
]);
function getCommandTypes(data: ListCommand[]) {
return (commandTypes.value = data);
}
function getCommandTypeById(id: string) {
return commandTypes.value.find((item) => item.id === id);
}
return {
commandTypes,
getCommandTypes,
getCommandTypeById,
};
});