fix:개발 승인 화면에서 가망고객 정보 매핑 지원
- tenantProspect 관계 eager loading 추가 - tenant가 없으면 tenantProspect에서 정보 가져오기 - 업체명: company_name - 사업자번호: business_number - 대표자: ceo_name (prospect) / representative_name (tenant) - 연락처: contact_phone (prospect) / phone (tenant) - 주소: address - pending/progress/completed/detail 모든 화면 수정 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -65,7 +65,7 @@ public function getStats(): array
|
||||
public function getPendingApprovals(?string $search = null, int $perPage = 10): LengthAwarePaginator
|
||||
{
|
||||
$query = SalesTenantManagement::query()
|
||||
->with(['tenant', 'salesPartner.user', 'manager'])
|
||||
->with(['tenant', 'tenantProspect', 'salesPartner.user', 'manager'])
|
||||
->where('sales_progress', 100)
|
||||
->where('manager_progress', 100)
|
||||
->where('hq_status', SalesTenantManagement::HQ_STATUS_PENDING);
|
||||
@@ -96,7 +96,7 @@ public function getInProgressItems(?string $search = null, int $perPage = 10): L
|
||||
];
|
||||
|
||||
$query = SalesTenantManagement::query()
|
||||
->with(['tenant', 'salesPartner.user', 'manager'])
|
||||
->with(['tenant', 'tenantProspect', 'salesPartner.user', 'manager'])
|
||||
->where('sales_progress', 100)
|
||||
->where('manager_progress', 100)
|
||||
->whereIn('hq_status', $progressStatuses);
|
||||
@@ -118,7 +118,7 @@ public function getInProgressItems(?string $search = null, int $perPage = 10): L
|
||||
public function getCompletedItems(?string $search = null, int $perPage = 10): LengthAwarePaginator
|
||||
{
|
||||
$query = SalesTenantManagement::query()
|
||||
->with(['tenant', 'salesPartner.user', 'manager'])
|
||||
->with(['tenant', 'tenantProspect', 'salesPartner.user', 'manager'])
|
||||
->where('hq_status', SalesTenantManagement::HQ_STATUS_HANDOVER);
|
||||
|
||||
// 검색
|
||||
@@ -233,6 +233,7 @@ public function getDetail(int $id): SalesTenantManagement
|
||||
{
|
||||
return SalesTenantManagement::with([
|
||||
'tenant',
|
||||
'tenantProspect',
|
||||
'salesPartner.user',
|
||||
'manager',
|
||||
'contractProducts.product',
|
||||
|
||||
Reference in New Issue
Block a user