@extends('layouts.admin') @section('title', 'Role Permissions') @section('page-title', 'Role & Permission Management') @section('page-subtitle', 'Control what each staff role can access and do') @section('content') @php $roleLabels = [ 'admin' => ['label'=>'Administrator', 'color'=>'red'], 'manager' => ['label'=>'Manager', 'color'=>'purple'], 'cashier' => ['label'=>'Cashier', 'color'=>'blue'], 'agent' => ['label'=>'Field Agent', 'color'=>'green'], 'loan_officer' => ['label'=>'Loan Officer', 'color'=>'yellow'], 'pos' => ['label'=>'POS Operator', 'color'=>'indigo'], 'auditor' => ['label'=>'Auditor', 'color'=>'pink'], ]; $actions = ['can_view'=>'View', 'can_create'=>'Create', 'can_edit'=>'Edit', 'can_delete'=>'Delete', 'can_approve'=>'Approve']; @endphp
{{ $info['label'] }}
@php $count = isset($permissions[$roleKey]) ? $permissions[$roleKey]->where('can_view', true)->count() : 0; @endphp{{ $count }} modules accessible