add ui dialog create or select command
This commit is contained in:
parent
df4cb61671
commit
874cd33e9d
6 changed files with 388 additions and 22 deletions
29
src/modules/18_command/store/Main.ts
Normal file
29
src/modules/18_command/store/Main.ts
Normal 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,
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue