Commit Graph

62 Commits

Author SHA1 Message Date
kjs 28ef7e1226 fix: Enhance error handling and validation messages in form data operations
- 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.
2026-03-10 14:47:05 +09:00
kjs f6a02b5182 refactor: Update references from table_column_category_values to category_values
- 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.
2026-03-09 13:46:38 +09:00
kjs ac2da7a1d7 feat: Implement entity join functionality in V2Repeater and configuration panel
- Added support for entity joins in the V2Repeater component, allowing for automatic resolution of foreign key references to display data from related tables.
- Introduced a new `resolveEntityJoins` function to handle the fetching and mapping of reference data based on configured entity joins.
- Enhanced the V2RepeaterConfigPanel to manage entity join configurations, including loading available columns and toggling join settings.
- Updated the data handling logic to incorporate mapping rules for incoming data, ensuring that only necessary fields are retained during processing.
- Improved user experience by providing clear logging and feedback during entity join resolution and data mapping operations.
2026-03-04 21:08:45 +09:00
kjs e16d76936b feat: Enhance V2Repeater and configuration panel with source detail auto-fetching
- Added support for automatic fetching of detail rows from the master data in the V2Repeater component, improving data management.
- Introduced a new configuration option in the V2RepeaterConfigPanel to enable source detail auto-fetching, allowing users to specify detail table and foreign key settings.
- Enhanced the V2Repeater component to handle entity joins for loading data, optimizing data retrieval processes.
- Updated the V2RepeaterProps and V2RepeaterConfig interfaces to include new properties for grouped data and source detail configuration, ensuring type safety and clarity in component usage.
- Improved logging for data loading processes to provide better insights during development and debugging.
2026-02-28 14:33:18 +09:00
kjs 17d4cc297c feat: Introduce new date picker components for enhanced date selection
- Added `FormDatePicker` and `InlineCellDatePicker` components to provide flexible date selection options.
- Implemented a modernized date picker interface with calendar navigation, year selection, and time input capabilities.
- Enhanced `DateWidget` to support both date and datetime formats, improving user experience in date handling.
- Updated `CategoryColumnList` to group columns dynamically and manage expanded states for better organization.
- Improved `AlertDialog` z-index for better visibility in modal interactions.
- Refactored `ScreenModal` to ensure consistent modal behavior across the application.
2026-02-26 17:32:20 +09:00
kjs 38dda2f807 fix: Improve TableListComponent and UniversalFormModalComponent for better data handling
- Updated TableListComponent to use flex-nowrap and overflow-hidden for better badge rendering.
- Enhanced UniversalFormModalComponent to maintain the latest formData using a ref, preventing stale closures during form save events.
- Improved data merging logic in UniversalFormModalComponent to ensure accurate updates and maintain original data integrity.
- Refactored buttonActions to streamline table section data collection and merging, ensuring proper handling of modified and original data during save operations.
2026-02-25 13:53:20 +09:00
kjs e31bb970a2 refactor: 코드 정리 및 가독성 향상
- numberingRuleController.ts에서 API 엔드포인트의 코드 스타일을 일관되게 정리하여 가독성을 높였습니다.
- 불필요한 줄바꿈을 제거하고, 코드 블록을 명확하게 정리하여 유지보수성을 개선했습니다.
- tableManagementService.ts와 ButtonConfigPanel.tsx에서 코드 정리를 통해 일관성을 유지하고, 가독성을 향상시켰습니다.
- 전반적으로 코드의 깔끔함을 유지하고, 향후 개발 시 이해하기 쉽게 개선했습니다.
2026-02-05 17:38:06 +09:00
kjs 52fd370460 feat: 수동 입력 코드 처리 개선 및 사용자 입력 코드 전달 기능 추가
- allocateCode 함수에 사용자가 편집한 최종 코드를 전달하여 수동 입력 부분을 추출할 수 있도록 수정하였습니다.
- 여러 컴포넌트에서 사용자 입력 값을 처리할 수 있는 이벤트 리스너를 추가하여, 채번 생성 시 수동 입력 값을 반영하도록 개선하였습니다.
- V2Input 및 관련 컴포넌트에서 formData에 수동 입력 값을 주입하는 로직을 추가하여 사용자 경험을 향상시켰습니다.
- 코드 할당 요청 시 사용자 입력 코드와 폼 데이터를 함께 전달하여, 보다 유연한 코드 할당이 가능하도록 하였습니다.
2026-02-04 14:12:24 +09:00
leeheejin ba5ee357ca Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into lhj
; Conflicts:
;	frontend/lib/utils/buttonActions.ts
2026-01-22 16:32:13 +09:00
leeheejin ef32de3087 범용폼모달 데이터부분 데이터 삭제해도 안지워지던거 수정 2026-01-22 16:05:18 +09:00
SeongHyun Kim 57662df8cb feat: UniversalFormModal 필수값 검증 기능 추가
- beforeFormSave 이벤트 핸들러에서 validateRequiredFields() 호출 추가
- 검증 실패 시 validationFailed 플래그로 저장 중단 처리
- 누락된 필수 필드명을 사용자에게 toast로 명확히 표시

