@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Active Employees')) @push('css') @endpush @section('content') @include('admin.staff.partials.list_styles')
@if(\App\Support\BranchWiseFeature::missingBranchAssignment())
{{ __('Your branch is not assigned. Contact HQ admin to assign a warehouse/branch.') }}
@endif

{{ __('Active Employees') }}

{{ __('Browse, filter, and manage currently active staff records.') }}

{{ __('Inactive') }}
@foreach(request()->only(\App\Services\StaffListQuery::filterKeys()) as $key => $value) @if($value !== null && $value !== '' && $key !== 'mask_pii') @endif @endforeach
@can('User-create') {{ __('Add Employee') }} @endcan
{{ $staffs->total() }}
{{ __('Total active') }}
{{ $staffs->count() }}
{{ __('This page') }}
{{ __('Employee list') }} @if($hasFilters ?? false) {{ __('Clear filters') }} @endif
@unless(\App\Support\BranchWiseFeature::appliesToUser())
@endunless
@php $shown = 0; @endphp @foreach($staffs as $staff) @if($staff->user != null && $staff->user->is_active != 0) @php $shown++; @endphp @endif @endforeach @if($shown === 0) @endif
{{ __('SID') }} {{ __('Name') }} {{ __('Designation') }} {{ __('Branch') }} {{ __('Joined') }} {{ __('Branch join') }} {{ __('Phone') }} {{ __('Active') }} {{ __('Actions') }}
{{ $staff->displaySid() }}
{{ $staff->user->name }}
{{ $staff->user->id }}
{{ $staff->designation?->name ?? '—' }} {{ $staff->warehouse?->name ?? '—' }} {{ $staff->joing_date?->format('Y-m-d') ?? '—' }} {{ $staff->branchJoinDateDisplay() ?? '—' }} {{ $staff->mobile_no ?: ($staff->user->phone ?? '—') }} @if($staff->user_id != auth()->user()->id) @can('User-approve') @endcan @else @endif
@can('User-edit') @endcan @can('User-list') @endcan
{{ ($hasFilters ?? false) ? __('No employees match your filters.') : __('No active employees found.') }}
@if($staffs->hasPages()) @endif
@endsection @section('script') @endsection