- Modified the `buildPrefixKey` function to include an optional `manualValues` parameter, allowing manual input values to be incorporated into the prefix key.
- Adjusted the sequence allocation process in `allocateCode` to extract manual values before building the prefix key, ensuring accurate prefix generation.
- Removed the fallback to the "BULK1" value in manual configurations, preventing unintended overwrites and ensuring user input is prioritized.
- Enhanced the `joinPartsWithSeparators` function to prevent consecutive separators when handling empty parts, improving the output format.
- Added a new migration script to clean up existing "BULK1" values from the database, ensuring data integrity.
These changes address several issues related to manual input handling and improve the overall functionality of the numbering rule service.
ksh-v2-work의 POP 화면 디자이너 기능을 main에 병합한다.
[병합 내용]
- pop-card-list-v2: 슬롯 기반 CSS Grid 카드 컴포넌트 (12종 셀 타입)
- pop-status-bar: 독립 상태 칩 컴포넌트 (카운트 순환 문제 해결)
- pop-scanner: 바코드/QR 스캐너 + 멀티필드 파싱
- pop-profile: 사용자 프로필/PC전환/로그아웃 컴포넌트
- pop-button: 설정 패널 UX 전면 개선 + 제어 실행 기능
- pop-search: 날짜 입력 타입 + 연결 탭 일관성 통합
- POP 모드 네비게이션: PC <-> POP 양방향 전환 + 로그인 POP 모드 토글
- 타임라인 범용화 + 상태 값 매핑 동적 배열 전환
- 다중 액션 체이닝 + 외부 테이블 선택 + 카드 클릭 모달
[충돌 해결 4건]
- authController.ts: 양쪽 통합 (스마트공장 로그 + POP 랜딩 경로)
- AppLayout.tsx: 양쪽 통합 (메뉴 드래그 + POP 모드 메뉴, 리디자인 UI + POP 모드 항목)
- ConnectionEditor.tsx: ksh-v2-work 선택 (하위 테이블 필터 구조) + CSS 변수 적용
- pop-button.tsx: ksh-v2-work 선택 (자연어 UX + 제어 실행) + CSS 변수 스타일 유지
- Refactored the handling of "in" and "not_in" operators to ensure proper array handling and prevent errors when values are not provided.
- Enhanced the InteractiveDataTable component to re-fetch data when filters are applied, improving user experience.
- Updated DataFilterConfigPanel to correctly manage filter values based on selected operators.
- Adjusted SplitPanelLayoutComponent to apply client-side data filtering based on defined conditions.
These changes aim to improve the robustness and usability of the data filtering features across the application.
- Integrated audit logging for create, update, and delete actions in the node flows API.
- Enhanced the logging service to capture relevant details such as user information, action type, resource details, and IP address.
- Updated the audit log service to include NODE_FLOW as a resource type.
- Improved the overall traceability of node flow changes within the system.
Made-with: Cursor
- Added CRUD operations for packaging units and their associated items in the new `packagingController.ts`.
- Implemented routes for managing packaging units and items in `packagingRoutes.ts`.
- Enhanced error handling and logging for better traceability.
- Ensured company code filtering for data access based on user roles.
Made-with: Cursor
- Added critical guidelines prohibiting the direct creation of user menu screens in React (.tsx) files, emphasizing that user menus must be implemented through database registration methods (screen_definitions, screen_layouts_v2, menu_info).
- Clarified that backend agents should not request or suggest the creation of frontend pages for user menus.
- Reinforced the importance of adhering to the established rendering system to prevent hardcoding UI components.
Made-with: Cursor
- Added a new utility function `sendSmartFactoryLog` to transmit user access logs to the smart factory logging service upon successful login, ensuring non-blocking behavior.
- Integrated the smart factory log transmission into the `AuthController` to log user access asynchronously.
- Introduced pattern utilities for generating location codes and names based on configurable patterns in the rack structure components, improving flexibility and maintainability.
- Enhanced the `RackStructureConfigPanel` to allow users to define custom patterns for location codes and names, with real-time previews and a list of available variables.
Made-with: Cursor
버튼 규칙 하나에 여러 액션을 순차 실행하는 다중 액션 체이닝,
DB 직접 선택으로 외부 테이블에 값을 변경하는 기능,
카드 클릭 시 조건부 모달 열기, 필터 전 데이터 비표시 옵션을 추가한다.
[다중 액션 체이닝]
- types.ts: ActionButtonDef.clickActions 배열 추가 (하위호환 유지)
- PopCardListV2Config: 액션 목록 UI (추가/삭제/순서)
- cell-renderers: __allActions 배열로 config 전달
- PopCardListV2Component: actionsToRun 순차 실행, 실패 시 스킵
[외부 테이블 선택]
- ActionButtonClickAction.joinConfig (sourceColumn, targetColumn) 추가
- ImmediateActionEditor: "DB에서 직접 선택..." 옵션 + 조인키 설정 UI
- DbTableCombobox: 테이블명(영어)+설명(한글) 검색 가능
- Component: joinConfig 기반 lookupValue/lookupColumn 처리
[카드 클릭 모달]
- types.ts: V2CardClickAction에 "modal-open", V2CardClickModalConfig 추가
- PopCardListV2Config: 동작 탭에 모달 설정 (화면 ID, 조건, 제목)
- PopCardListV2Component: handleCardSelect 조건 체크 후 openPopModal
[필터 전 데이터 비표시]
- PopCardListV2Config.hideUntilFiltered Switch
- Component: externalFilters 없을 때 안내 메시지
[버그 수정]
- availableTableOptions: dataSource.table -> dataSource.tableName 수정
- popActionRoutes: INSERT 시 created_date/updated_date/writer 자동 추가,
UPDATE 시 updated_date 자동 갱신
[액션 버튼 구조 개선]
- evaluateShowCondition: 버튼별 조건 평가 (visible/disabled/hidden)
- ActionButtonsEditor: 아코디언 UI + sessionStorage 상태 유지
- 1셀 1버튼 렌더링: 조건 맞는 버튼 1개만 표시
- Updated the `DynamicFormService` to allow retrieval of both 'component' and 'v2-button-primary' types in screen layouts, improving flexibility in component handling.
- Introduced a new variable to streamline button component identification, enhancing code readability and maintainability.
- Modified the `InteractiveScreenViewer` to pass the `screenInfo.id` when deleting form data, ensuring accurate context during deletion operations.
Made-with: Cursor
- Updated the `getCategoryValues` function to allow filtering based on a specified company code when requested by a super admin.
- Modified the service layer to ensure that super admins can retrieve common category values while preventing data mixing from different companies.
- Adjusted the frontend component to include the filter parameter in API requests, ensuring that the correct company-specific categories are displayed.
Made-with: Cursor
- Added a new `packagingRoutes.ts` file to manage packaging and loading information APIs, with authentication middleware applied.
- Enhanced the `TableListConfigPanel` and `ColumnsConfigPanel` components to include editable column locking functionality, allowing users to toggle editability with visual feedback.
- Improved user experience by providing clear indications of column editability status through lock/unlock icons.
Made-with: Cursor
- Added critical guidelines prohibiting the direct coding of user menu screens in React (.tsx) files, emphasizing the use of the low-code screen designer system.
- Outlined the correct implementation steps for user menus, including the registration of screens in the `screen_definitions` and `screen_layouts_v2` tables, and the necessity of menu registration in `menu_info`.
- Highlighted prohibited patterns to prevent hardcoding user interface components, ensuring adherence to the established rendering system.
Made-with: Cursor
- Introduced essential rules for creating database tables, emphasizing the use of `VARCHAR(500)` for all business columns and the inclusion of five mandatory columns.
- Specified the requirement for registering three metadata tables: `table_labels`, `table_type_columns`, and `column_labels`.
- Outlined prohibited practices, including the direct use of certain database types and the necessity of including the `ON CONFLICT` clause for handling duplicates.
Made-with: Cursor
- Implemented a new API endpoint for validating Excel data before upload, ensuring that required fields are not null and that unique constraints are respected.
- Added frontend integration to handle validation results, displaying errors for missing required fields and duplicates within the Excel file and against existing database records.
- Enhanced user experience by providing immediate feedback on data validity during the upload process.
Made-with: Cursor
- Cleaned up package-lock.json in both backend and frontend by removing redundant "peer" fields.
- This change helps streamline the dependency management and reduces potential confusion.
Made-with: Cursor
CSS Grid 기반 슬롯 구조의 pop-card-list-v2 컴포넌트를 추가한다.
기존 pop-card-list의 데이터 로딩/필터링/장바구니 로직을 재활용하되,
카드 내부는 12종 셀 타입(text/field/image/badge/button/number-input/
cart-button/package-summary/status-badge/timeline/action-buttons/
footer-status)의 조합으로 자유롭게 구성할 수 있다.
[신규 컴포넌트: pop-card-list-v2]
- PopCardListV2Component: 런타임 렌더링 (데이터 조회 + CSS Grid 카드)
- PopCardListV2Config: 3탭 설정 패널 (데이터/카드 디자인/동작)
- PopCardListV2Preview: 디자이너 미리보기
- cell-renderers: 셀 타입별 독립 렌더러 12종
- migrate: v1 -> v2 설정 마이그레이션 함수
- index: PopComponentRegistry 자동 등록
[타임라인 데이터 소스 범용화]
- TimelineDataSource 인터페이스로 공정 테이블/FK/컬럼/상태값 매핑 설정
- 하드코딩(work_orders+work_order_process) 제거 -> 설정 기반 동적 조회
- injectProcessFlow: 설정 기반 공정 데이터 조회 + __processFlow__ 가상 컬럼 주입
- 상태값 정규화(DB값 -> waiting/accepted/in_progress/completed)
[액션 버튼 인라인 설정]
- actionRules 내 updates 배열로 동작 정의 (별도 DB 테이블 불필요)
- execute-action API 재활용 (targetTable/column/valueType)
- 백엔드 __CURRENT_USER__/__CURRENT_TIME__ 특수값 치환
[디자이너 통합]
- PopComponentType에 "pop-card-list-v2" 추가
- ComponentEditorPanel/ComponentPalette/PopRenderer 등록
- PopDesigner loadLayout: components 존재 확인 null 체크 추가
[기타]
- .gitignore: .gradle/ 추가
- Integrated `TableManagementService` to validate unique constraints before insert, update, and upsert actions in various controllers, including `dataflowExecutionController`, `dynamicFormController`, and `tableManagementController`.
- Improved error handling in `errorHandler` to provide detailed messages indicating which field has a unique constraint violation.
- Updated the `formatPgError` utility to extract and display specific column labels for unique constraint violations, enhancing user feedback.
- Adjusted the table schema retrieval to include company-specific nullable and unique constraints, ensuring accurate representation of database rules.
These changes improve data integrity by preventing duplicate entries and enhance user experience through clearer error messages related to unique constraints.
- Integrated `formatPgError` utility to provide user-friendly error messages based on PostgreSQL error codes during form data operations.
- Updated error responses in `saveFormData`, `saveFormDataEnhanced`, `updateFormData`, and `updateFormDataPartial` to include specific messages based on the company context.
- Improved error handling in the frontend components to display relevant error messages from the server response, ensuring users receive clear feedback on save operations.
- Enhanced the required field validation by incorporating NOT NULL metadata checks across various components, improving the accuracy of form submissions.
These changes improve the overall user experience by providing clearer error messages and ensuring that required fields are properly validated based on both manual settings and database constraints.
- Modified the `getTableSchema` function in `adminController.ts` to use company-specific column labels when available, falling back to common labels if not.
- Adjusted the SQL query to join `table_type_columns` for both company-specific and common labels, ensuring the correct display order is maintained.
- Removed unnecessary component count display in the `TabsDesignEditor` to streamline the UI.
These changes enhance the accuracy of the table schema representation based on company context and improve the overall user interface by simplifying tab displays.
- Added category validation functionality to both ExcelUploadModal and MultiTableExcelUploadModal components, allowing for the detection of invalid category values in uploaded Excel data.
- Implemented state management for category validation, including tracking mismatches and user interactions for replacements.
- Updated the handleNext function to incorporate category validation checks before proceeding to the next step in the upload process.
- Enhanced user feedback with toast notifications for category replacements and validation errors.
These changes significantly improve the robustness of the Excel upload process by ensuring data integrity and providing users with clear guidance on category-related issues.
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 주석 제거 통합
- Enhanced the `createMoldSerial` function to automatically generate serial numbers based on defined numbering rules when the serial number is not provided.
- Integrated error handling for the automatic numbering process, ensuring robust logging for success and failure cases.
- Updated the `NumberingRuleService` to support reference column handling, allowing for dynamic prefix generation based on related data.
- Modified the frontend components to accommodate new reference configurations, improving user experience in managing numbering rules.
These changes significantly enhance the mold management functionality by automating serial number generation and improving the flexibility of numbering rules.
로그인 폼에 POP 모드 Switch 토글을 추가하여 현장 작업자가
로그인 시점에서 POP 화면으로 직접 진입할 수 있도록 한다.
토글 상태는 localStorage에 저장되어 다음 로그인 시 유지된다.
[백엔드]
- 로그인 응답에 popLandingPath 추가 (getPopMenuList 재사용)
- AdminService/paramMap 변수 스코프 버그 수정
(try 블록 내부 선언 -> 외부로 이동)
[프론트엔드]
- useLogin: isPopMode 상태 + localStorage 연동 + POP 분기 라우팅
- LoginForm: POP 모드 Switch 토글 UI (Monitor 아이콘)
- POP 미설정 시 에러 메시지 표시 후 로그인 중단
- LoginResponse 타입에 popLandingPath 필드 추가
- Implemented a new API endpoint to retrieve numbering rules based on table and column names, enhancing the flexibility of numbering rule management.
- Added a new service method to handle the retrieval of numbering columns specific to a company, ensuring proper company code filtering.
- Updated the frontend to load and display numbering columns, allowing users to select and manage numbering rules effectively.
- Refactored existing logic to improve the handling of numbering rules, including fallback mechanisms for legacy data.
These changes enhance the functionality and user experience in managing numbering rules within the application.
- Changed all occurrences of `table_column_category_values` to `category_values` in the backend services and controllers to standardize the terminology.
- Updated SQL queries to reflect the new table name, ensuring proper data retrieval and management.
- Adjusted comments and documentation to clarify the purpose of the `category_values` table in the context of category management.
These changes enhance code clarity and maintain consistency across the application.
- Added new API endpoints for mold management, including CRUD operations for molds, mold serials, inspections, and parts.
- Created the `moldRoutes` to handle requests related to mold management.
- Developed the `moldController` to manage the business logic for mold operations, ensuring proper company code filtering for data access.
- Integrated frontend API calls for mold management, allowing users to interact with the mold data seamlessly.
- Introduced a new component for displaying status counts, enhancing the user interface for monitoring mold statuses.
These additions improve the overall functionality and user experience in managing molds within the application.
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() 함수 추가
장바구니에서 여러 품목을 한꺼번에 입고 확정할 때 동일한 입고번호를
공유하도록 일괄 채번(shareAcrossItems) 기능을 추가하고, 입고 목록
화면에서 모달 검색 시 중복 항목을 제거하는 distinct 옵션과 선택된
필터를 해제하는 X 버튼을 구현한다.
[일괄 채번]
- pop-field 자동생성 설정에 shareAcrossItems 스위치 추가
- 백엔드 data-save / inbound-confirm: shareAcrossItems=true 매핑은
아이템 루프 전 1회만 allocateCode 호출하여 공유 코드 발급
- PopFieldComponent에서 shareAcrossItems 값을 백엔드로 전달
[모달 distinct]
- ModalSelectConfig에 distinct?: boolean 필드 추가
- 설정 패널 필터 탭 영역에 "중복 제거" 체크박스 배치
- ModalDialog fetchData에서 displayField 기준 Set 필터링
[선택 해제]
- ModalSearchInput: 값 선택 시 > 아이콘 -> X 버튼으로 전환
- X 클릭 시 modalDisplayText + 필터값 초기화 (stopPropagation)
- handleModalClear 콜백 + onModalClear prop 체인 연결
화면 디자이너(비개발자)가 버튼 작업 설정을 직관적으로 할 수 있도록
설정 패널의 용어, 레이아웃, 구조를 전면 개선한다.
[디자인 통일]
- Input/Select 높이 h-8, 라벨 text-xs font-medium, 도움말 text-[11px]로 통일
- db-conditional UI를 가로 나열에서 세로 스택으로 전환 (좁은 패널 잘림 방지)
- 작업 항목 간 간격, 패딩, 둥근 모서리 일관성 확보
[자연어 라벨]
- "대상 테이블" → "어떤 테이블을 수정할까요?"
- "변경 컬럼" → "어떤 항목(컬럼)을 바꿀까요?"
- "연산" → "어떻게 바꿀까요?" + 각 연산별 설명 도움말
- "값 출처: 고정값" → "직접 입력", "연결 데이터" → "화면 데이터에서 가져오기"
- 비교 연산자에 한글 설명 추가 (">=" → ">= (이상이면)")
[구조 개선]
- "조회 키"를 "고급 설정" 토글로 숨김 (기본 접힘, 대부분 자동 매칭)
- "연결 필드명" 수동 입력 → 카드 컴포넌트 필드 목록에서 Select 선택
- 접힌 헤더에 요약 텍스트 표시 + 마우스 호버 시 전체 툴팁
- 펼친 상태 하단에 설정 요약 미리보기
[컬럼 코멘트 표시]
- 백엔드: getTableSchema SQL에 col_description() 추가
- 프론트: ColumnCombobox에서 코멘트 표시 + 한글명 검색 지원
- ColumnInfo 인터페이스에 comment 필드 추가
- Implemented new API endpoints for multi-table Excel upload and auto-detection of table chains.
- The GET endpoint `/api/data/multi-table/auto-detect` allows automatic detection of foreign key relationships based on the provided root table.
- The POST endpoint `/api/data/multi-table/upload` handles the upload of multi-table data, including validation and logging of the upload process.
- Updated the frontend to include options for multi-table Excel upload in the button configuration panel and integrated the corresponding action handler.
This feature enhances the data management capabilities by allowing users to upload and manage data across multiple related tables efficiently.
버튼 컴포넌트의 실행 경로를 프리셋별 파편화에서 단일 작업 목록(task-list)
패턴으로 통합하고, 부분입고 시나리오 지원을 위해 data-update 연산을 확장한다.
[BLOCK M: 버튼 v2 통합 아키텍처]
- ButtonTask 타입 체계 정의 (10종 작업 타입 + UpdateOperation)
- PopButtonConfigV2 + migrateButtonConfig 자동 마이그레이션
- 설정 UI: 빠른 시작 + 외형 + 작업 목록 에디터
- executeTaskList 범용 실행 함수 (데이터 작업 일괄 백엔드 전달)
- collect_data 프로토콜에 cartChanges 포함
- 백엔드 tasks 배열 기반 처리 (data-save/update/delete/cart-save)
- useCartSync.getChanges() 추출 + 카드리스트 응답 포함
[BLOCK N: data-update 연산 확장]
- UpdateOperationType에 multiply, divide, db-conditional 추가
- ButtonTask에 db-conditional 전용 필드 5개 추가
(compareColumn, compareOperator, compareWith, dbThenValue, dbElseValue)
- 설정 UI: 드롭다운 3개 옵션 + DB 컬럼 비교 설정 폼
- 백엔드 SQL: multiply, divide(0-division 방어),
db-conditional(CASE WHEN 배치 UPDATE)
- 기존 add/subtract에 ::numeric 캐스팅 일관 적용