- process_steps 테이블에 document_template_id FK 추가 (migration)
- ProcessStep 모델에 documentTemplate BelongsTo 관계 추가
- ProcessStepService에서 documentTemplate eager loading
- StoreProcessStepRequest/UpdateProcessStepRequest에 document_template_id 유효성 검증
- WorkOrderService에 getInspectionTemplate(), createInspectionDocument() 메서드 추가
- WorkOrderController에 inspection-template/inspection-document 엔드포인트 추가
- DocumentService.formatTemplateForReact() 접근자 public으로 변경
- i18n 메시지 키 추가 (inspection_document_created, no_inspection_template)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 삭제 불가 상태 추가 (생산중/생산완료/출하중/출하완료)
- 작업지시/출하 존재 시 삭제 차단 + 에러 메시지
- order_item_components → order_items → order_nodes → order 순차 soft delete
- DB 트랜잭션으로 원자성 보장
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- POST /work-orders/{id}/items/{itemId}/inspection: 품목별 검사 데이터 저장
- GET /work-orders/{id}/inspection-data: 전체 품목 검사 데이터 조회
- GET /work-orders/{id}/inspection-report: 검사 성적서용 데이터 조회
- WorkOrderItem 모델에 getInspectionData/setInspectionData 헬퍼 추가
- StoreItemInspectionRequest FormRequest 생성
- work_order_items.options['inspection_data']에 검사 결과 저장
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 견적확정 시 업체명/현장명/담당자/연락처 필수 검증 추가 (QuoteService)
- 작업지시 stats API에 by_process 공정별 카운트 반환 추가
- 작업지시 목록/상세 쿼리에 수주 개소(rootNodes) 연관 로딩
- 작업지시 품목에 sourceOrderItem.node 관계 추가
- 입고관리 완료건 수정 허용 및 재고 차이 조정
- work_order_step_progress 테이블 마이그레이션
- receivings 테이블 options 컬럼 추가
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- KyungdongFormulaHandler: 수식 계산 로직 리팩토링 및 확장
- OrderService: 수주 전환 시 BOM 품목 매핑 로직 추가
- QuoteService: 견적 상태 처리 개선
- FormulaEvaluatorService: 디버그 로깅 추가
- Quote 모델: 캐스팅 타입 수정
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Upsert API (POST /documents/upsert)
- ResolveRequest, UpsertRequest FormRequest 생성
- DocumentService에 resolve/upsert 로직 추가
- document_category common_codes 마이그레이션
- 에러/성공 메시지 i18n 추가
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 출금 건별 개별 이슈 → 해당일 누계 1건으로 upsert
- 첫 건: "거래처명 출금 금액원"
- 2건+: "첫거래처명 외 N건 출금 합계 금액원"
- 삭제 시 남은 건수/금액으로 자동 갱신
- FCM 푸시 미발송 (알림 설정 미구현)
- 기존 개별 source_id 레거시 이슈 자동 정리
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- TenantSetting CRUD API 추가
- Calendar, Entertainment, VAT 서비스 개선
- 5130 BOM 계산 로직 수정
- quote_items에 item_type 컬럼 추가
- tenant_settings 테이블 마이그레이션
- Swagger 문서 업데이트
- DepositIssueObserver, WithdrawalIssueObserver 신규 추가
- TodayIssueObserverService에 입금/출금 핸들러 및 디버그 로그 추가
- TodayIssue 모델에 입금/출금 상수 추가
- AppServiceProvider에 Observer 등록
- ApprovalService에 기존 결재선 사용 시 수동 알림 트리거 추가
- LoanController ApiResponse::handle() → ApiResponse::success() 수정
Co-Authored-By: Claude <noreply@anthropic.com>
- StatusBoardService: 현황판 8개 항목 집계 API
- CalendarService: 캘린더 일정 조회 API (작업지시/계약/휴가)
- TodayIssueService: 오늘의 이슈 리스트 API
- VatService: 부가세 신고 현황 API
- EntertainmentService: 접대비 현황 API
- WelfareService: 복리후생 현황 API
버그 수정:
- orders 테이블 status → status_code 컬럼명 수정
- users 테이블 department 관계 → tenantProfile.department로 수정
- Swagger 문서 및 라우트 추가
- ApiClient 인터페이스: representative → manager_name, contact_person 변경
- transformApiToFrontend: client.representative → client.manager_name 수정
- ApiOrderItem에 floor_code, symbol_code 필드 추가 (제품-부품 매핑)
- ApiOrder에 options 타입 정의 추가
- ApiQuote에 calculation_inputs 타입 정의 추가
- 수주 상세 페이지 제품-부품 트리 구조 UI 개선
- POST /api/v1/tax-invoices/bulk-issue: 세금계산서 일괄 발행
- POST /api/v1/sales/bulk-issue-statement: 거래명세서 일괄 발행
- FormRequest 검증 (최대 100건)
- Service 일괄 처리 로직 (개별 오류 처리)
- Swagger 문서 추가
- i18n 메시지 키 추가 (ko/en)
- Bidding 모델, 서비스, 컨트롤러, FormRequest 추가
- 마이그레이션 및 시더 추가
- Swagger API 문서 추가
- 견적에서 입찰 전환 시 중복 체크 로직 추가
- per_page 파라미터 100 초과 시 자동 클램핑 처리
- error.bidding.already_registered 에러 메시지 추가
- 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>
- 이메일 중복 체크 추가 (삭제된 사용자 포함)
- generateUniqueUserId() 메서드 추가 (중복 시 최대 10회 재시도)
- email_already_exists 에러 메시지 추가
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>
- Contract 모델, 마이그레이션 추가
- ContractController CRUD 엔드포인트 구현
- ContractService 비즈니스 로직 구현
- ContractStoreRequest, ContractUpdateRequest 검증 추가
- Swagger API 문서 작성
- 라우트 등록 (GET/POST/PUT/DELETE)
- 통계 및 단계별 건수 조회 API 추가
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>
- 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>
- shared/actions.ts: /boards/ → /system-boards/ 엔드포인트 변경
- EventList, InquiryList, NoticeList: 날짜 범위 초기값 빈 문자열로 변경 (전체 조회)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- routes/api.php: H-1~3, I-2~8 엔드포인트 추가
- error.php: 에러 메시지 키 추가 (en/ko)
- TenantUserProfile 모델 업데이트
- LOGICAL_RELATIONSHIPS.md 업데이트
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- WorkResult 모델 생성 (Production 네임스페이스)
- WorkResultService 서비스 구현 (CRUD + 통계 + 토글)
- WorkResultController 컨트롤러 생성 (8개 엔드포인트)
- FormRequest 검증 클래스 (Store/Update)
- Swagger 문서 작성 (WorkResultApi.php)
- 라우트 추가 (/api/v1/work-results)
- i18n 메시지 추가 (work_result 키)
API Endpoints:
- GET /work-results - 목록 조회 (페이징, 필터링)
- GET /work-results/stats - 통계 조회
- GET /work-results/{id} - 상세 조회
- POST /work-results - 등록
- PUT /work-results/{id} - 수정
- DELETE /work-results/{id} - 삭제
- PATCH /work-results/{id}/inspection - 검사 상태 토글
- PATCH /work-results/{id}/packaging - 포장 상태 토글
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- store() 수정: create_account=false면 password=NULL 허용 (사원 전용)
- revokeAccount() 추가: 시스템 계정 해제 (password=NULL, 토큰 무효화)
- POST /employees/{id}/revoke-account 라우트 추가
- ko/employee.php, en/employee.php 언어 파일 생성
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- leave_grants 테이블 마이그레이션 추가
- LeaveGrant 모델 생성 (annual/monthly/reward/condolence/other 유형)
- LeaveService에 getGrants, storeGrant, destroyGrant 메서드 추가
- LeaveController에 grants, storeGrant, destroyGrant 엔드포인트 추가
- GET/POST/DELETE /api/v1/leaves/grants 라우트 추가
- 연차/월차 부여 시 LeaveBalance total_days 자동 갱신
- DummyDataSeeder 및 개별 시더 추가 (Client, BadDebt, Deposit 등)
- payments.paid_at nullable 마이그레이션
- subscriptions 취소 컬럼 추가
- clients 테이블 bad_debt 컬럼 제거
- PlanController, ClientService 수정
- 불필요한 claudedocs, flow-test 파일 정리
- AdminFcmController, AdminFcmService 추가
- FormRequest 검증 (AdminFcmSendRequest 등)
- Swagger 문서 추가 (AdminFcmApi.php)
- ApiKeyMiddleware: admin/fcm/* 화이트리스트 추가
- FCM 에러 메시지 i18n 추가
- ItemService: 콤마 구분 멀티 item_type 지원 (예: type=FG,PT)
- parseItemTypes(): 콤마 구분 문자열을 배열로 파싱
- validateItemTypesInSameGroup(): 같은 group_id 검증
- index(), search() 메서드에 멀티 타입 로직 적용
- ItemsController: type/item_type 파라미터 일관성
- show(), showByCode(), destroy() 메서드에서 type 파라미터 지원
- 모든 엔드포인트에서 type 또는 item_type 둘 다 허용
- ItemBatchDeleteRequest: prepareForValidation()으로 type→item_type 매핑
- i18n: item_types_must_be_same_group 에러 메시지 추가 (ko/en)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 사용량 조회 API (GET /subscriptions/usage)
- 데이터 내보내기 API (POST/GET /subscriptions/export)
- 결제 명세서 API (GET /payments/{id}/statement)
- DataExport 모델 및 마이그레이션 추가
- loans 테이블 마이그레이션 추가
- Loan 모델 (인정이자 계산, 세금 계산 로직)
- LoanService (CRUD, 정산, 인정이자 계산/리포트)
- LoanController, FormRequest 5개
- 9개 API 라우트 등록
- i18n 키 추가 (validation)
- POST /api/v1/internal/exchange-token 추가
- HMAC-SHA256 서명 기반 서버간 인증
- InternalTokenService: 서명 검증 및 Sanctum 토큰 발급
- ExchangeTokenRequest: 요청 검증 (user_id, tenant_id, exp, signature)
- ApiKeyMiddleware: 내부 통신 경로 화이트리스트 추가
- i18n 메시지 추가 (error.internal.*, message.internal.*)
환경변수 필요: INTERNAL_EXCHANGE_SECRET (MNG와 동일)
- ai_reports 테이블 마이그레이션 추가
- AiReport 모델 생성 (daily/weekly/monthly 유형)
- AiReportService 구현 (비즈니스 데이터 수집 + Gemini API)
- 4개 API 엔드포인트 추가 (목록/생성/상세/삭제)
- Swagger 문서 및 i18n 메시지 추가
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
- 근무 설정 API (GET/PUT /settings/work)
- 근무유형, 소정근로시간, 연장근로시간, 근무요일, 출퇴근시간, 휴게시간
- 출퇴근 설정 API (GET/PUT /settings/attendance)
- GPS 출퇴근, 허용 반경, 본사 위치 설정
- 현장 관리 API (CRUD /sites)
- 현장 등록/수정/삭제, 활성화된 현장 목록(셀렉트박스용)
- GPS 좌표 기반 위치 관리
마이그레이션: work_settings, attendance_settings, sites 테이블
모델: WorkSetting, AttendanceSetting, Site (BelongsToTenant, SoftDeletes)
서비스: WorkSettingService, SiteService
Swagger 문서 및 i18n 메시지 키 추가
- leaves, leave_balances 테이블 마이그레이션 추가
- Leave, LeaveBalance 모델 구현 (BelongsToTenant, SoftDeletes)
- LeaveService 서비스 구현 (CRUD, 승인/반려/취소, 잔여일수 관리)
- LeaveController 및 FormRequest 5개 생성
- API 엔드포인트 11개 등록 (/v1/leaves/*)
- Swagger 문서 (LeaveApi.php) 작성
- i18n 메시지 키 추가 (message.leave.*, error.leave.*)
- common_codes에 item_group 추가 및 item_type parent_id 연결
- /api/v1/items?type=RM → 단일 품목 유형 조회
- /api/v1/items?group_id=103 → 그룹 전체 품목 조회 (FG,PT,SM,RM,CS)
- ItemService에 getItemTypesByGroupId(), newQueryForTypes() 메서드 추가
- 에러 메시지 추가 (item_type_or_group_required, invalid_group_id)
- BOM child_item_id를 새 items 테이블 ID로 마이그레이션
- Item.loadBomChildren() 수정: setRelation()으로 모델에 설정
- ItemService.validateBom() 추가: 순환 참조 방지
- error.php에 self_reference_bom 메시지 추가
- ID 7 자기참조 BOM 데이터 수정 완료
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- item_type → ItemPage.source_table → Model 클래스 동적 라우팅
- getModelInfoByItemType(): item_type으로 Model 정보 조회 (캐싱)
- newQuery(): 동적 Query Builder 생성
- 모든 CRUD 메서드 item_type 필수 파라미터로 변경
- ItemsController item_type 전달 로직 수정
- 에러 메시지 추가 (item_type_required, invalid_source_table)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>