- 이메일 중복 체크 추가 (삭제된 사용자 포함)
- 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>
- PushNotificationService 신규 생성 (이벤트 기반 푸시 발송)
- FcmSender에 getSoundForChannel() 추가 (채널별 사운드 매핑)
- ClientService.store()에 신규 거래처 푸시 알림 연동
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- QuoteStoreRequest/UpdateRequest: manager, contact, remarks 필드 추가
- QuoteController: store에서 validated 데이터 로깅 추가 (디버깅용)
- QuoteService: manager, contact, remarks 필드 저장/조회 로직 추가
- FormulaEvaluatorService: BOM 계산 서비스 개선
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Service에서 ValidationException::withMessages() 사용 시 500 에러 발생 버그 수정
- ValidationException을 422 상태 코드로 적절히 처리
- errors 필드에 검증 에러 상세 포함
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- FormulaEvaluatorService: 품목마스터에서 규격/단위 조회 (getItemSpecAndUnit)
- QuoteService: 저장된 calculation_inputs로 BOM 자재 계산 (calculateBomMaterials)
- 견적 조회 시 bom_materials 데이터 자동 포함
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Order, OrderItem 모델에 견적 연동 필드 추가
- Quote 모델에 order_id 관계 추가
- QuoteService 개선
- 관련 마이그레이션 파일 추가
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Item 모델 item_category 필드 주석 추가
- CURRENT_WORKS.md 견적 자동산출 작업 현황 업데이트
- LOGICAL_RELATIONSHIPS.md 관계 문서 업데이트
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- ReceivablesController: boolean 유효성 검사를 string|in:true,false,1,0으로 변경
- 쿼리 문자열의 "true" 문자열을 올바르게 처리
- 디버깅용 Log::info 추가
- ReceivablesService: 동적 월 기간 지원
- recent_year=true 시 최근 12개월 동적 계산
- 월별 레이블 동적 생성 (예: 25.02, 25.03...)
- 이월잔액(carry_forward_balance) 계산 추가
- Client 모델: is_overdue, memo 필드 추가
- 마이그레이션: clients 테이블에 is_overdue 컬럼 추가
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- QuoteBomBulkCalculateRequest 생성 (React camelCase → API 약어 변환)
- QuoteCalculationService.calculateBomBulk() 메서드 추가
- POST /api/v1/quotes/calculate/bom/bulk 엔드포인트 추가
- Swagger 스키마 및 문서 업데이트
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- QuoteBomCalculateRequest.php 생성 (BOM 계산용 FormRequest)
- QuoteCalculationService.calculateBom() 메서드 추가
- QuoteController.calculateBom() 액션 추가
- POST /api/v1/quotes/calculate/bom 라우트 등록
- Swagger 문서 업데이트 (스키마 + 엔드포인트)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 당월 예상 지출: 매입/카드/발행어음 라벨로 변경, 전월 대비 증감률 표시
- 접대비 현황: 연간 한도 4,000만원, 더미 사용량 데이터
- 복리후생비 현황: 인당 20만원 기준, 더미 사용량 데이터
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- CategoryGroup 모델 추가 (카테고리별 단가 계산)
- FormulaEvaluatorService에 10단계 BOM 계산 로직 추가
- calculateBomWithDebug, calculateCategoryPrice 등 주요 메서드 구현
- MNG 시뮬레이터와 동일한 계산 결과 보장
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- POST /api/v1/tenants/logo 엔드포인트 추가
- TenantLogoUploadRequest: 이미지 유효성 검사 (jpeg, png, gif, webp, 5MB)
- TenantService.uploadLogo(): 기존 로고 삭제 후 새 로고 저장
- 저장 경로: /storage/tenants/{tenant_id}/logo_{timestamp}.{ext}
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>