ksh-function-stabilization의 9개 커밋을 ksh-v2-work에 병합한다.
[병합 내용]
- BLOCK O: pop-search 연결 탭 일관성 통합
- BLOCK P: 날짜 입력 타입 구현 + 셀 반응형 레이아웃
- pop-button 설정 패널 UX/UI 전면 개선
- 일괄 채번 + 모달 distinct + 선택 해제
- pop-scanner 바코드/QR 스캐너 컴포넌트
- pop-button 제어 실행 + 연결 데이터 UX
- BLOCK R: PC <-> POP 네비게이션 + Landing
- pop-profile 컴포넌트 (10번째 POP 컴포넌트)
- BLOCK S: 로그인 POP 모드 토글
[충돌 해결 3건 - 모두 양쪽 통합]
- UserDropdown.tsx: HEAD 결재함 + source POP 모드 메뉴 통합
- AppLayout.tsx: HEAD 결재함 + source POP 모드 메뉴 (모바일+사이드바 2곳)
- MenuFormModal.tsx: HEAD menuIcon 필드 + source 주석 제거 통합
PC 모드에서 프로필 드롭다운을 통해 POP 화면으로 진입하고, POP에서 PC로
돌아오는 양방향 네비게이션을 구현한다. 기존 메뉴 시스템(menu_info)을 활용하여
POP 화면의 권한 제어와 회사별 관리가 가능하도록 한다.
[백엔드: POP 메뉴 조회 API]
- AdminService.getPopMenuList: L1 POP 메뉴(menu_desc [POP] 또는
menu_name_kor POP 포함) 하위의 active L2 메뉴 조회
- company_code 필터링 적용 (L1 + L2 모두)
- landingMenu 반환: menu_desc에 [POP_LANDING] 태그가 있는 메뉴
- GET /admin/pop-menus 라우트 추가
[프론트: PC -> POP 진입]
- AppLayout: handlePopModeClick 함수 추가
- landingMenu 있으면 해당 URL로 바로 이동
- 없으면 childMenus 수에 따라 단일 화면/대시보드/안내 분기
- UserDropdown: onPopModeClick prop + "POP 모드" 메뉴 항목 추가
- 사이드바 하단 + 모바일 헤더 프로필 드롭다운 2곳 모두 적용
[프론트: POP -> PC 복귀]
- DashboardHeader: "PC 모드" 버튼 추가 (router.push "/")
- POP 개별 화면 page.tsx: 상단 네비게이션 바 추가
(POP 대시보드 / PC 모드 버튼)
[프론트: POP 대시보드 동적 메뉴]
- PopDashboard: 하드코딩 MENU_ITEMS -> menuApi.getPopMenus() API 조회
- API 실패 시 하드코딩 fallback 유지
[프론트: POP 기본 화면 설정 (MenuFormModal)]
- L2 POP 화면 수정 시 "POP 기본 화면으로 설정" 체크박스 추가
- 체크 시 menu_desc에 [POP_LANDING] 태그 자동 추가/제거
- 회사당 1개만 설정 가능 (다른 메뉴에 이미 설정 시 비활성화)
[API 타입]
- PopMenuItem, PopMenuResponse(landingMenu 포함) 인터페이스 추가
- menuApi.getPopMenus() 함수 추가
- Enhanced the menu management functionality by adding a new `menu_icon` field in the database schema, allowing for the storage of menu icons.
- Updated the `saveMenu` and `updateMenu` functions in the admin controller to handle the new `menu_icon` field during menu creation and updates.
- Modified the `AdminService` to include `MENU_ICON` in various queries, ensuring that the icon data is retrieved and processed correctly.
- Integrated the `MenuIconPicker` component in the frontend to allow users to select and display menu icons in the `MenuFormModal`.
- Updated the sidebar and layout components to utilize the new icon data, enhancing the visual representation of menus across the application.
- Integrated express-async-errors to automatically handle errors in async route handlers, enhancing the overall error management in the application.
- Updated app.ts to include the express-async-errors import for global error handling.
- Removed redundant logging statements in admin and user menu retrieval functions to streamline the code and improve readability.
- Adjusted logging levels from info to debug for less critical logs, ensuring that important information is logged appropriately without cluttering the logs.
- 외부 커넥션 관리 테이블 표준화 (DB 연결, REST API 연결)
- 모든 관리자 테이블의 그림자 제거 (테이블 타입 관리 왼쪽 카드 제외)
- 테이블 타입 관리 왼쪽 카드 호버 효과 강화 (shadow-lg, bg-muted/20)
- 탭 컴포넌트 배경색 밝게 조정 (bg-muted/30)
- 탭 트리거 테두리 제거
현재 상황 분석 및 문서화:
컨트롤러 레이어:
- ✅ adminController.ts (28개) 완료
- ✅ screenFileController.ts (2개) 완료
- 🔄 남은 파일 (12개 호출):
* webTypeStandardController.ts (11개)
* fileController.ts (1개)
Routes & Services:
- ddlRoutes.ts (2개)
- companyManagementRoutes.ts (2개)
- multiConnectionQueryService.ts (4개)
Config:
- database.ts (4개 - 제거 예정)
새로운 계획서:
- PHASE4_REMAINING_PRISMA_CALLS.md (상세 전환 계획)
- 파일별 Prisma 호출 상세 분석
- 전환 패턴 및 우선순위 정리
전체 진행률: 445/444 (100.2%)
남은 작업: 12개 (추가 조사 필요한 파일 제외)
4개 서비스 18개 Prisma 호출 전환 완료:
1. **EnhancedDynamicFormService** (6개)
- validateTableExists - information_schema 조회
- getTableColumns - 테이블 컬럼 정보 조회 with 캐싱
- getColumnWebTypes - 웹타입 정보 조회
- getPrimaryKeys - Primary Key 조회
- performInsert - 동적 INSERT with RETURNING
- performUpdate - 동적 UPDATE with RETURNING
2. **DataMappingService** (5개)
- getSourceData - 소스 테이블 데이터 조회
- executeInsert - 동적 INSERT
- executeUpsert - ON CONFLICT DO UPDATE
- executeUpdate - 동적 UPDATE
- disconnect - 제거 (Raw Query 불필요)
3. **DataService** (4개)
- getTableData - 동적 SELECT with 동적 WHERE/ORDER BY
- checkTableExists - information_schema 테이블 존재 확인
- getTableColumnsSimple - 컬럼 정보 조회
- getColumnLabel - 컬럼 라벨 조회
4. **AdminService** (3개)
- getAdminMenuList - WITH RECURSIVE 쿼리
- getUserMenuList - WITH RECURSIVE 쿼리
- getMenuInfo - LEFT JOIN으로 회사 정보 포함
기술적 성과:
- 변수명 충돌 해결 (query vs sql)
- WITH RECURSIVE 쿼리 전환
- Prisma include → LEFT JOIN 전환
- 동적 쿼리 생성 (WHERE, ORDER BY)
- SQL 인젝션 방지 (컬럼명 검증)
진행률: Phase 3 173/186 (93.0%)
문서: PHASE3.16_DATA_MANAGEMENT_SERVICES_MIGRATION.md