mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-05 10:56:28 +00:00
7f8e6637e4
Extract NextAuth configuration into a shared library, load admin sidebar items from role permissions, and update related RBAC types and UI.
44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
import { ICompany } from "@/app/admin/administration/company/component/type";
|
|
import { IDivision } from "@/app/admin/administration/division/component/type";
|
|
import NextAuth from "next-auth";
|
|
|
|
declare module 'next-auth' {
|
|
interface Session {
|
|
user: {
|
|
access_token: string
|
|
refresh_token: string
|
|
expired_at: number
|
|
detail: {
|
|
id: number
|
|
email: string
|
|
nik: string
|
|
fullname: string
|
|
nickname: string
|
|
avatar?: string
|
|
phone_number: string
|
|
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
|
|
is_admin_menu: boolean
|
|
}
|
|
}[]
|
|
}
|
|
}
|
|
error?: string | any
|
|
}
|
|
}
|
|
} |