fix:hideBtnAction
This commit is contained in:
parent
a760910794
commit
8b4ea6da38
12 changed files with 277 additions and 26 deletions
|
|
@ -1,11 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
import { reactive, ref, 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 { usekeycloakPosition } from "@/stores/keycloakPosition";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
import type {
|
||||
|
|
@ -17,6 +19,7 @@ import DialogHeader from "@/components/DialogHeader.vue";
|
|||
|
||||
const $q = useQuasar();
|
||||
const store = useDataStoreUser();
|
||||
const { dataPosition } = storeToRefs(usekeycloakPosition());
|
||||
const {
|
||||
showLoader,
|
||||
hideLoader,
|
||||
|
|
@ -184,6 +187,18 @@ function onClose() {
|
|||
isCheck.value = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* ซ่อน checkbox ของผู้ใช้งานที่กำลังล็อกอินอยู่
|
||||
* @param id รหัสผู้ใช้งาน
|
||||
*/
|
||||
function hideCheckbox(id: string) {
|
||||
if (dataPosition.value?.profileId === id) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ดูการเปลี่ยนแปลงของ pageSize ใน queryBody
|
||||
*
|
||||
|
|
@ -237,6 +252,7 @@ watch(
|
|||
dense
|
||||
v-model="qurey.searchKeyword"
|
||||
label="คำค้น"
|
||||
@keydown.enter.prevent="onSearchListPerson(true)"
|
||||
>
|
||||
<!-- <template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
|
|
@ -287,6 +303,7 @@ watch(
|
|||
<q-tr :props="props">
|
||||
<td auto-width>
|
||||
<q-checkbox
|
||||
v-if="hideCheckbox(props.row.id)"
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue