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";
|
||||
|
||||
|
|
@ -201,14 +202,15 @@ const clickDelete = (id: string) => {
|
|||
showLoader();
|
||||
await http
|
||||
.delete(config.API.otherByid(id))
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
.then(async () => {
|
||||
await fecthlistOthet();
|
||||
await success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
fecthlistOthet();
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -239,6 +241,7 @@ onMounted(() => {
|
|||
<div class="col-12">
|
||||
<div class="row col-12">
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsUpdate"
|
||||
@click="popup()"
|
||||
size="14px"
|
||||
flat
|
||||
|
|
@ -305,15 +308,12 @@ 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)?.attrIsDelete">
|
||||
<q-btn
|
||||
:color="
|
||||
props.row.status == 'REPORT' || props.row.status == 'DONE'
|
||||
? 'grey'
|
||||
: 'red-7'
|
||||
"
|
||||
:disable="
|
||||
props.row.status == 'REPORT' || props.row.status == 'DONE'
|
||||
color=" red-7"
|
||||
v-if="
|
||||
props.row.status !== 'REPORT' &&
|
||||
props.row.status !== 'DONE'
|
||||
"
|
||||
flat
|
||||
round
|
||||
|
|
@ -327,7 +327,9 @@ onMounted(() => {
|
|||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.id"
|
||||
@click.stop.prevent="nextPage(props.row.id)"
|
||||
@click.stop.prevent="
|
||||
checkPermission($route)?.attrIsGet && nextPage(props.row.id)
|
||||
"
|
||||
>
|
||||
<div v-if="col.name === 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue