เครืองราช => permission จัดการคำขอ
This commit is contained in:
parent
10ff884792
commit
a33d6624f9
6 changed files with 195 additions and 130 deletions
|
|
@ -1,12 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch, reactive } from "vue";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { checkPermission } from "@/utils/permissions";
|
||||
|
||||
/** import Type*/
|
||||
import type { QTableProps } from "quasar";
|
||||
|
||||
/** import components*/
|
||||
import DialogInformation from "@/components/Dialogs/Information.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
/** import Stores */
|
||||
import { useInsigniaDataStore } from "@/modules/07_insignia/store";
|
||||
|
|
@ -167,12 +169,21 @@ function changtypeOc() {
|
|||
DataStore.typeOc = organization.value;
|
||||
}
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
|
||||
/**
|
||||
* function redirect ทะเบียนประวัติิ
|
||||
* @param id profileId
|
||||
*/
|
||||
function nextPage(id: string) {
|
||||
router.push(`/registry-officer/${id}`);
|
||||
modalPersonal.value = true;
|
||||
personId.value = id;
|
||||
// router.push(`/registry-officer/${id}`);
|
||||
}
|
||||
|
||||
function updatemodalPersonal(modal: boolean) {
|
||||
modalPersonal.value = modal;
|
||||
}
|
||||
|
||||
/** filter table*/
|
||||
|
|
@ -450,26 +461,22 @@ onMounted(async () => {
|
|||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<span class="text-weight-medium">{{ col.label }}</span>
|
||||
</q-th>
|
||||
<q-th auto-width />
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr
|
||||
:props="props"
|
||||
class="cursor-pointer"
|
||||
@click="nextPage(props.row.profileId)"
|
||||
>
|
||||
<q-td v-if="props.row.requestNote != null" auto-width>
|
||||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="blue"
|
||||
@click.stop
|
||||
@click="showReson(props.row.name, props.row.requestNote)"
|
||||
icon="mdi-information-outline"
|
||||
color="info"
|
||||
@click="nextPage(props.row.profileId)"
|
||||
icon="mdi-eye"
|
||||
>
|
||||
<q-tooltip>เหตุผลการไม่ยื่นขอ</q-tooltip>
|
||||
<q-tooltip>ดูข้อมูลทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
<q-td key="no" :props="props">
|
||||
|
|
@ -502,6 +509,21 @@ onMounted(async () => {
|
|||
<q-td key="insigniaLevel" :props="props">
|
||||
{{ props.row.insigniaLevel }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="props.row.requestNote != null && checkPermission($route)?.attrIsGet"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
color="blue"
|
||||
@click.pervent="
|
||||
showReson(props.row.name, props.row.requestNote)
|
||||
"
|
||||
icon="mdi-information-outline"
|
||||
>
|
||||
<q-tooltip>เหตุผลการไม่ยื่นขอ</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</d-table>
|
||||
|
|
@ -515,4 +537,10 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<PopupPersonal
|
||||
:modal="modalPersonal"
|
||||
:id="personId"
|
||||
@update:modal="updatemodalPersonal"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue