permission => โครงสร้างอัตรากำลัง,อัตรากำลังลูกจ้างประจำ,ทะเบียนประวัติ, ทะเบียนประวัติลูกจ้าง,ตั้งค่าเว็บสรรหา, สอบแข่งขัน
This commit is contained in:
parent
a59a9d5ee7
commit
c8fef97125
34 changed files with 606 additions and 1904 deletions
|
|
@ -1,5 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, computed } from "vue";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -540,6 +542,7 @@ onMounted(() => {
|
|||
<template>
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
flat
|
||||
color="primary"
|
||||
round
|
||||
|
|
@ -599,8 +602,8 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width />
|
||||
<q-th auto-width />
|
||||
<q-th auto-width v-if="checkPermission($route)?.attrIsUpdate" />
|
||||
<q-th auto-width v-if="checkPermission($route)?.attrIsUpdate" />
|
||||
<q-th auto-width />
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
|
|
@ -609,7 +612,7 @@ onMounted(() => {
|
|||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width>
|
||||
<q-td auto-width v-if="checkPermission($route)?.attrIsUpdate">
|
||||
<q-btn
|
||||
dense
|
||||
size="12px"
|
||||
|
|
@ -620,10 +623,9 @@ onMounted(() => {
|
|||
icon="mdi-arrow-up-bold"
|
||||
@click="onSwapUp(props.row.id)"
|
||||
>
|
||||
<!-- <q-tooltip>เลื่อนลำดับขึ้น</q-tooltip> -->
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-td auto-width v-if="checkPermission($route)?.attrIsUpdate">
|
||||
<q-btn
|
||||
dense
|
||||
size="12px"
|
||||
|
|
@ -634,11 +636,11 @@ onMounted(() => {
|
|||
icon="mdi-arrow-down-bold"
|
||||
@click="onSwapDown(props.row.id)"
|
||||
>
|
||||
<!-- <q-tooltip>เลื่อนลำดับลง</q-tooltip> -->
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
color="primary"
|
||||
flat
|
||||
dense
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -229,6 +230,7 @@ onMounted(() => {
|
|||
<template>
|
||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
dense
|
||||
color="teal-5"
|
||||
icon="add"
|
||||
|
|
@ -337,6 +339,7 @@ onMounted(() => {
|
|||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
flat
|
||||
dense
|
||||
round
|
||||
|
|
@ -359,19 +362,6 @@ onMounted(() => {
|
|||
>
|
||||
<q-tooltip>ประวัติบันทึกวันที่ไม่ได้รับเงินเดือนฯ</q-tooltip>
|
||||
</q-btn>
|
||||
<!-- <q-btn
|
||||
flat
|
||||
dense
|
||||
round
|
||||
size="14px"
|
||||
color="red"
|
||||
icon="mdi-delete"
|
||||
@click="
|
||||
dialogRemove($q, async () => await deleteData(props.row.id))
|
||||
"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn> -->
|
||||
</q-td>
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div>{{ col.value ? col.value : "-" }}</div>
|
||||
|
|
@ -385,6 +375,7 @@ onMounted(() => {
|
|||
<q-card bordered>
|
||||
<q-card-actions class="bg-grey-3" align="right">
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
|
|
@ -407,7 +398,7 @@ onMounted(() => {
|
|||
<q-list>
|
||||
<q-item
|
||||
v-for="(col, index) in props.cols.filter(
|
||||
(col) => col.name !== 'desc'
|
||||
(col:any) => col.name !== 'desc'
|
||||
)"
|
||||
:key="col.name"
|
||||
:class="index % 2 !== 0 ? 'bg-grey-1' : ''"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue