@extends('app-new') @push('head-script') @endpush @push('content-header') @endpush @push('prev-next-head')
@endpush @section('content')
@if ($hasComponents <= 0)
@endif
@if (isset($status))
@foreach ($status['messages'] as $m)
@endforeach
@endif
{{-- Card header: title + bulk actions --}}
Salary Master Listing
@if(!$isAllowedDefaultPayrollTemplate) Templates @endif Import Export
{{-- Toolbar: chips (left) + search + filter/reset (right) --}} @php $ctcStatus = request('ctc_status', 'active'); $asOf = request('as_of', now()->format('Y-m')); $refDate = \Carbon\Carbon::createFromFormat('Y-m', $asOf)->endOfMonth()->toDateString(); $baseQuery = array_diff_key(request()->query(), array_flip(['ctc_status', 'page', 'as_of'])); @endphp
Active Upcoming Expired All {{ $data->total() }} record(s) — as of {{ \Carbon\Carbon::parse($refDate)->format('M Y') }}
@foreach($data as $key => $value) @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 @endforeach
# Employee Template CTC Effective Period Created By Emp. Status Salary Status Action
@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 }} {{ ucfirst(@$value->employeeinfo->status) }} {{ $ctcBadgeStatus }}
{{-- /.table-responsive --}} {{ $data->appends($request->all())->links('pagination::bootstrap-4') }}
Filter
@endsection @push('footer-script') @endpush