From c20624ad0d1bd5cbc3646d87cc8eda94b99596f4 Mon Sep 17 00:00:00 2001 From: pro Date: Wed, 28 Jan 2026 20:54:39 +0900 Subject: [PATCH] =?UTF-8?q?fix:=ED=85=8C=EB=84=8C=ED=8A=B8=20=EC=A0=84?= =?UTF-8?q?=ED=99=98=20=EC=8B=9C=20user=5Ftenants=EC=97=90=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 전환한 사용자를 새 테넌트에 자동 연결 - 대시보드에서 관리 테넌트로 표시되도록 함 Co-Authored-By: Claude Opus 4.5 --- app/Services/Sales/TenantProspectService.php | 7 +++++++ 1 file changed, 7 insertions(+) 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,