fix
This commit is contained in:
parent
7f3eb5225f
commit
4c35662eed
22 changed files with 632 additions and 343 deletions
|
|
@ -6,6 +6,7 @@ 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 type { QTableProps } from "quasar";
|
||||
import type {
|
||||
|
|
@ -59,6 +60,12 @@ const personId = ref<string>("");
|
|||
* เก็บข้อมูลโครงสร้างไว้ใน nodeTree
|
||||
*/
|
||||
async function fatchOrg() {
|
||||
const tokenParsedData = await tokenParsed();
|
||||
const isSuperAdmin = tokenParsedData.role.includes("SUPER_ADMIN");
|
||||
if (!isSuperAdmin) {
|
||||
nodeTree.value = [];
|
||||
}
|
||||
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.permissionOrg)
|
||||
|
|
@ -127,6 +134,7 @@ const columns = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const visibleColumns = ref<string[]>(["fullName", "orgNew"]);
|
||||
const modalAdd = ref<boolean>(false); // modal เพิ่มข้อมูลรายชื่อ
|
||||
|
||||
/**
|
||||
|
|
@ -363,6 +371,23 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row col-12 q-mt-sm">
|
||||
<q-space />
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
style="min-width: 140px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 q-mt-sm">
|
||||
<d-table
|
||||
:columns="columns"
|
||||
|
|
@ -374,6 +399,7 @@ onMounted(async () => {
|
|||
dense
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
@update:pagination="updatePagination"
|
||||
:visible-columns="visibleColumns"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue