Files
sam-manage/resources/views/roles/partials/table.blade.php
hskwon 0c86b390ad feat: 사용자 관리 기능 및 MNG 문서 추가
- MNG_CRITICAL_RULES.md: DB 마이그레이션 금지 등 핵심 규칙
- UserController: 사용자 CRUD API 엔드포인트
- StoreUserRequest, UpdateUserRequest: 사용자 검증
- 사용자 관리 뷰: index, create, edit, table
- 시스템 관리 메뉴 UI 개선 (테이블 헤더 스타일)
- docs/INDEX.md: CRITICAL_RULES 링크 추가
2025-11-24 18:49:02 +09:00

58 lines
2.7 KiB
PHP

<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-sm font-semibold text-gray-700 uppercase tracking-wider">ID</th>
<th class="px-6 py-3 text-left text-sm font-semibold text-gray-700 uppercase tracking-wider">역할 이름</th>
<th class="px-6 py-3 text-left text-sm font-semibold text-gray-700 uppercase tracking-wider">설명</th>
<th class="px-6 py-3 text-center text-sm font-semibold text-gray-700 uppercase tracking-wider">권한 </th>
<th class="px-6 py-3 text-left text-sm font-semibold text-gray-700 uppercase tracking-wider">생성일</th>
<th class="px-6 py-3 text-right text-sm font-semibold text-gray-700 uppercase tracking-wider">액션</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
@forelse($roles as $role)
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
{{ $role->id }}
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">{{ $role->name }}</div>
</td>
<td class="px-6 py-4">
<div class="text-sm text-gray-500">{{ $role->description ?? '-' }}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-center text-gray-900">
{{ $role->permissions_count ?? 0 }}
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
{{ $role->created_at?->format('Y-m-d') ?? '-' }}
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="{{ route('roles.edit', $role->id) }}"
class="text-blue-600 hover:text-blue-900 mr-3">
수정
</a>
<button onclick="confirmDelete({{ $role->id }}, '{{ $role->name }}')"
class="text-red-600 hover:text-red-900">
삭제
</button>
</td>
</tr>
@empty
<tr>
<td colspan="6" class="px-6 py-12 text-center text-gray-500">
등록된 역할이 없습니다.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<!-- 페이지네이션 -->
@include('partials.pagination', [
'paginator' => $roles,
'target' => '#role-table',
'includeForm' => '#filterForm'
])