รายการลา สิทธ์
This commit is contained in:
parent
3dec9ee381
commit
c198d3d153
5 changed files with 48 additions and 31 deletions
|
|
@ -13,7 +13,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
import moment from "moment";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
/** importType*/
|
||||
import type {
|
||||
DataDateMonthObject,
|
||||
|
|
@ -292,11 +292,11 @@ const monthYearThai = (val: DataDateMonthObject) => {
|
|||
<template v-slot:eventContent="arg">
|
||||
<div
|
||||
class="row col-12 items-center no-wrap"
|
||||
:style="`background: + ${arg.event.color}`"
|
||||
:style="checkPermission($route)?.attrIsGet ? `background: + ${arg.event.color}`:`background: + ${arg.event.color};pointer-events: none;cursor: auto;`"
|
||||
>
|
||||
<div
|
||||
class="textHover col-10"
|
||||
@click="redirectToDetail(arg.event.id)"
|
||||
@click="checkPermission($route)?.attrIsGet ? redirectToDetail(arg.event.id):''"
|
||||
>
|
||||
{{ arg.event.title }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -96,9 +96,7 @@ async function fetchOption() {
|
|||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
|
||||
});
|
||||
.finally(() => {});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
|
|
@ -109,7 +107,8 @@ onMounted(async () => {
|
|||
watch(
|
||||
() => leaveStore.tabView,
|
||||
async () => {
|
||||
leaveStore.tabView === "list" && (await fecthLeaveList());
|
||||
leaveStore.tabView === "list" &&
|
||||
(await fecthLeaveList(), await fetchOption());
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import { ref, onMounted, watch } from "vue";
|
||||
import type { QTableProps } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
/** importStores*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -240,20 +241,19 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
|||
|
||||
function convert(val: any) {
|
||||
const filtertype = props.dataToobar?.find(
|
||||
(e: any) => e.id === val.leaveTypeId
|
||||
);
|
||||
const type = filtertype?.code;
|
||||
if(type == 'LV-006'&&val.hajjDayStatus == false){
|
||||
return 'ลาอุปสมบท'
|
||||
}else if(type == 'LV-006'&&val.hajjDayStatus == true){
|
||||
return 'ลาประกอบพิธีฮัจญ์'
|
||||
}else{
|
||||
return val.leaveTypeName
|
||||
}
|
||||
(e: any) => e.id === val.leaveTypeId
|
||||
);
|
||||
const type = filtertype?.code;
|
||||
if (type == "LV-006" && val.hajjDayStatus == false) {
|
||||
return "ลาอุปสมบท";
|
||||
} else if (type == "LV-006" && val.hajjDayStatus == true) {
|
||||
return "ลาประกอบพิธีฮัจญ์";
|
||||
} else {
|
||||
return val.leaveTypeName;
|
||||
}
|
||||
}
|
||||
/** Hook*/
|
||||
onMounted(() => {
|
||||
|
||||
if (leaveStore.tabMenu === "1") {
|
||||
leaveStore.visibleColumns = visibleColumnsLeave.value;
|
||||
leaveStore.columns = columnsLeave.value;
|
||||
|
|
@ -282,19 +282,28 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width> </q-th>
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
@click.prevent="redirectToDetail(props.row.id)"
|
||||
>
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="mdi-eye"
|
||||
color="info"
|
||||
@click.prevent="redirectToDetail(props.row.id)"
|
||||
>
|
||||
<q-tooltip>รายละเอียด</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'">
|
||||
{{
|
||||
(currentPage - 1) * Number(pagination.rowsPerPage) +
|
||||
|
|
|
|||
|
|
@ -232,12 +232,11 @@ function searchData() {
|
|||
<div>
|
||||
<q-btn
|
||||
flat
|
||||
icon="mdi-dots-vertical"
|
||||
color="grey-8"
|
||||
icon="mdi-dots-horizontal-circle-outline"
|
||||
color="secondary"
|
||||
for="#cancel"
|
||||
dense
|
||||
round
|
||||
unelevated
|
||||
>
|
||||
<q-menu>
|
||||
<q-list>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ import DialogApprove from "@/modules/09_leave/components/4_specialTime/DialogApp
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useSpecialTimeStore } from "@/modules/09_leave/stores/SpecialTimeStore";
|
||||
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
const dataSpecialTime = useSpecialTimeStore();
|
||||
const $q = useQuasar(); // show dialog
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -297,10 +299,14 @@ const monthYearThai = (val: any) => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width class="text-right">
|
||||
<q-btn
|
||||
v-if="props.row.status == 'PENDING'"
|
||||
v-if="
|
||||
props.row.status == 'PENDING' &&
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet
|
||||
"
|
||||
color="orange"
|
||||
class="q-px-md"
|
||||
dense
|
||||
|
|
@ -310,7 +316,11 @@ const monthYearThai = (val: any) => {
|
|||
>
|
||||
|
||||
<q-btn
|
||||
v-if="props.row.status == 'PENDING'"
|
||||
v-if="
|
||||
props.row.status == 'PENDING' &&
|
||||
checkPermission($route)?.attrIsUpdate &&
|
||||
checkPermission($route)?.attrIsGet
|
||||
"
|
||||
color="primary"
|
||||
class="q-px-md q-ml-sm"
|
||||
dense
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue