permission => บรรจุ แต่งตั้ง ย้าย โอน,สรรหา
This commit is contained in:
parent
c8fef97125
commit
d3b2733ad5
24 changed files with 206 additions and 99 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -223,9 +224,9 @@ const clickDelete = async (id: string) => {
|
|||
showLoader();
|
||||
http
|
||||
.delete(config.API.officerMainDelete(id))
|
||||
.then(() => {
|
||||
getData();
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
.then(async () => {
|
||||
await getData();
|
||||
await success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -248,6 +249,7 @@ onMounted(async () => {
|
|||
<div class="col-12">
|
||||
<div class="row col-12">
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
@click="openModalOrder"
|
||||
size="14px"
|
||||
flat
|
||||
|
|
@ -316,20 +318,18 @@ onMounted(async () => {
|
|||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE' &&
|
||||
checkPermission($route)?.attrIsDelete
|
||||
"
|
||||
icon="delete"
|
||||
size="14px"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
:color="
|
||||
props.row.status == 'REPORT' || props.row.status == 'DONE'
|
||||
? 'grey'
|
||||
: 'red-7'
|
||||
"
|
||||
color="red-7"
|
||||
@click="clickDelete(props.row.id)"
|
||||
:disable="
|
||||
props.row.status == 'REPORT' || props.row.status == 'DONE'
|
||||
"
|
||||
>
|
||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
|
|
@ -337,7 +337,10 @@ onMounted(async () => {
|
|||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.id"
|
||||
@click.stop.prevent="openDetail(props.row.id)"
|
||||
@click.stop.prevent="
|
||||
checkPermission($route)?.attrIsGet &&
|
||||
openDetail(props.row.id)
|
||||
"
|
||||
>
|
||||
<div v-if="col.name === 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue