fix:테넌트 전환 시 user_tenants에 자동 연결
- 전환한 사용자를 새 테넌트에 자동 연결 - 대시보드에서 관리 테넌트로 표시되도록 함 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user