fix role
This commit is contained in:
parent
1e60384a47
commit
3147e88622
|
|
@ -88,7 +88,7 @@ export default function FormMasterUserRole() {
|
|||
const formData = {
|
||||
code: data.code,
|
||||
description: data.description,
|
||||
statusId: 1,
|
||||
statusId: 2,
|
||||
userLevelIds: [Number(data.userLevelId)],
|
||||
name: data.name,
|
||||
userRoleAccess: data.userRoleAccess.map((roleAccess) => {
|
||||
|
|
@ -99,7 +99,7 @@ export default function FormMasterUserRole() {
|
|||
isInsertEnabled: roleAccess.isInsertEnabled,
|
||||
isUpdateEnabled: roleAccess.isUpdateEnabled,
|
||||
isViewEnabled: roleAccess.isViewEnabled,
|
||||
menuId: roleAccess.menuId,
|
||||
menuId: 1,
|
||||
};
|
||||
}),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ export default function MasterRoleTable() {
|
|||
{ name: "Role", uid: "name" },
|
||||
{ name: "Description", uid: "description" },
|
||||
{ name: "Code", uid: "code" },
|
||||
{ name: "Level Number", uid: "level_number" },
|
||||
// { name: "Level Number", uid: "level_number" },
|
||||
// { name: "Status Id", uid: "status_id" },
|
||||
{ name: "Aksi", uid: "actions" },
|
||||
];
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ import {
|
|||
httpPost,
|
||||
} from "./http-config/axios-base-service";
|
||||
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
const token = Cookies.get("access_token");
|
||||
|
||||
export async function listUserRole(data: any) {
|
||||
const headers = {
|
||||
"content-type": "application/json",
|
||||
|
|
@ -17,6 +21,7 @@ export async function listUserRole(data: any) {
|
|||
export async function createMasterUserRole(data: any) {
|
||||
const headers = {
|
||||
"content-type": "application/json",
|
||||
Authorization: `Bearer ${token}`,
|
||||
};
|
||||
const pathUrl = `/user-roles`;
|
||||
return await httpPost(pathUrl, headers, data);
|
||||
|
|
|
|||
Loading…
Reference in New Issue