Revert "fix: [tenant-console] 테넌트 콘솔 분리작업"
This reverts commit 8da1702e
This commit is contained in:
@@ -55,4 +55,23 @@ public function edit(int $id): View
|
||||
return view('tenants.edit', compact('tenant', 'displayCompanyName'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 테넌트 전환 (기존 기능 유지)
|
||||
*/
|
||||
public function switch(Request $request)
|
||||
{
|
||||
$tenantId = $request->input('tenant_id');
|
||||
|
||||
if ($tenantId === 'all') {
|
||||
// "전체 보기" 대신 사용자의 HQ 테넌트로 설정
|
||||
$hqTenant = auth()->user()->getHQTenant();
|
||||
if ($hqTenant) {
|
||||
$request->session()->put('selected_tenant_id', $hqTenant->id);
|
||||
}
|
||||
} else {
|
||||
$request->session()->put('selected_tenant_id', $tenantId);
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user