fixing to store check hide salary

This commit is contained in:
Warunee Tamkoo 2024-10-15 18:14:38 +07:00
parent e03dd72937
commit cf2756d23c
3 changed files with 29 additions and 43 deletions

View file

@ -7,6 +7,15 @@ import config from "@/app.config";
export const useCommandMainStore = defineStore("commandMainStore", () => {
const commandTypes = ref<ListCommand[]>([]);
const isShowSalary = (type: String) => {
return (
(type !==
"คำสั่งแต่งตั้งคณะกรรมการประเมินผลการทดลองปฏิบัติหน้าที่ราชการ" &&
type !== "คำสั่งยกเลิกการลาออก") ??
false
);
};
async function getCommandTypes() {
if (commandTypes.value.length === 0) {
await http
@ -31,5 +40,6 @@ export const useCommandMainStore = defineStore("commandMainStore", () => {
commandTypes,
getCommandTypes,
getCommandTypeById,
isShowSalary,
};
});