จัดการผู้ใช้งาน => เพิ่มผู้ใช้งาน => เพิ่ม column prefix, ลบ btn แก้ไข
This commit is contained in:
parent
1e061649e0
commit
293642fd02
5 changed files with 50 additions and 20 deletions
|
|
@ -3,6 +3,7 @@ import env from "../index";
|
||||||
const management = `${env.API_URI}/org/keycloak`;
|
const management = `${env.API_URI}/org/keycloak`;
|
||||||
const managementAuth = `${env.API_URI}/org/auth/authRole`;
|
const managementAuth = `${env.API_URI}/org/auth/authRole`;
|
||||||
const managementSys = `${env.API_URI}/org/auth/authSys`;
|
const managementSys = `${env.API_URI}/org/auth/authSys`;
|
||||||
|
const managementPermission = `${env.API_URI}/org/auth/authRole/govoment`;
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
management,
|
management,
|
||||||
|
|
@ -12,4 +13,7 @@ export default {
|
||||||
|
|
||||||
/** จัดการบทบาทและสิทธิ์*/
|
/** จัดการบทบาทและสิทธิ์*/
|
||||||
managementAuth,
|
managementAuth,
|
||||||
|
|
||||||
|
/** กำหนดสิทธิ์*/
|
||||||
|
managementPermission,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
/** importType*/
|
/** importType*/
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { Roles } from "@/modules/02_users/interface/response/Main";
|
|
||||||
import type { FilterReqMaster } from "@/modules/02_users/interface/request/Main";
|
import type { FilterReqMaster } from "@/modules/02_users/interface/request/Main";
|
||||||
|
import type { Roles } from "@/modules/02_users/interface/response/Main";
|
||||||
|
|
||||||
/** importStore*/
|
/** importStore*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
@ -35,6 +35,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
dataPosMaster: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const rows = ref<Roles[]>([]);
|
const rows = ref<Roles[]>([]);
|
||||||
|
|
@ -89,17 +93,27 @@ function onSubmit() {
|
||||||
dialogMessageNotify($q, "กรุณาเลือกสิทธิ์อย่างน้อง 1 สิทธิ์");
|
dialogMessageNotify($q, "กรุณาเลือกสิทธิ์อย่างน้อง 1 สิทธิ์");
|
||||||
} else {
|
} else {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
const arrayId = selected.value.map((e: Roles) => e.id);
|
|
||||||
console.log(arrayId);
|
|
||||||
|
|
||||||
showLoader();
|
showLoader();
|
||||||
closeDialog();
|
const arrayId = selected.value.map((e: Roles) => e.id);
|
||||||
props.fetchDataTable(
|
http
|
||||||
reqMaster.value.id,
|
.post(config.API.managementPermission, {
|
||||||
reqMaster.value.revisionId,
|
authRoleId: arrayId[0],
|
||||||
reqMaster.value.type
|
posMasterId: props.dataPosMaster.id,
|
||||||
);
|
})
|
||||||
hideLoader();
|
.then(() => {
|
||||||
|
closeDialog();
|
||||||
|
props.fetchDataTable(
|
||||||
|
reqMaster.value.id,
|
||||||
|
reqMaster.value.revisionId,
|
||||||
|
reqMaster.value.type
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -139,17 +153,17 @@ watch(
|
||||||
dense
|
dense
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumns"
|
||||||
selection="multiple"
|
selection="single"
|
||||||
v-model:selected="selected"
|
v-model:selected="selected"
|
||||||
>
|
>
|
||||||
<template v-slot:header-selection="scope">
|
<!-- <template v-slot:header-selection="scope">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
color="primary"
|
color="primary"
|
||||||
dense
|
dense
|
||||||
v-model="scope.selected"
|
v-model="scope.selected"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template> -->
|
||||||
|
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" class="cursor-pointer">
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,15 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "prefix",
|
||||||
|
align: "left",
|
||||||
|
label: "คำนำหน้าชื่อ",
|
||||||
|
sortable: true,
|
||||||
|
field: "prefix",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "firstName",
|
name: "firstName",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
|
||||||
|
|
@ -109,12 +109,12 @@ const userId = ref<string>("");
|
||||||
|
|
||||||
/** List Mune*/
|
/** List Mune*/
|
||||||
const itemMenu = ref<ItemsMenu[]>([
|
const itemMenu = ref<ItemsMenu[]>([
|
||||||
{
|
// {
|
||||||
label: "แก้ไข",
|
// label: "แก้ไข",
|
||||||
icon: "edit",
|
// icon: "edit",
|
||||||
color: "edit",
|
// color: "edit",
|
||||||
type: "edit",
|
// type: "edit",
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: "จัดการสิทธิ์",
|
label: "จัดการสิทธิ์",
|
||||||
icon: "mdi-account-group",
|
icon: "mdi-account-group",
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,7 @@ const reqMaster = reactive<FilterReqMaster>({
|
||||||
const maxPage = ref<number>(0);
|
const maxPage = ref<number>(0);
|
||||||
const totalRow = ref<number>(0);
|
const totalRow = ref<number>(0);
|
||||||
const posMaster = ref<PosMaster[]>([]);
|
const posMaster = ref<PosMaster[]>([]);
|
||||||
|
const dataPosMaster = ref<PosMaster>();
|
||||||
const pagination = ref<Pagination>({
|
const pagination = ref<Pagination>({
|
||||||
page: reqMaster.page,
|
page: reqMaster.page,
|
||||||
rowsPerPage: reqMaster.pageSize,
|
rowsPerPage: reqMaster.pageSize,
|
||||||
|
|
@ -310,6 +311,7 @@ function updatePagination(newPagination: Pagination) {
|
||||||
|
|
||||||
function onClickAddRole(data: PosMaster) {
|
function onClickAddRole(data: PosMaster) {
|
||||||
modalDialogAdd.value = true;
|
modalDialogAdd.value = true;
|
||||||
|
dataPosMaster.value = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** callblck function ทำการ fetch ข้อมูล tree เมื่อมีการเปลี่ยน Tab ปัจจับัน,แบบร่าง*/
|
/** callblck function ทำการ fetch ข้อมูล tree เมื่อมีการเปลี่ยน Tab ปัจจับัน,แบบร่าง*/
|
||||||
|
|
@ -681,6 +683,7 @@ onMounted(() => {
|
||||||
<DialogAdd
|
<DialogAdd
|
||||||
v-model:modal="modalDialogAdd"
|
v-model:modal="modalDialogAdd"
|
||||||
v-model:reqMaster="reqMaster"
|
v-model:reqMaster="reqMaster"
|
||||||
|
:dataPosMaster="dataPosMaster as PosMaster"
|
||||||
:fetchDataTable="fetchDataTable"
|
:fetchDataTable="fetchDataTable"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue