Commit Graph

1256 Commits

Author SHA1 Message Date
kjs
d3491a79bb feat: Implement approval request validation and enhance UI components
- Added validation to prevent duplicate approval requests for the same target, ensuring that only one active or completed approval exists at a time.
- Implemented a check to disallow self-approval in the approval line unless the approval type is 'self'.
- Integrated the ApprovalDetailModal component into the main layout for improved user experience.
- Updated the SalesOrderPage to include approval status in the data structure, enhancing visibility of approval states.
- Enhanced BOM management modals across multiple company implementations to accommodate new UI requirements.
2026-04-16 10:26:38 +09:00
kjs
313e963e63 Merge branch 'jskim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node 2026-04-15 14:23:45 +09:00
kjs
dffa16f3e5 feat: Add Smart Excel Upload functionality for item inspection
- Introduced a new SmartExcelUploadModal component to facilitate bulk item inspection uploads via Excel.
- Implemented logic for downloading templates, validating uploaded files, and parsing data for inspection criteria.
- Enhanced the item inspection page to support dynamic loading of item process mappings and reference data for improved user experience.
- Added necessary types and utility functions for template generation and parsing, ensuring robust handling of Excel data.
- These changes aim to streamline the item inspection process and improve data management across multiple company implementations.
2026-04-15 14:23:44 +09:00
DDD1542
2e8350c0f6 Merge branch 'jskim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node
; Conflicts:
;	frontend/app/(main)/COMPANY_30/sales/order/page.tsx
2026-04-15 12:03:09 +09:00
DDD1542
b7082b7799 김주석씨 2026-04-15 11:46:05 +09:00
kjs
7aaf264661 feat: Enhance work item detail management with additional inspection fields
- Updated the processWorkStandardController and workInstructionController to include new fields for process_inspection_apply and equip_inspection_apply in SQL queries and data handling.
- Modified the DetailFormModal and WorkItemDetailList components to support individual registration of inspection items and equipment inspections, improving the flexibility of the inspection process.
- Implemented logic to handle automatic content generation for inspection and equipment inspection types, enhancing user experience and data accuracy.
- These changes aim to improve the management of work item details and streamline the inspection process across multiple company implementations.
2026-04-14 17:51:47 +09:00
DDD1542
4d55aebe61 기무주서쿠의원장님 살려주십쇼 2026-04-14 16:45:12 +09:00
kjs
7e9d75e1a4 feat: Implement automatic equipment code generation and allocation in equipment registration
- Enhanced the equipment registration process to support automatic code generation based on predefined numbering rules.
- Integrated API calls to fetch and preview numbering rules, allowing for dynamic equipment code assignment.
- Added error handling to manage failures in code allocation, ensuring a smoother user experience during equipment registration.
- Updated the input field for equipment code to reflect automatic generation status, improving clarity for users.
- These changes aim to streamline the equipment management process and enhance usability across multiple company implementations.
2026-04-14 12:27:27 +09:00
kjs
b0cc0fce9f refactor: Update work instruction queries to use work_instruction_id for consistency
- Changed references from work_instruction_no to work_instruction_id in the popProductionController and workInstructionController for improved consistency and clarity.
- Updated SQL queries to ensure proper data handling and integrity by aligning with the new identifier.
- These changes aim to streamline the data retrieval process and enhance overall code maintainability across multiple company implementations.
2026-04-14 12:09:06 +09:00
kjs
0622a5c1b6 refactor: Optimize order summary query and implement pagination in production plan management
- Consolidated the order summary query to integrate detailed, stock, and planning information into a single CTE for improved performance and clarity.
- Removed redundant checks for lead time in item_info, simplifying the query structure.
- Introduced pagination functionality in the production plan management page, allowing users to navigate through order items more efficiently.
- Enhanced the user interface to reflect the paginated data, improving overall usability and data handling across multiple company implementations.
2026-04-14 11:51:53 +09:00
kjs
2c75677394 feat: Implement user ID duplication check in user registration and update processes
- Added functionality to check for existing user IDs during new user registration and updates to prevent overwriting accounts from different companies.
- Enhanced error handling to return appropriate messages when a duplicate user ID is detected.
- Updated the frontend to include user ID duplication verification, ensuring a smoother user experience during user creation and editing.
- These changes aim to improve data integrity and user management across multiple company implementations.
2026-04-13 18:20:24 +09:00
SeongHyun Kim
ed881646a5 merge: POP 재고관리 전면 구현 (feature→staging) 2026-04-10 18:48:52 +09:00
SeongHyun Kim
e3657b099d feat: 공정실행 단일/다중품목 뱃지 + 품목타입 표시
- 단일품목: 회색 뱃지 [단일 · 제품]
- 다중품목: 파랑 뱃지 [다중 1/2 · 반제품]
- 리워크: 주황 뱃지 유지 (기존)
- item_info.type으로 품목타입(제품/반제품/원재료/부재료) 표시
- workInstructionController: getList에 item_type 추가
- WorkOrderList: multiBatchInfo useMemo로 단일/다중 판단
- ProcessWork: batchBadge로 헤더에 뱃지 표시
2026-04-10 17:30:01 +09:00
SeongHyun Kim
8c23f48996 feat: POP 재고관리 전면 구현 — 재고조정/재고이동/다중품목 공정
재고조정:
- fullBleed 좌우 분할, 숫자키패드 모달, 위치불일치 QR스캔+모달
- 임시저장 cart_items 상태관리 (saved/cancelled/confirmed)
- 조정이력 별도 페이지, DateRangePicker 통일
- popInventoryController 11개 API (adjust-batch, stock-detail, locations 등)

재고이동:
- 창고 탭: 탭 버튼 패턴 + flat 리스트 (아코디언 제거)
- 공정 탭: 공정명/설비 필터 모달 (작업지시번호 탭 제거)
- move-batch API: 창고→창고 + 공정→창고 (source_type 확장)
- 품목 이력 바텀시트 (transaction_type별 색상)

다중품목 공정실행:
- syncWorkInstructions LIMIT 1 제거 → detail 전체 순회
- batch_id 기반 품목별 공정 분리
- WorkOrderList/ProcessWork 품목 구분 표시

기타:
- PopShell fullBleed 모드 추가
- alert() → 토스트 메시지 교체
- MonitoringSettings import 수정
2026-04-10 17:17:23 +09:00
kjs
2f50d7d809 fix: Enhance file handling and inspection method mapping
- Updated fileController to include Cross-Origin-Resource-Policy headers for improved security and file handling.
- Added error handling for file streams to ensure robust responses in case of read errors.
- Modified materialStatusController to correctly map material IDs to their respective codes for inventory stock queries.
- Enhanced moldController to include warranty shot count in mold creation and update processes.
- Improved item inspection page by adding inspection method category loading and mapping, ensuring accurate display of method labels in the UI.

These changes aim to enhance the overall functionality and user experience across multiple companies by ensuring proper file handling, data mapping, and error management.
2026-04-10 15:59:38 +09:00
kjs
b8860e56e5 refactor: Update category value handling to make menuObjid optional
- Modified the addCategoryValue function to allow menuObjid to be optional, accommodating scenarios where it may not be provided, such as in global management screens.
- Adjusted related service and controller logic to handle the absence of menuObjid gracefully, ensuring that the application remains robust and user-friendly.
- Enhanced the frontend components to reflect these changes, improving the overall user experience when adding category values across multiple companies.
2026-04-10 14:17:35 +09:00
SeongHyun Kim
b0e4b9ed46 Merge branch 'main' of https://g.wace.me/jskim/vexplor_dev 2026-04-10 10:31:44 +09:00
SeongHyun Kim
9f00988110 feat: POP 전면 개선 — 신규 화면 5개 + 버그 수정 9건 + UI 개선
[신규 화면]
- 설비허브 + 설비관리 + 설비점검
- 재고조정 + 재고이동

[버그 수정]
- 창고 NULL status 누락
- 작업지시 sync detail fallback
- InspectionModal API 경로
- 검사결과 DB 저장
- seq_no 비순차 대응
- 출고 재고 부족 검증
- 자동 창고 매칭
- 내 접수 목록 필터

[UI 개선]
- 사이드바 카드형
- 자재투입 컴팩트
- 커스텀 모달
- 불필요 버튼 제거
2026-04-10 10:28:39 +09:00
SeongHyun Kim
cdea504d90 fix: POP sync detail fallback + 사이드바 카드 UI
- sync: header에 routing 없으면 detail에서 자동 가져오기 (PC→POP 연동 수정)
- sync: header routing/qty/item_id 자동 보정 (detail → header 동기화)
- 사이드바: 체크리스트/자재투입 카드 형태 UI로 변경
2026-04-09 18:09:30 +09:00
dd66a5a09b Merge branch 'main' into jskim-node 2026-04-09 06:59:00 +00:00
SeongHyun Kim
327b4d01c2 feat: POP 시연 준비 — 5개 화면 + 버그 수정 + 자동 창고 매칭
- 구매입고: 검사기준 API 수정, 검사결과 DB 저장, 검사 미완료 확정 차단
- 판매출고: 재고 부족 사전 검증, 수주상세 ship_qty 반영, 에러 메시지 개선
- 공정실행: seq_no 비순차 대응(3곳), 자재투입 자동 창고 매칭 재고차감, 불필요 버튼 제거
- 검사관리+입출고관리: 신규 화면 (quality, inventory)
- 공통: ConfirmModal 커스텀 모달 (native confirm 대체)
2026-04-09 14:38:28 +09:00
SeongHyun Kim
1b62dae277 Merge branch 'main' of https://g.wace.me/jskim/vexplor_dev 2026-04-09 14:30:32 +09:00
SeongHyun Kim
bfac350ed4 feat: POP 시연 준비 — 5개 화면 + 버그 수정 + 재고검증 2026-04-09 14:28:57 +09:00
kjs
a9d2df48bf fix: Improve numbering rule handling and item routing functionality
- Added temporary debug response in `numberingRuleController` for better troubleshooting.
- Refactored SQL queries in `NumberingRuleService` to enhance parameter handling and improve clarity.
- Updated `ItemInfoPage` to correctly handle manual input values for user-generated codes.
- Implemented sorting logic in `ItemRoutingTab` to prioritize default routing versions and added functionality to set a version as default.

These changes aim to enhance the reliability and user experience in managing numbering rules and item routing processes.
2026-04-09 12:18:26 +09:00
kjs
51eddc6d84 refactor: Enhance numbering rule handling and BOM management
- Updated the `NumberingRuleService` to support manual values in the computation of non-sequence values.
- Improved the `ItemInfoPage` to parse preview codes into parts, allowing for better handling of manual inputs and dynamic code generation.
- Refactored BOM management to streamline the retrieval of category options for both division and unit, enhancing data consistency.
- Added utility functions to resolve unit labels from category options, improving the clarity of displayed data.

These changes aim to improve the functionality and user experience in managing item information and BOM processes.
2026-04-09 11:52:40 +09:00
kjs
0345926698 fix: Correct SQL parameter indexing and improve date handling in various components
- Updated SQL query in `productionPlanService.ts` to fix parameter indexing for company code.
- Refactored date handling in `department/page.tsx`, `customer/page.tsx`, and `sales-item/page.tsx` to ensure consistent date formatting.
- Enhanced equipment list state management in `production/plan-management/page.tsx` to use more descriptive property names.

These changes aim to improve the reliability of SQL operations and ensure consistent date handling across the application.
2026-04-08 17:45:28 +09:00
kjs
2a23cadb41 feat: Enhance user management and reporting features
- Added `end_date` field to user management for better tracking of user status.
- Updated SQL queries in `adminController` to include `end_date` during user save operations.
- Improved purchase report data handling by refining the logic for received quantities.
- Enhanced file preview functionality to streamline file path handling.
- Updated outbound and receiving controllers to ensure accurate updates to shipment and purchase order details.

These changes aim to improve the overall functionality and user experience in managing user data and reporting processes.
2026-04-08 15:33:09 +09:00
ff79411c35 Merge branch 'main' into jskim-node 2026-04-08 01:42:08 +00:00
kjs
d90a3a9aff feat: Update smart factory log scheduling and enhance item info page
- Modified the upsertSchedule function to regenerate today's plan immediately after schedule changes, ensuring that already sent users are automatically excluded.
- Increased the data size limit for item info page requests from 500 to 99999 for better data handling across multiple companies.
- Added new pages for design request management, task management, and equipment info, providing comprehensive tools for managing design and equipment processes.

These updates aim to improve the efficiency and usability of the smart factory log and item management systems, enhancing user experience and operational effectiveness.
2026-04-08 10:41:32 +09:00
SeongHyun Kim
add2e34291 Merge branch 'main' of https://g.wace.me/jskim/vexplor_dev 2026-04-08 10:19:55 +09:00
kjs
8f228bc7c3 refactor: Update smart factory log scheduling behavior
- Removed immediate plan generation on server start to prevent sending logs for past timestamps.
- Updated the upsertSchedule response message to clarify that the schedule will take effect from the next day at 00:05.

