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 { ref, reactive, onMounted, 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 { tokenParsed } from "@/plugins/auth";
|
||||
import { usekeycloakPosition } from "@/stores/keycloakPosition";
|
||||
|
||||
/** importType*/
|
||||
import type { QTableProps } from "quasar";
|
||||
|
|
@ -23,6 +25,7 @@ import PopupPersonal from "@/modules/02_users/components/RoleOrganization/Dialog
|
|||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
const { dataPosition } = storeToRefs(usekeycloakPosition());
|
||||
const { showLoader, hideLoader, messageError, success, dialogRemove } =
|
||||
useCounterMixin();
|
||||
|
||||
|
|
@ -59,6 +62,11 @@ const nodes = ref<Array<NodeTree>>([
|
|||
totalRootPositionNextVacant: 0,
|
||||
children: [] as NodeTree[],
|
||||
isOfficer: false,
|
||||
orgRootDnaId: "",
|
||||
orgChild1DnaId: "",
|
||||
orgChild2DnaId: "",
|
||||
orgChild3DnaId: "",
|
||||
orgChild4DnaId: "",
|
||||
},
|
||||
]); // ข้อมูลโครงสร้าง
|
||||
const lazy = ref(nodes);
|
||||
|
|
@ -402,6 +410,14 @@ function updatemodalPersonal(modal: boolean) {
|
|||
modalPersonal.value = modal;
|
||||
}
|
||||
|
||||
function hideBtnAction(id: string) {
|
||||
if (dataPosition.value?.profileId === id) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/** callblck function ทำการ fetch ข้อมูล Table เมื่อมีการเปลี่ยนหน้า*/
|
||||
watch([() => reqMaster.pageSize], () => {
|
||||
fetchDataTable(reqMaster.id, reqMaster.revisionId, reqMaster.type);
|
||||
|
|
@ -680,8 +696,9 @@ onMounted(() => {
|
|||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td>
|
||||
<q-td accesskey="">
|
||||
<q-btn
|
||||
v-if="hideBtnAction(props.row.current_holderId)"
|
||||
flat
|
||||
dense
|
||||
icon="mdi-dots-vertical"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue