Commit Graph

59 Commits

Author SHA1 Message Date
kjs 2b4b7819c5 feat: Add Numbering Rule APIs and Frontend Integration
- 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.
2026-03-09 14:10:08 +09:00
kjs 96637a9cb6 feat: Enhance audit logging with client IP tracking
- Integrated client IP address retrieval in the audit logging functionality across multiple controllers, including admin, common code, department, flow, screen, and table management.
- Updated the `auditLogService` to include a new method for obtaining the client's IP address, ensuring accurate logging of user actions.
- This enhancement improves traceability and accountability by capturing the source of requests, thereby strengthening the overall logging mechanism within the application.
2026-03-04 15:02:27 +09:00
kjs b4d5367e2b feat: Integrate audit logging for various operations
- Added audit logging functionality across multiple controllers, including menu, user, department, flow, screen, and table management.
- Implemented logging for create, update, and delete actions, capturing relevant details such as company code, user information, and changes made.
- Enhanced the category tree service with a new endpoint to check if category values are in use, improving data integrity checks.
- Updated routes to include new functionalities and ensure proper logging for batch operations and individual record changes.
- This integration improves traceability and accountability for data modifications within the application.
2026-03-04 13:49:08 +09:00
kjs eb27f01616 feat: Enhance category column handling and data mapping
- Updated the `getCategoryColumnsByCompany` and `getCategoryColumnsByMenu` functions to exclude reference columns from category column queries, improving data integrity.
- Modified the `TableManagementService` to include `category_ref` in the column management logic, ensuring proper handling of category references during data operations.
- Enhanced the frontend components to support category reference mapping, allowing for better data representation and user interaction.
- Implemented category label conversion in various components to improve the display of category data, ensuring a seamless user experience.
2026-02-26 11:31:49 +09:00
kjs abb31a39bb feat: Add image thumbnail rendering in SplitPanelLayoutComponent
- Introduced SplitPanelCellImage component to handle image rendering for table cells, supporting both object IDs and file paths.
- Enhanced formatCellValue function to display image thumbnails for columns with input type "image".
- Updated column input types loading logic to accommodate special rendering for images in the right panel.
- Improved error handling for image loading failures, ensuring a better user experience when images cannot be displayed.
2026-02-25 15:28:50 +09:00
kjs 262221e300 fix: Refine ExcelUploadModal and TableListComponent for improved data handling
- Updated ExcelUploadModal to automatically generate numbering codes when Excel values are empty, enhancing user experience during data uploads.
- Modified TableListComponent to display only the first image in case of multiple images, ensuring clarity in image representation.
- Improved data handling logic in TableListComponent to prevent unnecessary processing of string values.
2026-02-25 14:42:42 +09:00
DDD1542 ed9e36c213 feat: Enhance table data addition with inserted ID response
- Updated the `addTableData` method in `TableManagementService` to return the inserted ID after adding data to the table.
- Modified the `addTableData` controller to log the inserted ID and include it in the API response, improving client-side data handling.
- Enhanced the `BomTreeComponent` to support additional configurations and improve data loading logic.
- Updated the `ButtonActionExecutor` to handle deferred saves with level-based grouping, ensuring proper ID mapping during master-detail saves.
2026-02-25 13:59:51 +09:00
kjs 3ca511924e feat: Implement company-specific NOT NULL constraint validation for table data
- Added validation for NOT NULL constraints in the add and edit table data functions, ensuring that required fields are not empty based on company-specific settings.
- Enhanced the toggleColumnNullable function to check for existing NULL values before changing the NOT NULL status, providing appropriate error messages.
- Introduced a new service method to validate NOT NULL constraints against company-specific configurations, improving data integrity in a multi-tenancy environment.
2026-02-24 18:40:36 +09:00
kjs e065835c4d feat: Add PK and index management APIs for table management
- Implemented new API endpoints for managing primary keys and indexes in the table management system.
- Added functionality to retrieve table constraints, set primary keys, toggle indexes, and manage NOT NULL constraints.
- Enhanced the frontend to support PK and index management, including loading constraints and handling user interactions for toggling indexes and setting primary keys.
- Improved error handling and logging for better debugging and user feedback during these operations.
2026-02-11 16:07:44 +09:00
kjs 21a663a99b feat: 테이블 참조 관계 조회 로직 개선 및 로깅 강화
- getReferencedByTables 함수에서 현재 사용자의 company_code를 우선적으로 사용하도록 로직을 개선하였습니다.
- SQL 쿼리에서 ROW_NUMBER를 활용하여 같은 테이블/컬럼 조합에서 회사코드 우선순위로 하나만 선택하도록 하였습니다.
- 로깅 메시지에 회사코드를 포함시켜, 조회 시 어떤 회사의 데이터가 사용되었는지 명확히 기록하도록 하였습니다.
2026-02-05 10:58:27 +09:00
DDD1542 8c96b2d185 Merge branch 'feature/v2-unified-renewal' of http://39.117.244.52:3000/kjs/ERP-node into feature/v2-renewal
; Please enter a commit message to explain why this merge is necessary,
; especially if it merges an updated upstream into a topic branch.
;
; Lines starting with ';' will be ignored, and an empty message aborts
; the commit.
2026-02-02 12:14:03 +09:00
DDD1542 50ee165c37 feat: 입력 타입 처리 개선 및 변환 로직 추가
- 입력 타입이 "direct" 또는 "auto"일 경우, 이를 "text"로 변환하는 로직을 추가하여 데이터베이스에 잘못된 값이 저장되지 않도록 하였습니다.
- 관련된 경고 로그를 추가하여 잘못된 입력 타입 감지를 강화하였습니다.
- 웹 타입 변환 시에도 동일한 로직을 적용하여 일관성을 유지하였습니다.
- 프론트엔드에서 입력 타입 변경 시 로컬 상태만 업데이트하도록 수정하여 데이터베이스에 저장하지 않도록 하였습니다.
2026-02-02 12:07:37 +09:00
kjs 4447911892 feat: 메인 테이블 데이터 자동 로드 및 autoFill 기능 개선
- 메인 테이블에서 사용자 회사 코드로 데이터를 자동으로 로드하여 폼에 채우는 기능을 추가하였습니다.
- displayColumn 파라미터를 선택적으로 변경하여, 누락 시 전체 레코드를 반환하도록 수정하였습니다.
- 엔티티 조인 테이블에 고유 접두사를 추가하여 메인 테이블과의 키 중복을 방지하였습니다.
- autoFill 설정을 복원하고 저장하는 기능을 추가하여 자동 입력 기능을 강화하였습니다.
2026-02-02 12:01:39 +09:00
DDD1542 192b678bce fix: 화면 복제 기능 개선 및 관련 버그 수정
- 화면 복제 기능을 개선하여 DB 구조 개편 후의 효율적인 화면 관리를 지원합니다.
- 그룹 복제 시 버튼의 `targetScreenId`가 새 화면으로 매핑되지 않는 버그를 수정하였습니다.
- 관련된 서비스 및 쿼리에서 `table_type_columns`를 사용하여 라벨 정보를 조회하도록 변경하였습니다.
- 여러 컨트롤러 및 서비스에서 `column_labels` 대신 `table_type_columns`를 참조하도록 업데이트하였습니다.
2026-01-28 11:24:25 +09:00
kjs 1753822211 feat: 테스트 테이블에서 채번 규칙 목록 조회 API 추가 및 회사별 카테고리 컬럼 조회 기능 구현
- 테스트 테이블에서 채번 규칙 목록을 조회하는 API를 추가하였습니다. 이 API는 회사 코드와 선택적 메뉴 OBJID를 기반으로 규칙을 반환합니다.
- 회사별 카테고리 컬럼을 조회하는 API를 추가하여, 회사 코드에 따라 카테고리 컬럼을 필터링하여 반환하도록 개선하였습니다.
- 관련된 서비스 및 라우터를 업데이트하여 새로운 기능을 통합하였습니다.
2026-01-26 16:32:20 +09:00
kjs ee1ea4190d Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/v2-unified-renewal 2026-01-16 11:10:41 +09:00
DDD1542 efa95af4b9 refactor: 코드 정리 및 불필요한 주석 제거
- EntityJoinController에서 중복 제거 설정 관련 주석 및 코드 삭제
- screenGroupController와 tableManagementController에서 AuthenticatedRequest 타입을 일반 Request로 변경
- 불필요한 로그 및 주석 제거로 코드 가독성 향상
- tableManagementController에서 에러 메시지 개선
2026-01-15 17:36:38 +09:00
kjs e168753d87 리피터 케이블 설정 구현 2026-01-15 15:17:52 +09:00
kjs 45f0c667c2 Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/v2-unified-renewal 2026-01-15 09:22:31 +09:00
kjs 18b5161398 Merge branch 'feature/v2-renewal' of http://39.117.244.52:3000/kjs/ERP-node into feat/multilang 2026-01-13 18:32:04 +09:00
DDD1542 905a9f62c3 feat: 프리뷰 모드에서 회사 코드 오버라이드 기능 추가
- 최고 관리자만 다른 회사 코드로 오버라이드 가능하도록 로직 개선
- entityJoinController 및 tableManagementController에서 회사 코드 오버라이드 처리 추가
- 관련 API 호출 시 오버라이드된 회사 코드 적용
- 프리뷰 모드 감지 및 UI 개선을 위한 코드 추가
2026-01-13 13:28:50 +09:00
kjs 4dfa82d3dd 분할패널 설정변경 2026-01-08 15:56:06 +09:00
SeongHyun Kim 25b7e637de feat: 테이블 데이터 저장 시 존재하지 않는 컬럼 자동 필터링
- tableManagementService.addTableData: 테이블 스키마 기반 컬럼 필터링 로직 추가
- 무시된 컬럼 정보를 API 응답에 포함 (skippedColumns, savedColumns)
- 프론트엔드 콘솔에 무시된 컬럼 경고 출력
- conditional-container의 UI 제어용 필드(condition) 등으로 인한 저장 에러 방지
2026-01-06 15:29:26 +09:00
kjs eb61506acd 분할패널 수정동작 수정 2026-01-06 13:43:47 +09:00
kjs 42d75e1aaf Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/unified-components-renewal 2025-12-31 15:11:25 +09:00
SeongHyun Kim 47b23d1aa3 feat(universal-form-modal): 조건부 테이블, 동적 Select 옵션, 서브 테이블 수정 로드 기능 구현
조건부 테이블: 체크박스/탭으로 조건 선택 시 다른 테이블 데이터 관리
동적 Select 옵션: 소스 테이블에서 드롭다운 옵션 동적 로드
행 선택 모드: Select 값 변경 시 같은 소스 행의 연관 컬럼 자동 채움
수정 모드 서브 테이블 로드: loadOnEdit 옵션으로 반복 섹션 데이터 자동 로드
SplitPanelLayout2 메인 테이블 병합: 서브 테이블 수정 시 메인 데이터 함께 조회
연결 필드 그룹 표시 형식: subDisplayColumn 추가로 메인/서브 컬럼 분리 설정
UX 개선: 컬럼 선택 UI를 검색 가능한 Combobox로 전환
saveMainAsFirst 로직 개선: items 없어도 메인 데이터 저장 가능
2025-12-28 19:32:13 +09:00
kjs 91d00aa784 컴포넌트 리뉴얼 1.0 2025-12-19 15:44:38 +09:00
SeongHyun Kim 8687c88f70 Merge remote-tracking branch 'origin/main' into ksh 2025-12-17 17:07:06 +09:00
kjs ae38e0f249 엔티티 타입 에러수정 및 배지 색상없음 오류 수정 2025-12-17 16:38:12 +09:00
SeongHyun Kim ccbbf46faf feat(universal-form-modal): 옵셔널 필드 그룹 및 카테고리 Select 옵션 기능 추가
- 옵셔널 필드 그룹: 섹션 내 선택적 필드 그룹 지원 (추가/제거, 연동 필드 자동 변경)
- 카테고리 Select: table_column_category_values 테이블 값을 Select 옵션으로 사용
- 전체 카테고리 컬럼 조회 API: GET /api/table-categories/all-columns
- RepeaterFieldGroup 저장 시 공통 필드 자동 병합
2025-12-17 14:30:29 +09:00
SeongHyun Kim 512e1e30d1 feat(repeat-screen-modal): 연동 저장, 자동 채번, SUM_EXT 참조 제한 기능 추가
- SyncSaveConfig: 모달 저장 시 다른 테이블에 집계 값 동기화 기능
- RowNumberingConfig: 행 추가 시 채번 규칙 적용하여 자동 번호 생성
- externalTableRefs: SUM_EXT 함수가 참조할 외부 테이블 제한 기능
- triggerRepeatScreenModalSave: 외부에서 저장 트리거 가능한 이벤트 리스너
- TableColumnConfig.hidden: 테이블 컬럼 숨김 기능 (데이터는 유지, 화면만 숨김)
- beforeFormSave: FK 자동 채우기 및 _isNew 행 포함 로직 개선
2025-12-11 09:24:47 +09:00
SeongHyun Kim d908de7f66 fix(numbering-rule): 채번규칙 저장 시 allocateNumberingCode로 실제 순번 할당
- generateNumberingCode를 allocateNumberingCode로 변경 (순번 실제 증가)

- saveSingleRow/saveMultipleRows/saveWithMultiTable 모두 적용

- NumberingRuleCard: 파트 타입 변경 시 defaultAutoConfig 적용

- NumberingRuleDesigner: 저장 시 partsWithDefaults로 기본값 병합

- sequenceLength/numberLength 기본값 4에서 3으로 변경

- 불필요한 console.log 제거
2025-12-08 19:10:07 +09:00
SeongHyun Kim b15b6e21ea fix(UniversalFormModal): 반복 섹션 linkedFieldGroup 매핑 및 서브 테이블 저장 로직 개선
- renderFieldWithColumns()에 repeatContext 파라미터 추가

- linkedFieldGroup 선택 시 repeatContext 유무에 따라 formData/repeatSections 분기 저장

- multiTableSave: UPSERT 대신 SELECT-UPDATE/INSERT 명시적 분기로 변경

- ON CONFLICT 조건 불일치 에러 방지

- 서브 테이블 저장 상세 로그 추가
2025-12-08 18:23:28 +09:00
SeongHyun Kim a278ceca3f feat(universal-form-modal): 범용 다중 테이블 저장 기능 추가 2025-12-08 17:54:11 +09:00
SeongHyun Kim 4787a8b177 feat(repeat-screen-modal): 테이블 영역 독립 저장 기능 구현
- TableCrudConfig에 allowSave, saveButtonLabel 속성 추가
- CRUD 설정 패널에 저장 스위치 추가
- saveTableAreaData 함수: editable 컬럼 + 조인키만 필터링하여 저장
- 날짜 필드 ISO 8601 -> YYYY-MM-DD 형식 변환
- 백엔드: company_code 자동 주입 로직 추가
- tableManagementService에 hasColumn 메서드 추가
2025-12-02 14:02:47 +09:00
kjs e1a5befdf7 feat: 기간별 단가 설정 기능 구현 - 자동 계산 시스템
- 선택항목 상세입력 컴포넌트 확장
  - 실시간 가격 계산 기능 추가 (할인율/할인금액, 반올림 방식)
  - 카테고리 값 기반 연산 매핑 시스템
  - 3단계 드릴다운 방식 설정 UI (메뉴 → 카테고리 → 값 매핑)

- 설정 가능한 계산 로직
  - autoCalculation 설정으로 계산 필드명 동적 지정
  - valueMapping으로 카테고리 코드와 연산 타입 매핑
  - 할인 방식: none/rate/amount
  - 반올림 방식: none/round/floor/ceil
  - 반올림 단위: 1/10/100/1000

- UI 개선
  - 입력 필드 가로 배치 (반응형 Grid)
  - 카테고리 타입 필드 옵션 로딩 개선
  - 계산 결과 필드 자동 표시 및 읽기 전용 처리
  - 날짜 입력 필드 네이티브 피커 지원

- API 연동
  - 2레벨 메뉴 목록 조회
  - 메뉴별 카테고리 컬럼 조회
  - 카테고리별 값 목록 조회

- 문서화
  - 기간별 단가 설정 가이드 작성
2025-11-18 16:12:47 +09:00
kjs 296ee3e825 테이블 데이터 필터링 기능 및 textarea컴포넌트 자동 매핑 삭제 2025-11-13 17:06:41 +09:00
kjs 36bff64145 feat: 카테고리 컬럼 메뉴별 매핑 기능 구현
- category_column_mapping 테이블 생성 (마이그레이션 054)
- 테이블 타입 관리에서 2레벨 메뉴 선택 기능 추가
- 카테고리 컬럼 조회 시 현재 메뉴 및 상위 메뉴 매핑 자동 조회
- 캐시 무효화 로직 개선
- 메뉴별 카테고리 설정 저장 및 불러오기 기능 구현
2025-11-13 14:41:24 +09:00
kjs e723523ec5 fix: TypeScript 빌드 에러 수정
- tableManagementService: getTableDataWithEntityJoins options에 companyCode 타입 추가
- tableManagementController: Promise<void> 함수의 return 문 수정
- commonCodeService: CodeInfo 인터페이스에 menu_objid 필드 추가
- numberingRuleService: siblingObjids 변수 스코프 수정 (catch 블록 접근 가능하도록)
2025-11-12 15:18:32 +09:00
kjs 6ebe551caa feat: 카테고리 컴포넌트 메뉴 스코프 전환 완료
- 형제 메뉴의 카테고리 컬럼 조회 API 구현
- column_labels 테이블에서 컬럼 라벨 조회
- table_labels 테이블에서 테이블 라벨 조회
- 프론트엔드: 테이블명 대신 테이블 라벨 표시
- 카테고리 값 조회/추가 시 menuObjid 전달
2025-11-11 15:00:03 +09:00
kjs abdb6b17f8 debug: 카테고리 컬럼 조회 상세 로깅 추가
- 테이블 조회 완료 후 count 추가
- 카테고리 컬럼 쿼리 실행 전/후 로깅
- 에러 발생 시 전체 스택 트레이스 출력
2025-11-11 14:48:42 +09:00
kjs e7ecd0a863 fix: screen_menu_assignments를 통해 메뉴별 테이블 조회
 문제:
