fix(ManagementRoleUser)page to dialog
This commit is contained in:
parent
cf0f90e8c2
commit
0c227a9f1f
3 changed files with 275 additions and 3 deletions
|
|
@ -23,6 +23,7 @@ import type { Users, Roles } from "@/modules/02_users/interface/response/Main";
|
|||
|
||||
/** importComponents*/
|
||||
import DialogAddUser from "@/modules/02_users/components/Users/DialogFormUser.vue";
|
||||
import DialogManagementRole from "@/modules/02_users/components/Users/DialogManagementRole.vue";
|
||||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
|
|
@ -207,6 +208,8 @@ const employeeClassMain = ref<DataOption[]>([
|
|||
]);
|
||||
const employeeClassOption = ref<DataOption[]>(employeeClassMain.value);
|
||||
|
||||
const modalDialogManagementRole = ref<boolean>(false); // จัดการสิทธิ์ผู้ใช้งาน
|
||||
|
||||
/** ฟังก์ชันเรียกข้อมูลโครงสร้าง แบบปัจุบัน*/
|
||||
async function fetchOrganizationActive() {
|
||||
showLoader();
|
||||
|
|
@ -308,7 +311,10 @@ function onClickAction(type: string, data: Users) {
|
|||
onDeleteUser(data.id);
|
||||
} else if (type === "managementRole") {
|
||||
// ไปยังหน้าจัดการสิทธิ์ของผู้ใช้งาน
|
||||
data && router.push(`/users/roles/${data.id}`);
|
||||
// data && router.push(`/users/roles/${data.id}`);
|
||||
// data && (userId.value = data.id);
|
||||
userId.value = data.id;
|
||||
modalDialogManagementRole.value = true;
|
||||
} else if (type === "open" || type === "close") {
|
||||
// เปลี่ยนสถานะเปิด/ปิดของผู้ใช้งาน
|
||||
const status = type === "open" ? true : false;
|
||||
|
|
@ -760,6 +766,12 @@ onMounted(async () => {
|
|||
:user-id="userId"
|
||||
:employee-class="employeeClass"
|
||||
/>
|
||||
|
||||
<DialogManagementRole
|
||||
v-model:model-value="modalDialogManagementRole"
|
||||
v-model:user-id="userId"
|
||||
:fetch-list="fetchListUsers"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue