- FormRequest에 options 필드 validation 추가 (StoreOrderRequest, UpdateOrderRequest)
- shipping_cost_code, receiver, receiver_contact, shipping_address 등
- OrderService.show()에서 client 로드 시 manager_name 필드 추가
- 수주확정/생산지시 되돌리기 기능 추가 (revertOrderConfirmation, revertProductionOrder)
- 견적 calculation_inputs 포함하여 로드
Co-Authored-By: Claude <noreply@anthropic.com>
- 작업지시 우선순위 필드 추가 (priority 마이그레이션)
- 수주-작업지시 품목 연동 source_order_item_id 컬럼 추가
- 수주 테이블에 account_code 필드 추가
- 작업지시 StoreRequest/UpdateRequest 우선순위 검증 추가
- WorkOrder 모델 priority fillable 추가
- 출근부 StoreRequest/UpdateRequest 검증 규칙 개선
- Employee Request 검증 규칙 수정
- SaleService/ItemService 수정
- WorkResultService 결과 처리 개선
- BankTransactionService 수정
- routes/api.php 엔드포인트 업데이트
- error.php 에러 메시지 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- QuoteUpdateRequest에 detail_items, price_adjustment_data validation 규칙 추가
- QuoteService에서 options 병합 시 array_merge 사용하여 기존 데이터 보존
- Laravel FormRequest의 validated()가 규칙 미정의 필드를 필터링하는 이슈 해결
Co-Authored-By: Claude <noreply@anthropic.com>
- 작업지시 생성 시 수주 품목 자동 복사 기능 추가
- 품목 추적용 source_order_item_id 컬럼 추가
- 발주처 표시를 위해 salesOrder 로딩에 client_id 추가
- 담당자 수정 시 assignee_ids 배열 처리 추가
Co-Authored-By: Claude <noreply@anthropic.com>
- CreateProductionOrderRequest에 누락된 필드 추가
- process_id, process_ids, priority 검증 규칙 추가
- $request->validated()에서 필터링되는 문제 해결
- 공정별 다중 작업지시 생성 정상 동작
Co-Authored-By: Claude <noreply@anthropic.com>
- WorkOrderService.php에 process_code 파라미터 필터 추가
- whereHas('process') 쿼리로 공정 코드 기반 필터링 지원
- 생산 현황판 동적 탭 필터링 API 지원
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- QuoteIndexRequest: for_order 파라미터 추가
- Quote 모델: orders() HasMany 관계 추가 (Order.quote_id 기준)
- QuoteService: for_order 필터링 로직 추가
- whereNull('order_id') - 빠른 체크
- whereDoesntHave('orders') - 이중 체크
- OrderService: 수주 생성 시 견적 상태를 converted로 업데이트
Co-Authored-By: Claude <noreply@anthropic.com>
- WorkOrderItem 모델 관계 정의 추가
- InspectionService, WorkResultService 로직 개선
- ItemReceipt, Inspection 모델 수정
- work_order_items 테이블에 options 컬럼 추가 마이그레이션
Co-Authored-By: Claude <noreply@anthropic.com>
- 이메일 중복 체크 추가 (삭제된 사용자 포함)
- generateUniqueUserId() 메서드 추가 (중복 시 최대 10회 재시도)
- email_already_exists 에러 메시지 추가
Co-Authored-By: Claude <noreply@anthropic.com>
- ItemsController: show/destroy 메서드 파라미터 타입 수정 (int → 동적 캐스팅)
- ItemsController: store/update에서 product_type → item_type 변환 로직 추가
- ItemService: 정렬 순서 수정 (최신 품목이 먼저 표시되도록 desc 추가)
- ItemService: code 키를 item_code로 변경 (ApiResponse::handle의 HTTP 상태 코드 충돌 방지)
Co-Authored-By: Claude <noreply@anthropic.com>
- 작업자 화면에서 나에게 배정된 작업만 조회하도록 지원
- 주 담당자(assignee_id) 또는 공동 담당자(assignees) 모두 포함
- 프론트엔드 WorkerScreen의 assigned_to_me=1 파라미터 처리
Co-Authored-By: Claude <noreply@anthropic.com>
- User 모델 $fillable에 is_active, created_by, updated_by 추가
- EmployeeService 이중 비밀번호 해싱 제거 (모델 hashed 캐스트 활용)
- create_account 플래그 의존성 제거 (password 있으면 계정 생성)
Fixes: employee-register E2E test failure
Co-Authored-By: Claude <noreply@anthropic.com>
- InspectionController 생성 (CRUD + stats + complete)
- InspectionService 생성 (비즈니스 로직)
- FormRequest 생성 (Store/Update/Complete)
- 라우트 등록 (7개 엔드포인트)
- i18n 메시지 추가 (message.php, error.php)
기존 inspections 테이블 및 Inspection 모델 활용
Co-Authored-By: Claude <noreply@anthropic.com>
- syncWorkOrderStatusFromItems()에서 pending 상태도 자동 전환 허용
- 품목 상태가 in_progress로 변경 시 작업지시 상태도 자동 변경
- 미배정(unassigned) 상태만 제외하도록 변경
- 기존: waiting, in_progress, completed만 동기화 대상
- 변경: unassigned만 제외, pending도 동기화 가능
Co-Authored-By: Claude <noreply@anthropic.com>
- 견적요약, 공과상세, 품목 단가조정 데이터를 JSON으로 저장
- Quote 모델에 options 필드 추가 (fillable, casts)
- 중요도가 낮은 필드는 개별 테이블 대신 JSON으로 관리
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 기존 마이그레이션 파일 정리
- handover_reports 테이블 마이그레이션 추가
- site_briefings 테이블 마이그레이션 추가
- work_orders process_id 마이그레이션 추가
Co-Authored-By: Claude <noreply@anthropic.com>
- SendFcmRequest, PositionReorderRequest 수정
- TenantLogoUploadRequest, Salary Requests 수정
- StructureReview Requests 수정
- HandoverReport, SiteBriefing Requests 추가
Co-Authored-By: Claude <noreply@anthropic.com>
- HandoverReport, HandoverReportItem, HandoverReportManager 모델 추가
- SiteBriefing 모델 추가
- StructureReview, FcmSendLog, Position, Salary 수정
- Order 모델 정리
Co-Authored-By: Claude <noreply@anthropic.com>
- EstimateService, ItemService 기능 추가
- OrderService 공정 연동 개선
- SalaryService, ReceivablesService 수정
- HandoverReportService, SiteBriefingService 추가
- Pricing 서비스 추가
Co-Authored-By: Claude <noreply@anthropic.com>
- FcmController, EstimateController, ItemsController 개선
- LoanController, PositionController 수정
- ReceivablesController, SalaryController 수정
- StructureReviewController 수정
Co-Authored-By: Claude <noreply@anthropic.com>
- AdminFcmApi, BillApi, ExpectedExpenseApi 개선
- PositionApi, ProcessApi, QuoteApi 개선
- ReceivablesApi, ShipmentApi, StockApi, VendorLedgerApi 개선
Co-Authored-By: Claude <noreply@anthropic.com>
- WorkOrder 모델에 process_id 추가
- process 관계 추가 (Process 모델)
- 공정별 다중 작업지시 생성 지원
- WorkOrderStoreRequest/UpdateRequest 수정
Co-Authored-By: Claude <noreply@anthropic.com>
- config/pagination.php 추가 (기본값 중앙 관리)
- HasPagination Trait 추가 (prepareForValidation에서 자동 조정)
- 22개 IndexRequest에 Trait 적용, max 규칙 제거
- 특수 케이스: Employee($maxSize=500), Audit($maxSize=200)
size/per_page가 최대값 초과 시 422 오류 대신 최대값으로 자동 조정되어
리스트가 빈 화면으로 표시되는 문제 해결
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- WorkOrderItem 모델에 status 컬럼 및 상수 추가 (waiting/in_progress/completed)
- 품목 상태 변경 API 엔드포인트 추가 (PATCH /work-orders/{id}/items/{itemId}/status)
- syncWorkOrderStatusFromItems() 메서드로 품목→작업지시 상태 자동 동기화
- 품목 중 하나라도 in_progress → 작업지시 in_progress
- 모든 품목 completed → 작업지시 completed
- 모든 품목 waiting → 작업지시 waiting
- 감사 로그: item_status_changed, status_synced_from_items 액션 추가
Co-Authored-By: Claude <noreply@anthropic.com>
- quotes 테이블에 quote_type 컬럼 추가 (manufacturing/construction)
- Quote 모델에 TYPE 상수 및 스코프 메서드 추가
- QuoteService.index()에 quote_type 필터 적용
- QuoteService.upsertFromSiteBriefing()에 construction 타입 설정
- QuoteIndexRequest에 quote_type 유효성 검증 추가
- 기존 site_briefing_id 있는 데이터는 construction으로 자동 업데이트
Co-Authored-By: Claude <noreply@anthropic.com>
- Labor 모델 (BelongsToTenant, SoftDeletes)
- LaborController 7개 엔드포인트
- LaborService 비즈니스 로직
- FormRequest 4개 (Index/Store/Update/BulkDelete)
- 마이그레이션 및 라우트 등록
API: GET/POST /labor, GET/PUT/DELETE /labor/{id}, DELETE /labor/bulk, GET /labor/stats
Co-Authored-By: Claude <noreply@anthropic.com>
- common_codes 테이블에 order_status 코드 그룹 추가 (DRAFT, CONFIRMED, IN_PROGRESS, COMPLETED, CANCELLED)
- common_codes 테이블에 order_type 코드 그룹 추가 (ORDER, PURCHASE)
- CommonController index 메서드 구현 (GET /api/v1/settings/common/{group})
- 멀티테넌트 지원 (tenant_id NULL 또는 현재 테넌트)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ClientService: stats(), bulkDestroy() 메서드 추가
- ClientController: stats(), bulkDestroy() 액션 추가
- routes/api.php: /clients/stats, /clients/bulk 라우트 추가
- 악성채권 보유 거래처 통계 계산 (BadDebt 연계)
- 주문 있는 거래처는 삭제 건너뜀
Co-Authored-By: Claude <noreply@anthropic.com>
- 마이그레이션: site_code, client_id, status 컬럼 추가
- Site 모델: 상태 상수, Client 관계 추가
- SiteService: stats(), bulkDestroy(), 필터 확장
- SiteController: stats, bulkDestroy 엔드포인트 추가
- 라우트: /stats, /bulk 추가
Co-Authored-By: Claude <noreply@anthropic.com>
- Controller: 생성자 DI로 PushNotificationService 주입
- Service: 12/18 커밋에서 삭제된 토큰 관리 메서드 복원
- registerToken, unregisterToken, getUserTokens
- getSettings, updateSettings
- initializeDefaultSettings, getDefaultSound
- 기존 비즈니스 이벤트 푸시 기능(FcmSender) 유지
Co-Authored-By: Claude <noreply@anthropic.com>
- Contract 모델, 마이그레이션 추가
- ContractController CRUD 엔드포인트 구현
- ContractService 비즈니스 로직 구현
- ContractStoreRequest, ContractUpdateRequest 검증 추가
- Swagger API 문서 작성
- 라우트 등록 (GET/POST/PUT/DELETE)
- 통계 및 단계별 건수 조회 API 추가
Co-Authored-By: Claude <noreply@anthropic.com>
## Critical 수정
- Multi-tenancy: WorkOrderItem, BendingDetail, Issue에 BelongsToTenant 적용
- 감사 로그: 상태변경, 품목수정, 이슈 등록/해결 시 로깅 추가
- 상태 전이 규칙: STATUS_TRANSITIONS + canTransitionTo() 구현
## High 수정
- 다중 담당자: work_order_assignees 피벗 테이블 및 관계 추가
- 부분 수정: 품목 ID 기반 upsert/delete 로직 구현
## 변경 파일
- Models: WorkOrder, WorkOrderAssignee(신규), 하위 모델들
- Services: WorkOrderService (assign, update 메서드 개선)
- Migrations: tenant_id 추가, assignees 테이블 생성
Co-Authored-By: Claude <noreply@anthropic.com>
- 견적→수주 변환 API (POST /orders/from-quote/{quoteId})
- 생산지시 생성 API (POST /orders/{id}/production-order)
- FormRequest 검증 클래스 추가
- 중복 생성 방지 및 상태 검증 로직
Co-Authored-By: Claude <noreply@anthropic.com>
- OrderService 구현 (index, stats, show, store, update, destroy, updateStatus)
- OrderController 구현 (7개 API 엔드포인트)
- FormRequest 클래스 3개 생성 (Store, Update, UpdateStatus)
- 상태 전환 규칙 검증 (DRAFT → CONFIRMED → IN_PROGRESS → COMPLETED/CANCELLED)
- 수주번호 자동 생성 (ORD{YYYYMMDD}{0001} 형식)
- Swagger API 문서 작성 (OrderApi.php)
- i18n 메시지 키 추가 (ko/en)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>