@extends('layouts.template.main') @push('styles') @endpush @section('title', 'Quản lý hiển thị') @section('content')
{{-- Toast alerts --}} @if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif {{-- Thông tin --}}
Hướng dẫn: Tick chọn các ô tương ứng để cho phép vai trò đó nhìn thấy cột trên bảng Project Follow. Nếu bỏ chọn, cột đó sẽ tự động bị ẩn đi khi tài khoản có vai trò tương ứng truy cập. Admin luôn hiển thị đầy đủ tất cả các cột. Sau khi chỉnh sửa, bấm "Lưu hiển thị" để áp dụng ngay.
Bảng phân quyền hiển thị cột
Cột = Vai trò  |  Hàng = Cột hiển thị trên bảng
@foreach ($roles as $roleKey => $roleName) @php $roleClass = strtolower($roleName); @endphp {{ $roleName }} @endforeach
{{-- Bulk action bar --}}
Chọn nhanh: @foreach ($roles as $roleKey => $roleName) @if ($roleKey !== 'Admin') @endif @endforeach
@csrf {{-- Scroll hint chỉ hiện trên mobile --}}
Vuốt ngang để xem đủ các vai trò
@foreach ($roles as $roleKey => $roleName) @endforeach @foreach ($columnDefinitions as $groupKey => $group) {{-- Header nhóm --}} @foreach ($group['items'] as $colKey => $colInfo) @foreach ($roles as $roleKey => $roleName) @php $isAdmin = $roleKey === 'Admin'; $isChecked = $isAdmin || (!empty($matrix[$roleKey][$colKey])); @endphp @endforeach @endforeach @endforeach
Cột hiển thị trên bảng @if ($roleKey === 'Admin')
{{ $roleName }} Toàn bộ
@else
{{ $roleName }}
@endif
{{ $group['title'] }}
{{ $colInfo['label'] }} {{ $colInfo['desc'] }}
@if ($isAdmin) {{-- Admin: luôn checked, disabled, ẩn input --}} @else @endif
{{-- end perm-table-scroll-wrap --}} {{-- Footer actions --}}
{{-- Toast container --}}
{{-- Confirm reset modal --}} @push('scripts') @endpush @endsection