- 패널 설정에서 필수 체크 하여도 작동하지 않는 문제 해결
2026-01-22 10:57:15 +09:00
leeheejin 0ac83b1551 분할패널에서 수정해도 리스트에서 삭제가 안되던 문제 코드 해결 2026-01-15 12:07:26 +09:00
SeongHyun Kim ca73685bc2 Merge remote-tracking branch 'origin/main' into ksh 2026-01-14 10:22:58 +09:00
SeongHyun Kim cf97db7fbf feat(universal-form-modal): Select 필드 직접 입력(Combobox) 모드 추가
SelectOptionConfig에 allowCustomInput 옵션 추가
FieldDetailSettingsModal에 "직접 입력 허용" Switch UI 추가
CascadingSelectField에 Combobox 모드 구현 (Popover+Command)
SelectField에 Combobox 모드 구현
목록 선택과 직접 입력 동시 지원
2026-01-13 18:44:59 +09:00
SeongHyun Kim ef27e0e38f feat(universal-form-modal): 연쇄 드롭다운(Cascading Dropdown) 기능 구현
- SelectOptionConfig에 cascading 타입 및 설정 객체 추가
- FieldDetailSettingsModal에 연쇄 드롭다운 설정 UI 구현
  - 부모 필드 선택 (섹션별 그룹핑 콤보박스)
  - 관계 코드 선택 시 상세 설정 자동 채움
  - 소스 테이블, 부모 키 컬럼, 값/라벨 컬럼 설정
