48e9ece4f7
로그인 폼에 POP 모드 Switch 토글을 추가하여 현장 작업자가 로그인 시점에서 POP 화면으로 직접 진입할 수 있도록 한다. 토글 상태는 localStorage에 저장되어 다음 로그인 시 유지된다. [백엔드] - 로그인 응답에 popLandingPath 추가 (getPopMenuList 재사용) - AdminService/paramMap 변수 스코프 버그 수정 (try 블록 내부 선언 -> 외부로 이동) [프론트엔드] - useLogin: isPopMode 상태 + localStorage 연동 + POP 분기 라우팅 - LoginForm: POP 모드 Switch 토글 UI (Monitor 아이콘) - POP 미설정 시 에러 메시지 표시 후 로그인 중단 - LoginResponse 타입에 popLandingPath 필드 추가
26 lines
415 B
TypeScript
26 lines
415 B
TypeScript
/**
|
|
* 인증 관련 타입 정의
|
|
*/
|
|
|
|
export interface LoginFormData {
|
|
userId: string;
|
|
password: string;
|
|
}
|
|
|
|
export interface LoginResponse {
|
|
success: boolean;
|
|
message?: string;
|
|
data?: {
|
|
token?: string;
|
|
userInfo?: any;
|
|
firstMenuPath?: string | null;
|
|
popLandingPath?: string | null;
|
|
};
|
|
errorCode?: string;
|
|
}
|
|
|
|
export interface AuthStatus {
|
|
isLoggedIn: boolean;
|
|
isAdmin?: boolean;
|
|
}
|