feat(leave): add Processed Late tab to work-list
This commit is contained in:
parent
e9bcebee6d
commit
514de15f09
5 changed files with 542 additions and 3 deletions
|
|
@ -1,15 +1,26 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, toRefs } from "vue";
|
||||
import { computed, ref, toRefs } from "vue";
|
||||
|
||||
import { useWorklistDataStore } from "@/modules/09_leave/stores/WorkStore";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
/** import Components */
|
||||
import Tab1 from "@/modules/09_leave/components/02_WorkList/Tab1.vue";
|
||||
import Tab2 from "@/modules/09_leave/components/02_WorkList/Tab2.vue";
|
||||
import Tab3 from "@/modules/09_leave/components/02_WorkList/Tab3_Processed_Late.vue";
|
||||
|
||||
const stores = useWorklistDataStore();
|
||||
|
||||
const route = useRoute();
|
||||
const { tabs } = toRefs(stores);
|
||||
|
||||
const isPermissionTab3 = computed(() => {
|
||||
return (
|
||||
checkPermission(route)?.attrOwnership === "OWNER" ||
|
||||
(checkPermission(route)?.attrOwnership === "STAFF" &&
|
||||
checkPermission(route)?.attrIsUpdate)
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -30,6 +41,12 @@ const { tabs } = toRefs(stores);
|
|||
>
|
||||
<q-tab name="1" label="รายการลงเวลาที่ประมวลผลแล้ว" />
|
||||
<q-tab name="2" label="รายการลงเวลา" />
|
||||
<q-tab
|
||||
v-if="isPermissionTab3"
|
||||
name="3"
|
||||
label="ประมวลผลการขาดราชการ/มาสาย"
|
||||
/>
|
||||
<!-- เพิ่มแท็บใหม่ -->
|
||||
</q-tabs>
|
||||
|
||||
<q-separator />
|
||||
|
|
@ -42,6 +59,9 @@ const { tabs } = toRefs(stores);
|
|||
<q-tab-panel name="2">
|
||||
<Tab2 />
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="3">
|
||||
<Tab3 />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue