feat: 테넌트 정보 모달 팝업 기능 추가
- 테넌트 row 클릭 시 모달 팝업 표시 - 컨텍스트 메뉴 (우클릭) 지원 - 탭 구조: 구독정보, 사용자, 부서, 역할, 메뉴 - 메뉴 탭 트리 구조 접기/펼치기 기능 - 삭제된 테넌트 경고 배너 (삭제일, 삭제자 표시) - 복원 버튼으로 즉시 복원 및 모달 새로고침 - 액션 버튼 (수정/삭제) 클릭 시 모달 미표시
This commit is contained in:
@@ -205,4 +205,111 @@ public function stats(Request $request): JsonResponse
|
||||
'data' => $stats,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 테넌트 모달 정보 조회
|
||||
*/
|
||||
public function modal(Request $request, int $id): JsonResponse
|
||||
{
|
||||
$tenant = $this->tenantService->getTenantForModal($id);
|
||||
|
||||
if (! $tenant) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => '테넌트를 찾을 수 없습니다.',
|
||||
], 404);
|
||||
}
|
||||
|
||||
$html = view('tenants.partials.modal-info', compact('tenant'))->render();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'html' => $html,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 테넌트 사용자 탭 데이터
|
||||
*/
|
||||
public function users(Request $request, int $id): JsonResponse
|
||||
{
|
||||
$users = $this->tenantService->getTenantUsers($id);
|
||||
|
||||
$html = view('tenants.partials.modal-users', compact('users'))->render();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'html' => $html,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 테넌트 부서 탭 데이터
|
||||
*/
|
||||
public function departments(Request $request, int $id): JsonResponse
|
||||
{
|
||||
$departments = $this->tenantService->getTenantDepartments($id);
|
||||
|
||||
$html = view('tenants.partials.modal-departments', compact('departments'))->render();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'html' => $html,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 테넌트 역할 탭 데이터
|
||||
*/
|
||||
public function roles(Request $request, int $id): JsonResponse
|
||||
{
|
||||
$roles = $this->tenantService->getTenantRoles($id);
|
||||
|
||||
$html = view('tenants.partials.modal-roles', compact('roles'))->render();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'html' => $html,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 테넌트 메뉴 탭 데이터
|
||||
*/
|
||||
public function menus(Request $request, int $id): JsonResponse
|
||||
{
|
||||
$menus = $this->tenantService->getTenantMenus($id);
|
||||
|
||||
$html = view('tenants.partials.modal-menus', compact('menus'))->render();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'html' => $html,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 테넌트 구독 정보 탭 데이터
|
||||
*/
|
||||
public function subscription(Request $request, int $id): JsonResponse
|
||||
{
|
||||
$tenant = $this->tenantService->getTenantForModal($id);
|
||||
|
||||
if (! $tenant) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => '테넌트를 찾을 수 없습니다.',
|
||||
], 404);
|
||||
}
|
||||
|
||||
$subscription = $this->tenantService->getTenantSubscription($id);
|
||||
$usage = $this->tenantService->getTenantUsage($id);
|
||||
|
||||
$html = view('tenants.partials.modal-subscription', compact('tenant', 'subscription', 'usage'))->render();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'html' => $html,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user