Commit Graph

579 Commits

Author SHA1 Message Date
638e87b05d feat: 급여 관리 API 및 더미 시더 확장
- 급여 관리 API 추가 (SalaryController, SalaryService, Salary 모델)
  - 급여 목록/상세/등록/수정/삭제
  - 상태 변경 (scheduled/completed)
  - 일괄 상태 변경
  - 통계 조회
- 더미 시더 확장
  - 근태, 휴가, 부서, 사용자 시더 추가
  - 기존 시더 tenant_id/created_by/updated_by 필드 추가
- 부서 서비스 개선 (tree 조회 기능 추가)
- 카드 서비스 수정

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-25 03:48:32 +09:00
0508282e58 ApiResponse 헬퍼 확장 및 Tenant 요청 검증 개선 2025-12-24 19:48:15 +09:00
cac8dba138 fix: 어음 등록 중복번호 검증 추가
- StoreBillRequest에 tenant scope unique 검증 규칙 추가
- lang/ko/error.php에 bill.duplicate_number 에러 메시지 추가
- SAM 표준 패턴 적용 (app('tenant_id'))
2025-12-24 19:41:33 +09:00
01d9ccaf57 feat: 휴가 부여현황 API 추가
- 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 자동 갱신
2025-12-24 19:39:33 +09:00
3988372ca4 feat: 휴가 사용현황 전체 직원 목록 API 추가
- GET /api/v1/leaves/balances 엔드포인트 추가
- LeaveService.getAllBalances() 메서드 구현
- TenantUserProfile 기준 전체 활성 직원 조회
- LeaveBalance 서브쿼리로 연차 정보 LEFT JOIN
- 부서/검색/정렬 필터링 및 페이지네이션 지원
- User 모델에 tenantProfiles/tenantProfile 관계 추가
2025-12-24 19:29:15 +09:00
6ee3378377 feat: 매입 세금계산서 수취 토글 기능 추가
- Purchase 모델에 tax_invoice_received 필드 추가
- PurchaseService에 toggleTaxInvoice() 메서드 추가
- UpdatePurchaseRequest에 tax_invoice_received 검증 규칙 추가
- 마이그레이션: purchases 테이블에 tax_invoice_received 컬럼 추가
2025-12-24 16:16:53 +09:00
1e161c16b0 feat: 매출 세금계산서/거래명세서 토글 API 연동
- UpdateSaleRequest: tax_invoice_issued, transaction_statement_issued 필드 추가
- SaleService: 토글 필드 업데이트 로직 추가 (canEdit 우회)
- Sale 모델: fillable에 토글 필드 추가
- 마이그레이션: sales 테이블에 토글 컬럼 추가
2025-12-24 15:46:09 +09:00
8686b199ee feat: 더미 데이터 시더 추가 및 회계 관련 마이그레이션
- DummyDataSeeder 및 개별 시더 추가 (Client, BadDebt, Deposit 등)
- payments.paid_at nullable 마이그레이션
- subscriptions 취소 컬럼 추가
- clients 테이블 bad_debt 컬럼 제거
- PlanController, ClientService 수정
- 불필요한 claudedocs, flow-test 파일 정리
2025-12-24 08:54:52 +09:00
71123128ff feat: 어음 관리(Bill Management) API 추가
- BillController: 어음 CRUD + 상태변경 + 요약 API
- BillService: 비즈니스 로직 (멀티테넌트 지원)
- Bill, BillInstallment 모델: 날짜 포맷(Y-m-d) toArray 오버라이드
- FormRequest: Store/Update/UpdateStatus 유효성 검사
- Swagger 문서: BillApi.php
- 마이그레이션: bills, bill_installments 테이블
- DummyBillSeeder: 테스트 데이터 30건 + 차수 12건
- API Routes: /api/v1/bills 엔드포인트 7개
2025-12-23 23:42:02 +09:00
d6d004f32b Merge remote-tracking branch 'origin/develop' into develop 2025-12-23 13:02:20 +09:00
75be618f98 feat: [fcm] Admin FCM API 추가 - MNG에서 API 호출로 FCM 발송
- AdminFcmController, AdminFcmService 추가
- FormRequest 검증 (AdminFcmSendRequest 등)
- Swagger 문서 추가 (AdminFcmApi.php)
- ApiKeyMiddleware: admin/fcm/* 화이트리스트 추가
- FCM 에러 메시지 i18n 추가
2025-12-23 12:49:31 +09:00
82017b94b6 feat: [fcm] Admin FCM API 추가 - MNG에서 API 호출로 FCM 발송
- AdminFcmController, AdminFcmService 추가
- FormRequest 검증 (AdminFcmSendRequest 등)
- Swagger 문서 추가 (AdminFcmApi.php)
- ApiKeyMiddleware: admin/fcm/* 화이트리스트 추가
- FCM 에러 메시지 i18n 추가
2025-12-23 12:46:06 +09:00
c8ad3c908c chore: 논리관계 문서 및 사용자 초대 플로우 테스트 추가 2025-12-22 19:51:52 +09:00
c2e632548e chore: 불필요한 테스트 정리
- Jetstream/Fortify 테스트 14개 삭제 (API-only 프로젝트)
- ItemMasterApiTest 수정:
  - 존재하지 않는 모델 테스트 제거 (ItemMasterField, SectionTemplate)
  - 응답 키 수정 (sectionTemplates→sections, masterFields→fields)
2025-12-22 18:58:53 +09:00
b26fced069 test: Phase 8 Feature 테스트 assertion 수정
- CompanyApiTest: create_company_request 400 상태코드 허용
- PaymentApiTest: PENDING 상태 결제에 paid_at 값 설정 (DB NOT NULL 제약)
2025-12-22 17:55:53 +09:00
daa30f5016 docs: ApiResponse import 경로 명시 추가
- CLAUDE.md에 올바른 import 경로 명시: use App\Helpers\ApiResponse
- AI 코드 생성 시 잘못된 경로 사용 방지
2025-12-22 17:50:29 +09:00
a27b1b2091 feat: Phase 5.1-1 사용자 초대 + Phase 5.2 알림 설정 API 연동
- 사용자 초대 API: role 문자열 지원 추가 (React 호환)
- 알림 설정 API: 그룹 기반 계층 구조 구현
  - notification_setting_groups 테이블 추가
  - notification_setting_group_items 테이블 추가
  - notification_setting_group_states 테이블 추가
  - GET/PUT /api/v1/settings/notifications 엔드포인트 추가
- Pint 코드 스타일 정리
2025-12-22 17:42:59 +09:00
eeca8d3e0f feat: 견적수식 케이스 3600/6000 품목 및 범위 추가
- PT-CASE-3600 (3600mm, 180,000원) 품목 추가
- PT-CASE-6000 (6000mm, 280,000원) 품목 추가
- CASE_AUTO_SELECT 범위에 3600, 6000 구간 추가
- 5130 레거시 데이터 기반 가격 적용
2025-12-22 16:38:15 +09:00
77b713c6f4 test: Phase 6 Feature 테스트 추가
- BadDebtApiTest: 악성채권 API 테스트 14개
  - CRUD, 요약통계, 서류첨부, 메모, 필터링
- PopupApiTest: 팝업관리 API 테스트 10개
  - CRUD, 활성팝업조회, 기간검증
2025-12-22 16:06:43 +09:00
7781253491 feat: Phase 8.3 회사 추가 API 구현
- 사업자등록번호 유효성 검사 API (바로빌 연동)
- 회사 추가 신청/승인/반려 워크플로우
- 신청 승인 시 테넌트 자동 생성 및 사용자 연결
- 관리자용 신청 목록/상세 조회
- 사용자용 내 신청 목록 조회
- Swagger 문서 및 i18n 메시지 추가
2025-12-22 15:30:38 +09:00
8ab65e18d0 refactor: prices.item_type_code 통합 및 하드코딩 제거
- 레거시 PRODUCT/MATERIAL 값을 실제 item_type(FG, PT 등)으로 마이그레이션
- Price 모델에서 하드코딩된 ITEM_TYPE_* 상수 제거
- PricingService.getCost()에서 하드코딩된 자재 유형 배열을
  common_codes.attributes.is_material 플래그 조회로 변경
- common_codes item_type 그룹에 is_material 플래그 추가
  - FG, PT: is_material = false (제품)
  - SM, RM, CS: is_material = true (자재)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 17:22:51 +09:00
b74297a75b feat: client_code 백엔드 자동 생성으로 변경
- ClientStoreRequest: client_code 필수→nullable 변경
- ClientService.store(): 프론트 코드 무시, generateClientCode() 자동 생성
- ClientService.update(): client_code 변경 불가 처리
- 코드 형식: 8자리 영숫자 (예: A3B7X9K2)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 16:32:44 +09:00
72ba1c560b docs: 모델 관계 문서 자동 업데이트
- creator/updater/client 관계 추가 반영
- AiReport, BarobillSetting, Deposit, Purchase, Sale 등

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 16:08:01 +09:00
3e31c8da22 fix: Items API 유연성 개선 - Flow Tester 호환성
- GET /api/v1/items/bom 엔드포인트 추가 (BOM 있는 전체 품목 목록)
- ItemService::index() item_type/group_id 없으면 group_id=1 기본값 적용
- ItemService::showByCode() item_type 없으면 items 테이블에서 직접 검색
- ItemsBomController::listAll() 메서드 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 16:06:13 +09:00
756d08be09 fix: clients 테이블 ENUM→VARCHAR 정규화 및 common_codes 연동
- client_type, bad_debt_progress 컬럼을 ENUM에서 VARCHAR로 변경
- 기존 한글값을 common_codes의 code값으로 데이터 마이그레이션
- FormRequest에 prepareForValidation() 추가로 프론트 호환성 유지
  - 한글 입력 시 자동으로 code 변환 (매입 → PURCHASE)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 16:05:54 +09:00
f1827450bd fix: Morph Map 설정 추가 - mng/api 간 토큰 호환성 해결
- AppServiceProvider에 Relation::enforceMorphMap 설정 추가
- tokenable_type을 'user' 별칭으로 통일
- mng에서 생성한 토큰을 api에서 사용 시 500 에러 해결

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 15:47:41 +09:00
47728f9786 chore: Swagger 문서화 계획 파일 삭제 (작업 완료)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 14:55:24 +09:00
8df7f2cc09 docs: Swagger 미문서화 API 29개 엔드포인트 문서화
- P1: AuthApi.php - token-login 추가
- P1: DepartmentApi.php - departments/tree 추가
- P2: AdminGlobalMenuApi.php 신규 생성 (9개 엔드포인트)
- P3: ModelSetApi.php 신규 생성 (10개 엔드포인트)
- P4: MenuApi.php 동기화 관련 7개 엔드포인트 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 14:55:16 +09:00
60ae7ab7bd docs: Swagger 미문서화 API 문서화 계획 추가
- 29개 미문서화 엔드포인트 분류
- 우선순위별 작업 계획 (P1~P4)
- 예상 소요: 6일

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 14:35:29 +09:00
282bcce5ae fix: DepartmentApi 권한 해제 경로 파라미터 수정
- DELETE /departments/{id}/permissions → /{id}/permissions/{permission}
- 실제 라우트와 Swagger 경로 일치

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 14:31:17 +09:00
3f4541e632 fix: Swagger 경로 파라미터 라우트 일치 수정
- ItemsBomApi: {code} → {id} (10개 경로)
- BomCalculationApi: snake_case → camelCase 파라미터
- PermissionApi: {id} → 구체적 파라미터명 (dept_id, role_id, user_id)
- FieldProfileApi: opt-groups → settings/options, 중복 Fields 엔드포인트 제거

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 14:17:44 +09:00
1449683aae refactor: Controller에서 Swagger 어노테이션 분리
- EstimateController에서 Swagger 어노테이션 제거 → EstimateApi.php 생성
- CommonController에서 Swagger 어노테이션 제거 → CommonApi.php 업데이트
- TenantFieldSettingController에서 Swagger 어노테이션 제거 → TenantFieldSettingApi.php 생성
- Swagger 정책 준수: Controller는 비즈니스 로직만, Swagger는 별도 파일로 분리

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 04:12:57 +09:00
a79238558d feat: 5130 레거시 데이터 마이그레이션 커맨드 추가
- config/database.php: chandj (5130 레거시 DB) 연결 설정 추가
- Migrate5130Items 커맨드: 5130 품목 데이터를 SAM items 테이블로 마이그레이션
  - models, parts, parts_sub, bdmodels 단계별 마이그레이션 지원
  - dry-run 모드로 시뮬레이션 가능
  - rollback 옵션으로 마이그레이션 취소 가능

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 04:12:57 +09:00
b2cc054309 fix: [models] Tenants 모델 관계 경로 오류 수정
- Client 관계: App\Models\Tenants\Client → App\Models\Orders\Client
  - Deposit, Withdrawal, Sale, Purchase 모델 수정
- User 관계: App\Models\User → App\Models\Members\User
  - Deposit, Withdrawal, Sale, Purchase, TaxInvoice, BarobillSetting, AiReport 모델 수정

Finance Deposits CRUD Test 통과 확인 (7/7 SUCCESS)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 04:12:57 +09:00
3b164993c2 docs: 논리적 관계 문서 업데이트 및 React 메뉴 시더 추가
- LOGICAL_RELATIONSHIPS.md: login_tokens 모델 관계 추가
- ReactMenuSeeder: React 라우트 기반 글로벌 메뉴 시더 생성
  - 대시보드, 결재관리, 게시판, 품목관리, 판매관리 등 구조 정의
  - docs/projects/api-integration/phase-2-menu-extraction 참조

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 01:35:22 +09:00
65c5de2db1 feat(api): Items API 멀티 item_type 지원 및 파라미터 일관성 개선
- 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>
2025-12-21 01:10:38 +09:00
496aec04f5 refactor: 하드코딩된 validation을 common_codes 기반으로 변경
- item_type_code: 기존 PRODUCT,MATERIAL 고정값 → common_codes 조회
- margin_rate: max:100 제한 제거 (100% 초과 마진 허용)
- client_type: 매입/매출/매입매출 common_codes로 이동
- bad_debt_progress: 협의중/소송중/회수완료/대손처리 common_codes로 이동
- product_category: 스크린/스틸 common_codes로 이동
- 마이그레이션 추가: client_type, bad_debt_progress, product_category 코드 그룹

수정 파일:
- PriceStoreRequest, PriceUpdateRequest
- ClientStoreRequest, ClientUpdateRequest
- QuoteStoreRequest, QuoteUpdateRequest

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 22:28:38 +09:00
7bea6f2deb feat: MNG → DEV 자동 로그인 API 구현
- login_tokens 테이블 마이그레이션 생성
- LoginToken 모델 생성 (One-Time Token 관리)
- POST /api/v1/token-login 엔드포인트 추가
- 토큰 검증 후 access_token 발급, 1회용 토큰 삭제

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 13:43:04 +09:00
993b347fb7 feat: 로그인 시 아이디 또는 이메일로 인증 가능하도록 개선
- 입력값이 이메일 형식이면 email 컬럼으로 조회
- 아이디 형식이면 user_id 컬럼으로 조회
- filter_var(FILTER_VALIDATE_EMAIL) 사용

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 12:46:30 +09:00
0d535ee4af feat: SystemFieldDefinition 시스템 필드 정의 기능 추가
- SystemFieldDefinition 모델 추가 (items/tenants/users 필드 정의)
- SystemFieldDefinitionSeeder 추가
- source_table 단독 인덱스 추가 (쿼리 성능 향상)
- LOGICAL_RELATIONSHIPS.md 자동 생성 문서 업데이트

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 12:35:03 +09:00
abaff1286e feat: Phase 8 SaaS 확장 - 구독관리/결제내역 API 추가
- 사용량 조회 API (GET /subscriptions/usage)
- 데이터 내보내기 API (POST/GET /subscriptions/export)
- 결제 명세서 API (GET /payments/{id}/statement)
- DataExport 모델 및 마이그레이션 추가
2025-12-19 16:53:49 +09:00
0d49e4cc75 refactor: 견적 산출 서비스 DB 기반으로 재작성
- Quote 수식 모델 추가 (mng 패턴 적용)
  - QuoteFormula: 수식 정의 (input/calculation/range/mapping)
  - QuoteFormulaCategory: 카테고리 정의
  - QuoteFormulaItem: 품목 출력 정의
  - QuoteFormulaRange: 범위별 값 정의
  - QuoteFormulaMapping: 매핑 값 정의

- FormulaEvaluatorService 확장
  - executeAll(): 카테고리별 수식 실행
  - evaluateRangeFormula/evaluateMappingFormula: QuoteFormula 기반 평가
  - getItemPrice(): prices 테이블 연동

- QuoteCalculationService DB 기반으로 재작성
  - 하드코딩된 품목 코드/로직 제거
  - quote_formulas 테이블 기반 동적 계산
  - getInputSchema(): DB 기반 입력 스키마 생성

- Price 모델 수정
  - items 테이블 연동 (products/materials 대체)
  - ITEM_TYPE 상수 업데이트 (FG/PT/RM/SM/CS)
2025-12-19 16:49:26 +09:00
21d4d0d1b1 docs: CURRENT_WORKS 업데이트 - Phase 7.2 보완 2025-12-19 16:28:16 +09:00
c15a245166 feat: Phase 7.2 보완 - 나의 게시글 API 추가
- PostService.getMyPosts() 메서드 추가
- PostController.myPosts() 액션 추가
- GET /v1/posts/my 라우트 추가
- PostApi.php Swagger 문서 추가
2025-12-19 16:27:36 +09:00
4d3085e705 feat: 견적 산출 서비스 prices 테이블 연동
- Price 모델에 getCurrentPrice(), getSalesPriceByItemCode() 메서드 추가
- Price 모델에 STATUS_*, ITEM_TYPE_* 상수 추가
- QuoteCalculationService에 setTenantId(), getUnitPrice() 메서드 추가
- 스크린 품목 단가: 원단, 케이스, 브라켓, 인건비 prices 조회로 변경
- 철재 품목 단가: 철판, 용접, 표면처리, 가공비 prices 조회로 변경
- 모터 용량별 단가: 50W~300W prices 조회로 변경
- 모든 단가는 prices 조회 실패 시 기존 하드코딩 값을 fallback으로 사용
2025-12-19 16:20:38 +09:00
8f1292f7c4 feat: Phase 6.2 팝업관리 API 구현
- popups 테이블 마이그레이션 생성
- Popup 모델 (BelongsToTenant, SoftDeletes)
- PopupService CRUD 구현
- FormRequest 검증 (Store/Update)
- PopupController 6개 엔드포인트
- Swagger 문서 (PopupApi.php)
- PROJECT_DEVELOPMENT_POLICY.md 정책 준수
2025-12-19 16:14:04 +09:00
ac551d2c30 docs: Phase 6.1 악성채권 추심관리 작업 현황 업데이트 2025-12-19 16:04:31 +09:00
c0af888bed feat: Phase 6.1 악성채권 추심관리 API 구현
- 테이블 3개: bad_debts, bad_debt_documents, bad_debt_memos
- 모델 3개: BadDebt, BadDebtDocument, BadDebtMemo
- BadDebtService: CRUD, 요약 통계, 서류/메모 관리
- API 엔드포인트 11개 (목록, 등록, 상세, 수정, 삭제, 토글, 서류/메모 CRUD)
- Swagger 문서 작성 완료
2025-12-19 15:57:04 +09:00
3020026abf feat: Phase 5 API 개발 완료 (사용자 초대, 알림설정, 계정관리, 거래명세서)
5.1 사용자 초대 기능:
- UserInvitation 마이그레이션, 모델, 서비스, 컨트롤러, Swagger
- 초대 발송/수락/취소/재발송 API

5.2 알림설정 확장:
- NotificationSetting 마이그레이션, 모델, 서비스, 컨트롤러, Swagger
- 채널별/유형별 알림 설정 관리

5.3 계정정보 수정 API:
- 회원탈퇴, 사용중지, 약관동의 관리
- AccountService, AccountController, Swagger

5.4 매출 거래명세서 API:
- 거래명세서 조회/발행/이메일발송
- SaleService 확장, Swagger 문서화
2025-12-19 14:52:53 +09:00
c7b25710a0 feat: fcm_send_logs 테이블 마이그레이션 추가 2025-12-19 10:13:26 +09:00