@php // Keep staff row actions aligned with the saved permissions. $canCreateStaff = \App\Support\AdminAccess::canAction('staff_management', 'create'); $canEditStaff = \App\Support\AdminAccess::canAction('staff_management', 'edit'); $canDeleteStaff = \App\Support\AdminAccess::canAction('staff_management', 'delete'); // Only the main admin should manage staff permissions. $canManageStaffPermissions = !session()->has('staff_id'); @endphp

{{ __('Staff Management') }}

{{ __('Manage your employees and payroll details') }}
@if($canCreateStaff) @endif
@if (session()->has('message'))
{{ session('message') }}
@endif
@forelse($all_staff as $item) @empty @endforelse
{{ __('Staff Name') }} {{ __('Designation') }} {{ __('Salary') }} {{ __('Phone') }} {{ __('Status') }} {{ __('Actions') }}
{{ strtoupper(mb_substr($item->display_name, 0, 1)) }}
{{ $item->display_name }}
{{ $item->designation }} Rs. {{ number_format($item->salary) }} {{ $item->phone ?? '-' }}
status == 'active' ? 'checked' : '' }}> {{ strtoupper($item->status) }}
@if($canEditStaff) @endif @if($canManageStaffPermissions) @endif @if($canDeleteStaff) @endif
{{ __('No staff members found.') }}
{{-- --}}