These changes aim to enhance the reliability of the smart factory log scheduling system by ensuring that logs are sent at the correct times and reducing the risk of sending outdated logs.
2026-04-07 18:21:08 +09:00
kjs
b62b1c1267 Merge branch 'jskim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node 2026-04-07 17:29:04 +09:00
kjs
fc61a66287 feat: Enhance smart factory schedule management
- Added dailyCount parameter to the upsertSchedule function, allowing for the configuration of daily access limits for users.
- Updated the smartFactoryLog interface to include daily_count, ensuring proper data handling for schedule management.
- Removed the runScheduleNowHandler function from the smartFactoryLogController and adminRoutes, streamlining the API for schedule management.
- Modified the frontend SmartFactoryLogPage to support dailyCount selection, improving user experience in managing schedules.

These changes aim to enhance the flexibility and usability of the smart factory schedule management system, allowing for better control over user access and scheduling operations.
2026-04-07 17:29:03 +09:00
SeongHyun Kim
d795c74dbd feat: POP 입고/출고 채번규칙을 화면설정과 연동
백엔드:
- receiving/generate-number: ?ruleId 쿼리 받아 numberingRuleService.allocateCode 사용
- outbound/generate-number: 동일
- ruleId 없거나 실패 시 기존 하드코딩 채번으로 폴백

프론트:
- InboundCartPage: 확정 시 화면설정의 popConfig.inbound.numberingRuleId 읽어 ruleId 전달
- OutboundCartPage: 확정 시 화면설정의 popConfig.outbound.numberingRuleId 읽어 ruleId 전달

POP 화면설정에서 채번규칙 선택 → 입고/출고 확정 시 자동 적용
2026-04-07 17:11:39 +09:00
7698091f81 Merge branch 'main' into jskim-node 2026-04-07 07:47:17 +00:00
kjs
1b7842c305 feat: Implement smart factory log management features
- Added new API endpoints for retrieving company-specific user lists and sending immediate logs for selected users.
- Enhanced the smartFactoryLogController with functions to handle user retrieval and immediate log sending, improving operational efficiency.
- Updated adminRoutes to include routes for the new functionalities, ensuring proper access control for super admins.
- Refactored the sendSmartFactoryLog function to improve logging and error handling, providing better insights into the log transmission process.

These changes aim to enhance the smart factory log management capabilities, facilitating better user interaction and operational tracking.
2026-04-07 16:45:52 +09:00
SeongHyun Kim
acd30d3c83 Merge branch 'main' of https://g.wace.me/jskim/vexplor_dev
Some checks failed
Build and Push Images / build-and-push (push) Failing after 46s
2026-04-07 15:47:40 +09:00
SeongHyun Kim
fae84efe39 fix: /api prefix 없는 요청도 라우팅 (배포 환경 호환) 2026-04-07 15:47:16 +09:00
kjs
96cee05945 feat: Add userId retrieval in deleteReceiving function
- Enhanced the deleteReceiving function in the receivingController to retrieve the userId from the request object.
- This addition will facilitate better tracking and auditing of delete operations by associating them with the user performing the action.
2026-04-07 14:51:50 +09:00
kjs
57b64653c0 merge: resolve conflicts accepting incoming changes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 14:44:17 +09:00
kjs
c3e973bb1a feat: Implement smart factory schedule management functionality
- Added new API endpoints for managing smart factory schedules, including retrieval, creation, updating, and deletion of schedules.
- Integrated schedule management into the smart factory log controller, enhancing the overall functionality.
- Implemented a scheduler initialization process to automate daily plan generation and scheduled sends.
- Developed a frontend page for monitoring equipment, production, and quality, with real-time data fetching and auto-refresh capabilities.

These changes aim to provide comprehensive scheduling capabilities for smart factory operations, improving efficiency and operational visibility for users.
2026-04-07 14:16:26 +09:00
SeongHyun Kim
630b135254 fix: BOM 자재 input_qty 합산 매핑 키 수정 (item_code 기준)
process_work_result.detail_content에는 item_code(R_PLAST_024)가 저장되는데
기존 코드는 child_item_id(UUID)로 매칭하려 해서 항상 0 반환되던 버그.

매칭 키를 child_item_code로 변경 → 정상 합산 확인 (5+30=35)
2026-04-07 12:45:39 +09:00
SeongHyun Kim
b497db9987 chore: Playwright 의존성 제거 + jskim-node에서 inspection 관리 페이지 cherry-pick
- playwright, @playwright/test 제거 (cmux browser만 사용)
- inspection page.tsx: 판단기준(judgment_criteria) Select UI 포함 버전으로 업데이트
2026-04-07 12:10:56 +09:00
SeongHyun Kim
450247026c feat: POP 작업상세 체크리스트 UI를 judgment_criteria 기반으로 매핑
- 백엔드: /api/pop/production/checklist-items/:processId 신규 추가
  process_work_result ⟕ inspection_standard(judgment_criteria) LEFT JOIN으로
  한 번에 반환 (inspection_code 미설정 시 null로 안전)

