UI 개선: 테넌트 선택 헤더 이동 및 역할 권한 관리 개선
- 테넌트 선택을 각 페이지에서 헤더로 통합 이동 - 페이지 제목 이모지 제거 및 상단 여백(mt-6) 축소 - 역할 권한 관리 페이지 레이아웃을 다른 페이지와 통일 - 메뉴명 스타일 개선 (depth 들여쓰기, └ 기호 적용) - 상위 메뉴 컬럼 제거로 테이블 간소화 - RolePermissionService에 depth 계산 로직 추가 - pagination.js를 body 끝으로 이동하여 로딩 오류 해결 - 역할 선택 UI를 셀렉트박스에서 버튼 형태로 변경 - 역할 버튼 hover 효과 개선 (선택된 버튼 가독성 향상) 변경된 파일: - resources/views/partials/header.blade.php: 테넌트 선택 UI 추가 - resources/views/dashboard|menus|users|departments|permissions|roles/index.blade.php: tenant-selector 제거, 여백 축소 - resources/views/layouts/app.blade.php: pagination.js 위치 변경 - app/Services/RolePermissionService.php: depth 계산 로직 추가 - resources/views/role-permissions/: 역할 권한 관리 페이지 개선 - routes/web.php, routes/api.php: 역할 권한 관리 라우트 추가
This commit is contained in:
@@ -1,10 +1,52 @@
|
||||
<!-- Header -->
|
||||
<header class="bg-white shadow-sm h-16 flex items-center justify-between px-6 border-b border-gray-200">
|
||||
<!-- Page Title (좌측) -->
|
||||
<div>
|
||||
<h1 class="text-2xl font-semibold text-gray-900">
|
||||
@yield('page-title', '대시보드')
|
||||
</h1>
|
||||
<!-- Tenant Selector (좌측) -->
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<svg class="w-5 h-5 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
|
||||
</svg>
|
||||
<label for="tenant-select" class="text-sm font-medium text-gray-700">테넌트 선택:</label>
|
||||
</div>
|
||||
|
||||
<form action="{{ route('tenant.switch') }}" method="POST" id="tenant-switch-form">
|
||||
@csrf
|
||||
<select
|
||||
name="tenant_id"
|
||||
id="tenant-select"
|
||||
onchange="document.getElementById('tenant-switch-form').submit()"
|
||||
class="border-gray-300 rounded-lg text-sm focus:ring-primary focus:border-primary min-w-[200px]"
|
||||
>
|
||||
<option value="all" {{ session('selected_tenant_id') === null ? 'selected' : '' }}>
|
||||
전체 보기
|
||||
</option>
|
||||
@if($globalTenants->isNotEmpty())
|
||||
<option disabled>─────────</option>
|
||||
@endif
|
||||
@foreach($globalTenants as $tenant)
|
||||
<option value="{{ $tenant->id }}" {{ session('selected_tenant_id') == $tenant->id ? 'selected' : '' }}>
|
||||
{{ $tenant->company_name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<!-- 현재 테넌트 정보 -->
|
||||
@if(session('selected_tenant_id'))
|
||||
@php
|
||||
$currentTenant = $globalTenants->firstWhere('id', session('selected_tenant_id'));
|
||||
@endphp
|
||||
@if($currentTenant)
|
||||
<span class="inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-primary/10 text-primary">
|
||||
<svg class="w-4 h-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
{{ $currentTenant->company_name }}
|
||||
</span>
|
||||
@endif
|
||||
@else
|
||||
<span class="text-xs text-gray-500">전체</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Right Side Actions -->
|
||||
|
||||
Reference in New Issue
Block a user