@extends('layouts.app') @section('title') {{ __('Quyền riêng') }} - {{ $account->username }} @endsection @section('section.header')
{{ __('Quay lại danh sách') }}

{{ $account->username }} {{ $roleLabel }}

@endsection @section('section.content')
@if (Session::has('success'))
{{ Session::get('success') }}
@endif @if (Session::has('error'))
{{ Session::get('error') }}
@endif @if (!empty($missing))
{{ __('Thiếu bản ghi permission:') }} {{ implode(', ', $missing) }}. {{ __('Hãy chạy php artisan migrate rồi tải lại trang.') }}
@endif
@csrf {{-- Đánh dấu form CÓ gửi bảng tích, để phân biệt với "bỏ tích hết" --}}
use_custom_permissions) ? 'checked' : '' }}>
{{ __('Bật: chỉ ăn theo bảng bên dưới, bỏ qua quyền chung của vai trò. Tắt: quay lại ăn theo quyền chung.') }}
@foreach ($groups as $group) @php $applicable = collect($group['items']) ->filter(fn ($i) => !empty($manageable[$i['name']])); @endphp @continue($applicable->isEmpty()) @foreach ($applicable as $item) @endforeach @endforeach
{{ __('Quyền / thao tác') }} {{ __('Quyền chung') }} {{ __('Riêng') }}
{{ $group['label'] }}
{{ $item['label'] }}
{{ $item['note'] }}
@if (!empty($roleGranted[$item['name']])) {{ __('Bật') }} @else {{ __('Tắt') }} @endif
use_custom_permissions) ? (!empty($directGranted[$item['name']]) ? 'checked' : '') : (!empty($roleGranted[$item['name']]) ? 'checked' : '') }}>
@endsection @section('styles') @endsection @section('scripts') @endsection