- UniversalFormModalComponent에 자식 필드 초기화 로직 추가
- selectOptions.cascading 방식 CascadingSelectField 렌더링 지원
2026-01-13 18:26:41 +09:00
leeheejin 1b5ae5fe1c 일단 오류 수정 2026-01-13 15:43:04 +09:00
SeongHyun Kim 2645d627da fix: 수주관리 수정 모달 저장 오류 수정 - UPDATE 폴백 로직 추가, 데이터 병합 순서 수정, 삭제 파라미터 순서 수정, id 타입 비교 통일 2026-01-08 12:25:35 +09:00
SeongHyun Kim 17498b1b2b refactor: UniversalFormModalComponent 자체 저장 기능 제거
saveSingleRow, saveWithCustomApi, handleSave, handleReset 함수 삭제
saving 상태 및 저장/초기화 버튼 UI 삭제
설정 패널에서 저장 버튼 관련 설정 UI 삭제
ModalConfig 타입에서 버튼 관련 속성 삭제
저장 처리는 button-primary (action: save)로 위임
약 468줄 코드 삭제
2026-01-08 10:04:05 +09:00
SeongHyun Kim 384106dd95 Merge remote-tracking branch 'origin/main' into ksh 2026-01-07 18:27:00 +09:00
SeongHyun Kim 6f4c9b7fdd ix: 부모-자식 모달 데이터 전달 문제 해결 및 미사용 multiRowSave 기능 제거
InteractiveScreenViewerDynamic: 생성 모드에서 formData를 initialData로 전달하도록 수정
UniversalFormModal: saveMultipleRows 함수 및 multiRowSave 관련 코드 전체 제거
types/config: MultiRowSaveConfig 인터페이스 및 기본값 제거
FieldDetailSettingsModal: receiveFromParent UI 옵션 제거
SaveSettingsModal: 저장 모드 설명 개선
DB: multiRowSave.enabled=true인 화면 3개 설정 수정
2026-01-07 17:42:40 +09:00
kjs 47ac9ecd8a 범용폼모달 외부소스 지원 2026-01-07 16:10:11 +09:00
kjs efc9175fec Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/screen-management 2026-01-06 13:45:48 +09:00
kjs eb61506acd 분할패널 수정동작 수정 2026-01-06 13:43:47 +09:00
kjs cded99d644 로그 제거 2026-01-06 13:08:33 +09:00
SeongHyun Kim 40fd5f9055 feat: 채번규칙 editable 옵션 수동 모드 감지 기능 구현
모달 오픈 시 채번 미리보기 원본값 저장 (numberingOriginalValues)
handleFieldChange에서 원본값 비교하여 수동/자동 모드 전환
사용자 수정 시 ruleId 제거하여 저장 시 채번 스킵
원본값 복구 시 ruleId 복구하여 자동 모드 복원
handleSave에서 채번 할당 조건 분기 처리
2026-01-06 13:06:28 +09:00
SeongHyun Kim b3ee2b50e8 fix: 카테고리 Select 필드 저장 시 라벨값 대신 코드값 저장되도록 수정
- UniversalFormModalComponent.tsx: 카테고리 옵션 value를 valueLabel에서 valueCode로 변경
- 제어 로직 조건 비교 정상화 및 500 에러 해결
2026-01-05 18:41:49 +09:00
SeongHyun Kim 4ad58ba942 feat: 폼 모달 자동 채번 기능 구현 및 임베디드 스크린 렌더링 최적화
UniversalFormModalComponent에 폼 초기화 시 채번 규칙을 가져와 적용하는 generateNumberingValues 구현
채번 생성 중복 호출 방지를 위한 useRef 로직 추가
데이터 업데이트 시 불필요한 리마운트 및 포커스 분실을 방지하기 위해 EmbeddedScreen 컴포넌트 key에서 formDataVersion 제거
2026-01-04 17:41:07 +09:00
kjs 3c4e251e9b 폼 다중테이블 저장 지원 2025-12-30 12:33:17 +09:00
SeongHyun Kim ef991b3b26 feat(universal-form-modal): 테이블 컬럼 저장 설정 및 참조 표시 기능 구현
컬럼별 저장 여부 설정 (saveToTarget: true/false)
저장 안 함 컬럼: 참조 ID로 소스 테이블 조회하여 표시만 함
수정 모드에서 참조 컬럼 값 자동 조회 (loadReferenceColumnValues)
Select 컴포넌트 빈 값 필터링으로 안정성 개선
조건 탭 변경 시 소스 데이터 즉시 로드
컬럼 필드 선택 안 함 옵션 추가 (표시 전용 컬럼)
2025-12-29 17:42:30 +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
SeongHyun Kim 486e5ee29b feat(SplitPanelLayout2): 좌우 패널 수정/삭제 기능 및 모달 자동 닫기 구현
- 좌측 패널에 수정/삭제 버튼 기능 추가
- 좌측 패널 설정에 개별 수정/삭제 UI 추가
- 삭제 API 호출을 백엔드 라우트에 맞게 수정 (DELETE /tables/{tableName}/delete)
- UniversalFormModal 저장 완료 후 closeEditModal 이벤트 발생하여 모달 자동 닫기
- ModalConfig에 showSaveButton 타입 추가
2025-12-24 14:01:38 +09:00
SeongHyun Kim f38447be8e Merge origin/main into ksh - resolve conflicts 2025-12-19 16:38:12 +09:00
SeongHyun Kim a1b05b8982 feat(UniversalFormModal): 수정 모드 INSERT/UPDATE/DELETE 지원
_groupedData를 테이블 섹션에 초기화하여 기존 품목 표시
originalGroupedData로 원본 데이터 보관하여 변경 추적
handleUniversalFormModalTableSectionSave()에 INSERT/UPDATE/DELETE 분기 로직 구현
EditModal, ConditionalSectionViewer에서 UniversalFormModal 감지 시 onSave 미전달
저장 완료 후 closeEditModal 이벤트 발생
2025-12-19 16:08:27 +09:00
SeongHyun Kim 9fb94da493 feat(UniversalFormModal): 섹션별 저장 방식 설정 기능 추가
SectionSaveMode 타입 추가 (공통 저장/개별 저장)
SaveSettingsModal에 섹션별/필드별 저장 방식 설정 UI 추가
saveSingleRow()에 공통 필드 + 품목 병합 저장 로직 구현
buttonActions.ts에 외부 저장 버튼용 병합 저장 처리 추가
2025-12-19 14:53:16 +09:00
kjs 84efaed1eb 에러 수정 2025-12-18 16:35:55 +09:00
SeongHyun Kim 1c6eb2ae61 feat(UniversalFormModal): 테이블 섹션 기능 추가
- FormSectionConfig에 type("fields"|"table") 및 tableConfig 필드 추가
- TableSectionRenderer, TableSectionSettingsModal 신규 컴포넌트 생성
- ItemSelectionModal에 모달 필터 기능 추가 (소스 테이블 distinct 값 조회)
- 설정 패널에서 테이블 섹션 추가/설정 UI 구현
2025-12-18 15:19:59 +09:00
SeongHyun Kim 132cf4cd7d fix(universal-form-modal): 수정 모드에서 옵셔널 필드 그룹 자동 활성화
- 기존 데이터의 triggerField 값이 triggerValueOnAdd와 일치하면 그룹 자동 활성화
- 활성화된 그룹의 필드값도 기존 데이터로 초기화
- 신규 등록 모드에서는 기존대로 비활성화 상태 유지
2025-12-17 15:27:28 +09:00
SeongHyun Kim 0810debd2b fix(universal-form-modal): 옵셔널 필드 그룹 연동 필드 기본값 설정
- 모달 초기화 시 optionalFieldGroups의 triggerField에 기본값 설정
- triggerValueOnRemove 값을 기본값으로 사용 (비활성화 상태 기본값)
- 수정 모드에서는 기존 데이터 값 유지
2025-12-17 15:00:45 +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
kjs 4777c2bc0a Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/screen-management 2025-12-12 17:09:41 +09:00
kjs 722718b7ed 설비 수정모달 데이터 안넘어오는 현상 수정 2025-12-12 14:37:24 +09:00
SeongHyun Kim 7ad70462d5 Merge branch 'ksh' 2025-12-12 14:14:58 +09:00
hjlee ac3de6ab07 Merge pull request 'lhj' (#282) from lhj into main
Reviewed-on: http://39.117.244.52:3000/kjs/ERP-node/pulls/282
2025-12-12 13:45:29 +09:00
SeongHyun Kim a9135165d9 fix: UniversalFormModal 채번 규칙 자동 생성 기능 개선
- 모달 재오픈 시 동일 번호 유지 (previewCode 사용)
- 저장 시 정상적인 순번 증가 (allocateCode에서 nextSequence 사용)
- refreshKey를 React key로 전달하여 컴포넌트 강제 리마운트
- ruleId를 부모 컴포넌트까지 전달하여 buttonActions에서 감지
- 미리보기와 저장 번호 일치 (currentSequence + 1 통일)
2025-12-12 10:55:09 +09:00
SeongHyun Kim ab8b5a2c91 fix: UniversalFormModal 채번규칙 중복 호출 문제 해결
- generateNumberingValues 중복 호출 방지 (ref 플래그 추가)
- generateOnOpen 시 allocateCode 직접 호출로 변경
- config 변경 시 initializeForm 재호출 비활성화
- cleanup 함수에서 플래그 초기화 추가
- 저장 시점 채번 로직 간소화 (generateOnSave만 처리)
2025-12-11 19:14:55 +09:00
SeongHyun Kim 038c5a0973 fix(numbering-rule): 채번 미리보기 순번 수정 및 저장 시 재할당 로직 추가
- 미리보기 시 currentSequence + 1로 다음 순번 표시
- UniversalFormModal에서 미리보기/실제할당 분리
- _needsAllocation 플래그로 저장 시 재할당 여부 판단
- RepeatScreenModal 외부 데이터 소스 조인/필터 설정 UI 추가
2025-12-11 18:26:33 +09:00
leeheejin 563acb7c00 봄 에러 뜨던거 고침2 2025-12-11 16:09:58 +09:00
SeongHyun Kim 0e60f11084 Merge remote-tracking branch 'origin/main' into ksh 2025-12-11 11:47:43 +09:00
kjs 5bbbd37553 Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/screen-management 2025-12-11 10:43:09 +09:00
leeheejin 65c1855eba 기본정보 눌렀을때 뜨는 오류해결 2025-12-10 16:47:48 +09:00