- src/modules/ 모듈 시스템 (types, registry, tenant-config) - useModules() 훅: 테넌트 industry 기반 모듈 활성화 판단 - ModuleGuard: 비허용 모듈 라우트 접근 차단 (클라이언트 사이드) - (protected)/layout.tsx에 ModuleGuard 적용 - industry 미설정 테넌트는 가드 비활성 (하위 호환) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
701 B
TypeScript
27 lines
701 B
TypeScript
/**
|
|
* 모듈 시스템 타입 정의
|
|
*
|
|
* Phase 1: 프론트 하드코딩 industry 매핑
|
|
* Phase 2: 백엔드 API에서 모듈 목록 수신
|
|
* Phase 3: JSON 스키마 기반 동적 페이지 조립
|
|
*/
|
|
|
|
/** 모듈 식별자 */
|
|
export type ModuleId =
|
|
| 'common'
|
|
| 'production'
|
|
| 'quality'
|
|
| 'construction'
|
|
| 'vehicle-management';
|
|
|
|
/** 모듈 매니페스트 — 각 모듈의 메타데이터 */
|
|
export interface ModuleManifest {
|
|
id: ModuleId;
|
|
name: string;
|
|
description: string;
|
|
/** 이 모듈이 소유하는 라우트 접두사 (예: ['/production']) */
|
|
routePrefixes: string[];
|
|
/** 이 모듈이 대시보드에 기여하는 섹션 키 */
|
|
dashboardSections?: string[];
|
|
}
|