diff --git a/app/Services/Sales/TenantProspectService.php b/app/Services/Sales/TenantProspectService.php index a8d0aa2a..a4a0c021 100644 --- a/app/Services/Sales/TenantProspectService.php +++ b/app/Services/Sales/TenantProspectService.php @@ -119,6 +119,13 @@ public function convertToTenant(TenantProspect $prospect, int $convertedBy): Ten 'tenant_type' => 'STD', // STD = Standard (일반 고객) ]); + // 전환한 사용자를 테넌트에 연결 (user_tenants) + $tenant->users()->attach($convertedBy, [ + 'is_active' => true, + 'is_default' => false, + 'joined_at' => now(), + ]); + // 영업권 상태 업데이트 $prospect->update([ 'status' => TenantProspect::STATUS_CONVERTED,