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

{{ __('Employee Service Length') }}

{{ __('Tenure, joining dates, and upcoming work anniversaries for all employees.') }}

{{ __('Active employees') }}
{{ $stats['total'] }}
{{ $hasFilters ? __('Matching') : __('Total employees') }}
{{ $stats['upcoming30'] }}
{{ __('Anniversary ≤ 30 days') }}
{{ $stats['thisMonth'] }}
{{ __('Joined this month') }}
{{ __('Age / service length') }} @if($hasFilters) {{ __('Clear filters') }} @endif
@unless(\App\Support\BranchWiseFeature::appliesToUser())
@endunless
@forelse($staffs as $staff) @php $daysUntil = $staff->joing_date ? (int) work_anniversary($staff->joing_date) : null; @endphp @empty @endforelse
{{ __('Employee code') }} {{ __('Name') }} {{ __('Branch') }} {{ __('Designation') }} {{ __('Joining date') }} {{ __('Service length') }} {{ __('Work anniversary') }}
{{ $staff->displaySid() }}
{{ $staff->user->name }}
{{ $staff->user->id }}
{{ $staff->warehouse?->name ?? '—' }} {{ $staff->designation?->name ?? '—' }} @if($staff->joing_date) {{ $staff->joing_date->format('Y-m-d') }} @else — @endif {{ services_length($staff->joing_date) }} @if($daysUntil === null) — @elseif($daysUntil === 0) {{ __('Today') }} @elseif($daysUntil <= 30) {{ __('In :days days', ['days' => $daysUntil]) }} @else {{ __('In :days days', ['days' => $daysUntil]) }} @endif
{{ $hasFilters ? __('No employees match your filters.') : __('No employees found.') }}
@if($staffs->hasPages()) @endif
@endsection