@extends('app-new') @push('head-script') @endpush @push('content-header')
@endpush @push('prev-next-head')| # | Employee | Template | CTC | Effective Period | Created By | Emp. Status | Salary Status | Action | @foreach($data as $key => $value)
|---|---|---|---|---|---|---|---|---|
| @if (isset($_GET['page']) && $_GET['page'] > 0) {{ ($_GET['page'] - 1) * 10 + $loop->iteration }} @else {{ $loop->iteration }} @endif |
{{ @$value->employeeinfo->name }}
{{ @$value->employeeinfo->employee_code }} |
{{ @$value->templateinfo->name }} | {{ @$value->ctc_amount }} | {{ $value->effective_from ? \Carbon\Carbon::parse($value->effective_from)->format('d M Y') : '' }} – {{ $value->effective_to ? \Carbon\Carbon::parse($value->effective_to)->format('d M Y') : 'Present' }} | {{ @$value->createdBy->name }} | @php $empActive = @$value->employeeinfo->status === 'active'; $effectiveFrom = $value->effective_from ? \Carbon\Carbon::parse($value->effective_from)->toDateString() : null; $effectiveTo = $value->effective_to ? \Carbon\Carbon::parse($value->effective_to)->toDateString() : null; $isExpired = $effectiveTo && $effectiveTo < $refDate; $isUpcoming = $effectiveFrom && $effectiveFrom > $refDate; $ctcBadgeStatus = $isExpired ? 'Expired' : ($isUpcoming ? 'Upcoming' : 'Active'); $badgeClass = $isExpired ? 'secondary' : ($isUpcoming ? 'primary' : 'success'); @endphp{{ ucfirst(@$value->employeeinfo->status) }} | {{ $ctcBadgeStatus }} |
|