- screen_definitions 테이블에 menu_objid 컬럼이 없음
- SQL 쿼리 실행 실패 (500 에러)

 수정:
- screen_menu_assignments와 screen_definitions를 JOIN하여 조회
- menu_objid → screen_id → table_name 경로로 데이터 조회

🎯 쿼리 구조:
SELECT DISTINCT sd.table_name
FROM screen_menu_assignments sma
INNER JOIN screen_definitions sd ON sma.screen_id = sd.screen_id
WHERE sma.menu_objid = ANY($1)
  AND sma.company_code = $2
  AND sd.table_name IS NOT NULL
2025-11-11 14:47:25 +09:00
kjs 23911d3dd8 feat: 카테고리 컴포넌트 메뉴 스코프 전환 완료
 구현 내용:
1. 백엔드 API 추가
   - GET /api/table-management/menu/:menuObjid/category-columns
   - 형제 메뉴들의 테이블에서 카테고리 타입 컬럼 조회
   - menuService.getSiblingMenuObjids() 재사용

2. 프론트엔드 CategoryWidget 수정
   - menuObjid를 props로 받아 CategoryColumnList에 전달
   - effectiveMenuObjid로 props.menuObjid도 처리
   - 선택된 컬럼에 tableName 포함하여 상태 관리

3. CategoryColumnList 수정
   - menuObjid 기반으로 형제 메뉴의 모든 카테고리 컬럼 조회
   - 테이블명+컬럼명 함께 표시
   - onColumnSelect에 tableName 전달

