{{-- resources/views/components/admin/permission-row.blade.php --}} {{-- One row in the permissions modal: module name + 4 CRUD checkboxes --}} {{-- The data-module attribute holds the exact permission prefix (e.g. 'page-metas') --}} {{-- JS reads data-module to build the permission key, NOT the display text --}} {{-- Props: module (string), permissions (array of granted permission names) --}} @props([ 'module' => '', 'permissions' => [], ]) @php $displayNames = [ 'categories' => 'Categories', 'countries' => 'Countries', 'destinations'=> 'Destinations', 'hotels' => 'Hotels', 'flights' => 'Flights', 'brands' => 'Brands', 'products' => 'Products', 'banners' => 'Banners', 'faqs' => 'FAQs', 'page-metas' => 'Page META / SEO', 'support' => 'Support Tickets', 'users' => 'Users', ]; $displayName = $displayNames[$module] ?? ucwords(str_replace('-', ' ', $module)); @endphp {{-- data-module stores the exact module key for JS to use --}} {{ $displayName }} @foreach(['view','create','edit','delete'] as $action) @endforeach