- 프론트: resolveInputType + normalizeByJudgmentCriteria + normalizeByDetailType
  1순위: judgment_criteria (CAT_JC_01~04) → inspect/numeric_range/ox/select/text
  2순위: detail_type 폴백
    - checklist/equip_inspection → check(토글)
    - inspection/equip_condition/production_result → inspect(숫자 키패드)
    - lookup → input(텍스트)
    - material_input → material(BOM 자재)
  기존 canonical 값은 건드리지 않아 회귀 없음

- fetchData는 전용 API 사용 + 실패 시 기존 dataApi.getTableData로 폴백
2026-04-07 12:06:01 +09:00
SeongHyun Kim
3929ec17f2 fix: BOM 자재 조회 시 기존 투입량 합산 반영
- getBomMaterials에서 input_qty: 0 하드코딩 → process_work_result에서 실제 투입량 SUM
- child_item_id별 투입 합산으로 정확한 잔여량 표시
2026-04-07 11:07:19 +09:00
SeongHyun Kim
21e89922eb feat: POP 회사별 자동 세팅 — 메뉴 활성화 시 레이아웃 자동 생성
- 로그인 시 POP 메뉴 발견 → 해당 회사용 POP 레이아웃 8개 자동 복제
- 템플릿: 공통(*) 우선, COMPANY_7 폴백
- 회사명 자동 치환 (탑씰 → 해당 회사명)
- screen_definitions 공통(*) 화면은 모든 회사 접근 허용
- 프로필 POP 모드 메뉴: POP 메뉴 있는 회사만 표시
- getLayoutPop 개별 자동 복제 (2중 안전망)
2026-04-07 10:46:54 +09:00
kjs
822f9ac35a feat: Implement smart factory log functionality
- Added a new controller for managing smart factory logs, including retrieval and statistics endpoints.
- Integrated smart factory log migration to set up the necessary database structure.
- Enhanced the authentication controller to include user name in log submissions.
- Developed a frontend page for displaying and filtering smart factory logs, accessible only to super admins.
- Implemented API calls for fetching logs and statistics, improving data visibility and management.

These changes aim to provide comprehensive logging capabilities for smart factory activities, enhancing monitoring and analysis for administrators.
2026-04-07 10:35:16 +09:00
SeongHyun Kim
15029dc58d feat: 리워크 추적 시스템 + 합류 판정 + 버그 12건 수정
리워크 추적:
- 다음 공정 접수 시 리워크 자동 감지 (rework_source_id별 개별 추적)
- 합류 판정: 일반 물량 있으면 마크 해제(합류), 없으면 마크 유지
- 창고 입고 시 마크 자동 해제 (is_rework=NULL, 이력 보존)
- 접수가능 카드: 합류 불가 시 리워크 배지 표시

버그 수정:
- 접수가능 이중 집계 (master+SPLIT 합산 → SPLIT만)
- completed master 재활성화
- 리워크 접수 불가 (자체 input 기반으로 변경)
- master input_qty 덮어쓰기 방지
- 리워크 카드A 접수 시 카드B 사라짐 (개별 전량 판정)
- 진행중/완료 탭 마스터 행 제외
- 리워크 진행중 카드 중복 (마스터 숨김, SPLIT만 표시)
- 리워크 SPLIT에 is_rework 전달
- 재작업 회차 이중 카운트 (마스터만 카운트)
- reworkAvailable이 available 초과 (clamp 처리)
- 불량 수량 키패드 기본값 빈값
- 불량 처리 공정선택 UI 연결

테스트 검증: 전체 시나리오 PASS (집계  흐름  재고  마크 )
2026-04-06 22:27:23 +09:00
SeongHyun Kim
6bdcdec9c3 feat: 리워크 원점 복귀 추적 — 원본 공정 도달 시 마크 해제
- accept-process: rework_source_id 전달 시 원본 seq_no와 비교
  - 현재 seq < 원본 seq → is_rework='Y' 유지 (마크 표시)
  - 현재 seq >= 원본 seq → is_rework 해제 (합류, 마크 없음)
- save-result 응답에 rework_source_id 포함 (프론트 추적용)
- accept-process 응답에 rework_source_id 포함
2026-04-06 16:09:21 +09:00
SeongHyun Kim
d0238d26c6 fix: 리워크 마스터 전량접수 시 completed로 변경 (in_progress → completed) 2026-04-06 15:50:48 +09:00