@extends('layouts.backend') @section('title', 'Employee Status') @section('content')

{{ __('Employee Status Module') }}

@include('partials.flash')
{{ __('Reset') }}
@forelse($employees as $employee) @php($name = trim(($employee->first_name ?? '') . ' ' . ($employee->last_name ?? ''))) @php($managerName = trim(($employee->manager?->first_name ?? '') . ' ' . ($employee->manager?->last_name ?? ''))) @php($email = $employee->work_email ?: ($employee->personal_email ?: $employee->user?->email)) @empty @endforelse
{{ __('Employee') }} {{ __('Phone') }} {{ __('Email') }} {{ __('Blood Group') }} {{ __('Reports To') }} {{ __('Department / Designation / Grade') }} {{ __('Current Status') }} {{ __('Joined Date') }} {{ __('Termination Date') }} {{ __('Actions') }}
{{ $name !== '' ? $name : '-' }} ({{ $employee->employee_code }}) {{ $employee->phone ?: '-' }} {{ $email ?: '-' }} {{ $employee->blood_group ?: '-' }} {{ $managerName !== '' ? $managerName : '-' }}
{{ __('Dept:') }} {{ $employee->department?->name ?? '-' }}
{{ __('Desig:') }} {{ $employee->designation?->name ?? '-' }}
{{ __('Grade:') }} {{ $employee->salaryGrade?->grade_name ?? '-' }}
{{ __(ucwords(str_replace('_', ' ', $employee->employment_status))) }} {{ $employee->date_of_joining }} {{ $employee->termination_date ?? '-' }}
@if(auth()->user()?->hasPermission('employee.status-update')) {{ __('Status') }} @endif @if(auth()->user()?->hasPermission('employee.promotion-manage')) {{ __('Promotion') }} @endif @if(auth()->user()?->hasPermission('employee.rejoin-manage') && in_array($employee->employment_status, ['resigned', 'terminated', 'inactive'], true)) {{ __('Rejoin') }} @endif
{{ __('No employees found.') }}
{{ $employees->links('pagination::bootstrap-5') }}
@endsection