mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-06 22:56:27 +00:00
Move auth config and build admin menus
Extract NextAuth configuration into a shared library, load admin sidebar items from role permissions, and update related RBAC types and UI.
This commit is contained in:
Vendored
+4
-1
@@ -19,18 +19,21 @@ declare module 'next-auth' {
|
||||
company?: ICompany
|
||||
division?: IDivision
|
||||
role: {
|
||||
id: number
|
||||
code: string
|
||||
name: string
|
||||
allow_admin_panel: boolean
|
||||
role_detail?: {
|
||||
action: string[]
|
||||
menu: {
|
||||
id: number
|
||||
code: string
|
||||
name: string
|
||||
menu_parent_id: number
|
||||
icon: string
|
||||
path_url: string
|
||||
sort: number
|
||||
hidden_data: boolean
|
||||
is_admin_menu: boolean
|
||||
}
|
||||
}[]
|
||||
}
|
||||
|
||||
+8
-1
@@ -21,13 +21,21 @@ export interface IMenu {
|
||||
is_admin_menu: boolean;
|
||||
menu_parent_id?: number | null;
|
||||
action?: string[];
|
||||
status_id?: number
|
||||
status?: {
|
||||
id?: number;
|
||||
code?: string;
|
||||
name?: string;
|
||||
};
|
||||
sort: number
|
||||
children?: IMenu[];
|
||||
menu_level?: number;
|
||||
"created_at"?: string
|
||||
"created_by"?: number
|
||||
"updated_at"?: string
|
||||
"updated_by"?: 1
|
||||
"deleted_at"?: string
|
||||
"deleted_by"?: number
|
||||
}
|
||||
|
||||
export interface IRoleDetail {
|
||||
@@ -48,7 +56,6 @@ export interface IRole {
|
||||
description?: string;
|
||||
allow_admin_panel?: boolean;
|
||||
role_detail?: IRoleDetail[];
|
||||
privilege?: any[];
|
||||
status?: {
|
||||
id?: number;
|
||||
code?: string;
|
||||
|
||||
Reference in New Issue
Block a user