@extends('admin.admin_dashboard') @section('admin')
Clear
Salary Increment History
@forelse($histories as $i => $history) @php $props = is_array($history->properties) ? $history->properties : $history->properties?->toArray(); $employeeName = data_get($props, 'employee_name', optional($history->subject)->name ?? 'N/A'); $effective = data_get($props, 'effective_month', '-'); $type = data_get($props, 'increment_type', '-'); $value = (float) data_get($props, 'increment_value', 0); $oldSalary = (float) data_get($props, 'old_salary', 0); $newSalary = (float) data_get($props, 'new_salary', 0); $delta = (float) data_get($props, 'delta', 0); $reason = data_get($props, 'reason', '-'); @endphp @empty @endforelse
# Date Employee Effective Month Type Value Old Salary New Salary Change Reason By
{{ $histories->firstItem() + $i }} {{ optional($history->created_at)->format('d M Y, h:i A') }} {{ $employeeName }} {{ $effective }} {{ ucfirst($type) }} {{ number_format($value, 2) }}{{ $type === 'percent' ? '%' : '' }} {{ number_format($oldSalary, 2) }} {{ number_format($newSalary, 2) }} {{ number_format($delta, 2) }} {{ $reason }} {{ optional($history->causer)->name ?? 'System' }}
No increment history found.
@if($histories->hasPages()) @endif
@endsection