Fix Middleware
Fix Layout sesuai role, dan superadmin bisa menambahkan menu ke user jika diperlukan Penambahan menu di user & role : menu access
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
// src/store/authStore.ts
|
||||
import { proxy } from 'valtio';
|
||||
|
||||
export type User = {
|
||||
id: string;
|
||||
name: string;
|
||||
roleId?: number; // 0, 1, 2, 3
|
||||
roleId: number;
|
||||
menuIds?: string[] | null; // ✅ Pastikan pakai `string[]`
|
||||
};
|
||||
|
||||
export const authStore = proxy<{
|
||||
|
||||
Reference in New Issue
Block a user