- Added a new controller for managing process work standards, including CRUD operations for work items and routing processes. - Introduced routes for fetching items with routing, retrieving routings with processes, and managing work items. - Integrated the new process work standard routes into the main application file for API accessibility. - Created a migration script for exporting data related to the new process work standard feature. - Updated frontend components to support the new process work standard functionality, enhancing the overall user experience.
2.6 KiB
2.6 KiB
formData 콘솔 로그 수동 테스트 가이드
테스트 시나리오
- http://localhost:9771/screens/1599?menuObjid=1762422235300 접속
- 로그인 필요 시:
topseal_admin/1234 - 5초 대기 (페이지 로드)
- 첫 번째 탭 "공정 마스터" 확인
- 좌측 패널에서 P003 행 클릭
- 우측 패널에서 추가 버튼 클릭
- 모달에서 설비(equipment) 드롭다운에서 항목 선택
- 저장 버튼 클릭 전 콘솔 스냅샷 확인
- 저장 버튼 클릭 후 콘솔 로그 확인
확인할 콘솔 로그
1. ADD 모드 formData 설정 (ScreenModal)
🔵 [ScreenModal] ADD모드 formData 설정: {...}
- 위치:
frontend/components/common/ScreenModal.tsx358행 - 의미: 모달이 ADD 모드로 열릴 때 부모 데이터(splitPanelParentData)로 설정된 초기 formData
- 확인:
process_code가 P003으로 포함되어 있는지
2. formData 변경 시 (ScreenModal)
🟡 [ScreenModal] onFormDataChange: equipment_code → E001 | formData keys: [...] | process_code: P003
- 위치:
frontend/components/common/ScreenModal.tsx1184행 - 의미: 사용자가 설비를 선택할 때마다 발생
- 확인:
process_code가 유지되는지,equipment_code가 추가되는지
3. 저장 시 formData 디버그 (ButtonPrimary)
🔴 [ButtonPrimary] 저장 시 formData 디버그: {
propsFormDataKeys: [...],
screenContextFormDataKeys: [...],
effectiveFormDataKeys: [...],
process_code: "P003",
equipment_code: "E001",
fullData: "{...}"
}
- 위치:
frontend/lib/registry/components/v2-button-primary/ButtonPrimaryComponent.tsx1110행 - 의미: 저장 버튼 클릭 시 실제로 API에 전달되는 formData
- 확인:
process_code,equipment_code가 모두 포함되어 있는지
추가로 확인할 로그
process_code포함 로그splitPanelParentData포함 로그🆕 [추가모달] screenId 기반 모달 열기:(SplitPanelLayoutComponent 1639행)
에러 확인
콘솔에 빨간색으로 표시되는 에러 메시지가 있는지 확인하세요.
사전 조건
- process_mng 테이블에 P003 데이터가 있어야 함 (company_code = 로그인 사용자 회사)
- equipment_mng 테이블에 설비 데이터가 있어야 함
- 로그인 사용자가 해당 회사(COMPANY_7 등) 권한이 있어야 함
자동 테스트 스크립트
데이터가 준비된 환경에서:
cd frontend && npx tsx scripts/test-formdata-logs.ts
데이터가 없으면 "좌측 테이블에 데이터가 없습니다" 오류가 발생합니다.