4. 메뉴 네비게이션 수정
   - AppLayout.tsx: 화면 이동 시 menuObjid를 URL 쿼리 파라미터로 전달
   - useMenu.ts: 동일하게 menuObjid 전달
   - page.tsx: 자식 컴포넌트에도 menuObjid 전달

🎯 효과:
- 이제 형제 메뉴들이 서로 다른 테이블을 사용해도 카테고리 공유 가능
- 메뉴 클릭 → 화면 이동 시 자동으로 menuObjid 전달
- 카테고리 위젯이 형제 메뉴의 모든 카테고리 컬럼 표시
2025-11-11 14:44:22 +09:00
kjs 4294fbf608 feat: 채번 규칙 테이블 기반 자동 필터링 구현
- 채번 규칙 scope_type을 table로 단순화
- 화면의 테이블명을 자동으로 감지하여 채번 규칙 필터링
- TextInputConfigPanel에 screenTableName prop 추가
- getAvailableNumberingRulesForScreen API로 테이블 기반 조회
- NumberingRuleDesigner에서 자동으로 테이블명 설정
- webTypeConfigConverter 유틸리티 추가 (기존 화면 호환성)
- AutoGenerationConfig 타입 개선 (enabled, options.numberingRuleId)
- 채번 규칙 선택 UI에서 ID 제거, 설명 추가
- 불필요한 console.log 제거

Backend:
- numberingRuleService: 테이블 기반 필터링 로직 구현
- numberingRuleController: available-for-screen 엔드포인트 수정

Frontend:
- TextInputConfigPanel: 테이블명 기반 채번 규칙 로드
- NumberingRuleDesigner: 적용 범위 UI 제거, 테이블명 자동 설정
- ScreenDesigner: webTypeConfig → autoGeneration 변환 로직 통합
- DetailSettingsPanel: autoGeneration 속성 매핑 개선
2025-11-07 14:27:07 +09:00
kjs f2500865a6 격자 저장문제 수정 2025-11-06 17:01:13 +09:00
dohyeons 39080dff59 autofill 기능 구현 2025-11-04 14:33:39 +09:00
dohyeons 74d287daa9 테이블 변경 이력 로그 시스템 구현 2025-10-21 15:08:41 +09:00
kjs e653effac0 테이블 추가기능 수정사항 2025-09-23 10:40:21 +09:00
kjs 4b28530fec 타입 관리 개선 및 화면 비율조정 중간커밋 2025-09-19 18:43:55 +09:00
hyeonsu a8fc5cbd92 라벨이 없을 경우 오류 해결 2025-09-19 11:00:47 +09:00