Commit Graph

12 Commits

Author SHA1 Message Date
1c3cb48c7c feat(API): FCM 채널명 동기화 및 config 일원화 (7채널)
- push_urgent → push_vendor_register (거래처등록)
- push_payment → push_approval_request (결재요청)
- push_income 신규 추가 (입금)
- config/fcm.php에 전체 7개 채널 등록 (기존 2개→7개)
- 서비스 파일 하드코딩을 config() 참조로 전환

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:07:44 +09:00
4f2a329e4e fix: 출금 오늘의 이슈 path 분기 (1건: 상세, 2건+: 목록)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:42:41 +09:00
7acaac8340 feat: 출금 오늘의 이슈를 일일 누계 방식으로 변경
- 출금 건별 개별 이슈 → 해당일 누계 1건으로 upsert
- 첫 건: "거래처명 출금 금액원"
- 2건+: "첫거래처명 외 N건 출금 합계 금액원"
- 삭제 시 남은 건수/금액으로 자동 갱신
- FCM 푸시 미발송 (알림 설정 미구현)
- 기존 개별 source_id 레거시 이슈 자동 정리

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:03:19 +09:00
d3825e4bfb fix: 매입 수정 시 알림/푸시 발송 제외
- handleExpectedExpenseChange()에서 source_type이 'purchases'인 경우 알림 제외
- 매입 알림은 결재 상신 시에만 발송되도록 변경

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:40:37 +09:00
f74767563f feat: FCM 사용자별 타겟 알림 발송 기능 추가
- today_issues 테이블에 target_user_id 컬럼 추가 (마이그레이션)
- TodayIssue 모델: target_user_id 필드, targetUser 관계, forUser/targetedTo 스코프 추가
- TodayIssue 모델: 기안 상태 뱃지 상수 추가 (BADGE_DRAFT_APPROVED/REJECTED/COMPLETED)
- TodayIssueObserverService: createIssueWithFcm, sendFcmNotification, getEnabledUserTokens에 targetUserId 파라미터 추가
- TodayIssueObserverService: handleApprovalStepChange - 결재자에게만 발송
- TodayIssueObserverService: handleApprovalStatusChange 추가 - 기안자에게만 발송
- ApprovalIssueObserver 신규 생성 및 AppServiceProvider에 등록
- i18n: 기안 승인/반려/완료 알림 메시지 추가

결재요청은 결재자(ApprovalStep.user_id)에게만,
기안 승인/반려는 기안자(Approval.drafter_id)에게만 FCM 발송

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:57:46 +09:00
09db0da43b feat(API): 부실채권, 재고, 입고 기능 개선
- BadDebt 컨트롤러/서비스 기능 확장
- StockService 재고 조회 로직 개선
- ProcessReceivingRequest 검증 규칙 수정
- Item, Order, CommonCode, Shipment 모델 업데이트
- TodayIssueObserverService 개선

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:32:23 +09:00
8c77d1b32b feat: 신규거래처 알림 메시지 간소화 및 신용평가 모달 경로 수정
- 알림 메시지: "신규 거래처 :name 등록 완료" → ":name 등록"
- 모달 파라미터: openModal=credit → modal=credit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 14:11:02 +09:00
222880479d fix: 신규 거래처 알림 클릭 시 신용평가 모달 자동 오픈
- TodayIssueObserverService에서 신규 거래처 알림 경로에 ?openModal=credit 파라미터 추가
- 알림 클릭 시 거래처 상세 페이지로 이동하면서 신용분석 모달 자동 오픈

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 13:11:52 +09:00
a7dcdd2469 fix: 헤더 알람 경로를 상세 페이지로 수정
- 입금: /accounting/deposit-management → /accounting/deposits/{id}
- 출금: /accounting/withdrawal-management → /accounting/withdrawals/{id}
- 수주: /sales/order-management-sales → /sales/order-management-sales/{id}
- 미수금: /accounting/receivables-status → /accounting/bad-debt-collection/{id}
- 재고: /material/stock-status → /material/stock-status/{id}
- 신규거래처: /accounting/vendors → /accounting/vendors/{id}

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 11:22:13 +09:00
73e49f2736 fix(API): FCM 알림 채널 매핑 수정
- TodayIssue IMPORTANT_NOTIFICATIONS에서 deposit, withdrawal 제거
- notification_type별 채널 매핑 메서드 추가
  - new_vendor → push_urgent (긴급/신규업체)
  - approval_request → push_payment (결재)
  - sales_order → push_sales_order (수주)
  - purchase_order → push_purchase_order (발주)
  - contract → push_contract (계약)
  - 나머지 → push_default (일반)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 10:14:35 +09:00
d75f6f5bd1 feat(API): 입금/출금 알림 Observer 추가 및 LoanController 수정
- DepositIssueObserver, WithdrawalIssueObserver 신규 추가
- TodayIssueObserverService에 입금/출금 핸들러 및 디버그 로그 추가
- TodayIssue 모델에 입금/출금 상수 추가
- AppServiceProvider에 Observer 등록
- ApprovalService에 기존 결재선 사용 시 수동 알림 트리거 추가
- LoanController ApiResponse::handle() → ApiResponse::success() 수정

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 10:05:50 +09:00
d186a0c111 오늘 이슈(TodayIssue) 기능 구현
- TodayIssue 모델 및 마이그레이션 추가
- TodayIssueController, TodayIssueService 구현
- TodayIssueObserverService 및 Observer 패턴 적용
- DailyReportService 연동
- Swagger API 문서 업데이트
- 라우트 추가
2026-01-22 09:47:29 +09:00