fix:hideBtnAction
This commit is contained in:
parent
a760910794
commit
8b4ea6da38
12 changed files with 277 additions and 26 deletions
|
|
@ -1,12 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDataStoreUser } from "@/modules/02_users/stores/main";
|
||||
import { tokenParsed } from "@/plugins/auth";
|
||||
import { usekeycloakPosition } from "@/stores/keycloakPosition";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type {
|
||||
|
|
@ -21,6 +23,7 @@ import PopupPersonal from "@/modules/02_users/components/RoleOrganization/Dialog
|
|||
|
||||
const $q = useQuasar();
|
||||
const store = useDataStoreUser();
|
||||
const { dataPosition } = storeToRefs(usekeycloakPosition());
|
||||
const { showLoader, hideLoader, messageError, success, dialogRemove } =
|
||||
useCounterMixin();
|
||||
|
||||
|
|
@ -212,6 +215,14 @@ function updatemodalPersonal(modal: boolean) {
|
|||
modalPersonal.value = modal;
|
||||
}
|
||||
|
||||
function checkhideBtnAction(id: string) {
|
||||
if (dataPosition.value?.profileId === id) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ดูการเปลี่ยนแปลงของ pageSize ใน queryBody
|
||||
* เมื่อ pageSize มีการเปลี่ยนแปลงให้โหลดข้อมูลหน้าแรก
|
||||
|
|
@ -334,6 +345,7 @@ onMounted(async () => {
|
|||
lazy-rules
|
||||
label="คำค้น"
|
||||
hide-bottom-space
|
||||
@keydown.enter.prevent="fetchListPerson(true)"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
|
|
@ -393,6 +405,7 @@ onMounted(async () => {
|
|||
<q-tr :props="props">
|
||||
<q-td auto-width>
|
||||
<q-btn
|
||||
v-if="checkhideBtnAction(props.row.profileId)"
|
||||
flat
|
||||
dense
|
||||
color="red"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue