feat(API): 결재함 및 대시보드 관련 개선
- ApprovalService: inbox 쿼리에 결재자 상세 정보 추가 (직책, 부서) - PurchaseController: dashboardDetail 엔드포인트 추가 - CardTransactionService: 당월 이용 건수 추가 - SaleService: 대시보드 조회 개선 - LOGICAL_RELATIONSHIPS.md 업데이트 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -392,9 +392,18 @@ public function inbox(array $params): LengthAwarePaginator
|
||||
$q->where('approver_id', $userId)
|
||||
->whereIn('step_type', [ApprovalLine::STEP_TYPE_APPROVAL, ApprovalLine::STEP_TYPE_AGREEMENT]);
|
||||
})
|
||||
->with(['form:id,name,code,category', 'drafter:id,name', 'steps' => function ($q) use ($userId) {
|
||||
$q->where('approver_id', $userId);
|
||||
}]);
|
||||
->with([
|
||||
'form:id,name,code,category',
|
||||
'drafter:id,name',
|
||||
'drafter.tenantProfile:id,user_id,position_key,department_id',
|
||||
'drafter.tenantProfile.department:id,name',
|
||||
'steps' => function ($q) use ($userId) {
|
||||
$q->where('approver_id', $userId);
|
||||
},
|
||||
'steps.approver:id,name',
|
||||
'steps.approver.tenantProfile:id,user_id,position_key,department_id',
|
||||
'steps.approver.tenantProfile.department:id,name',
|
||||
]);
|
||||
|
||||
// 상태 필터
|
||||
if (! empty($params['status'])) {
|
||||
|
||||
Reference in New Issue
Block a user