feat(scheduling): restrict scheduling module to allowed users only

Only userId 1105261382487539712 and 1116631120763437056 can see the
scheduling tab. Other users see only assets + mileage modules.

- Add userId to frontend AuthState.user type
- App.tsx conditionally includes scheduling module based on user ID
- Backend already returns userId in auth exchange response

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-04-16 21:47:57 +08:00
parent 25199b507c
commit 8598aea445
2 changed files with 21 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ import { createContext, useContext } from 'react';
export interface AuthState {
isLoading: boolean;
isAuthenticated: boolean;
user: { userName: string; permissionLevel: string; depName: string } | null;
user: { userId: string; userName: string; permissionLevel: string; depName: string } | null;
error: string | null;
}