@section('title', get_setting('site_name') . ' | Employee History') @push('css') @endpush

Employee History

Profile, salary, branch tenure, loans (PF / GF / SWF / Advance Salary), promotions, and assets.

Personal Information
Name
{{ $staff->user?->name ?? '—' }}
User Id
{{ $staff->user_id }}
Email
{{ $staff->user?->email ?? '—' }}
Phone
{{ $staff->user?->phone ?? '—' }}
Branch
{{ $staff->warehouse?->name ?? '—' }}
@if(!empty($branchSummary['current']))
Joined Current Branch
{{ $branchSummary['current']->joined_at?->format('Y-m-d') ?? '—' }}
Days in Current Branch
@if($branchSummary['current']->hasStarted()) {{ $branchSummary['current_days'] }} ({{ $branchSummary['current']->durationLabel() }}) @else {{ $branchSummary['current']->durationLabel() }} @endif
@endif @if(!empty($branchSummary['previous']))
Previous Branch
{{ $branchSummary['previous']->branch?->name ?? '—' }} · {{ $branchSummary['previous_days'] }} days
@endif
Department
{{ $staff->department?->name ?? '—' }}
Designation
{{ $staff->designation?->name ?? '—' }}
Security Money
{{ $staff->security_money !== null ? number_format((float) $staff->security_money, 2) : '—' }}
Current Salary Setup
@if($salarySetup)
Basic
{{ number_format((float) $salarySetup->basic_salary, 2) }}
Gross
{{ number_format((float) $salarySetup->gross_salary, 2) }}
Net
{{ number_format((float) $salarySetup->net_salary, 2) }}
House Rent
{{ number_format((float) $salarySetup->house_rent, 2) }}
Medical
{{ number_format((float) $salarySetup->medical, 2) }}
Conveyance
{{ number_format((float) $salarySetup->conveyance, 2) }}
@else
No Salary Setup Found For This Employee.
@endif
Salary Reviews (Latest 50) Open Salary Reviews
@if($salaryReviews->isEmpty())
No salary review records
@else
@foreach($salaryReviews as $r) @endforeach
Recorded Effective Review Type Increment Status By Action
{{ $r->created_at?->format('Y-m-d H:i') }} {{ $r->effective_date?->format('Y-m-d') ?? '—' }} {{ $r->review_type ?? '—' }} {{ $r->increment_mode ? ucfirst($r->increment_mode) : '—' }} {{ $r->increment_value !== null ? number_format((float) $r->increment_value, 2) : '' }} @if($r->status === \App\Models\SalaryReview::STATUS_APPROVED) Applied @elseif($r->status === \App\Models\SalaryReview::STATUS_REJECTED) Rejected @else Pending @endif {{ $r->createdBy?->name ?? '—' }} View
@endif
Promotion History (Latest 50)
@if($promotions->isEmpty())
No promotion records
@else
@foreach($promotions as $p) @endforeach
Recorded Effective Designation Department Reason By
{{ $p->created_at?->format('Y-m-d H:i') }} {{ $p->effective_date?->format('Y-m-d') ?? '—' }} {{ $p->fromDesignation?->name ?? '—' }} → {{ $p->toDesignation?->name ?? '—' }} {{ $p->fromDepartment?->name ?? '—' }} → {{ $p->toDepartment?->name ?? '—' }} {{ $p->reason ? \Illuminate\Support\Str::limit($p->reason, 160) : '—' }} {{ $p->createdBy?->name ?? '—' }}
@endif
Branch Tenure History
@if($branchTenures->isEmpty())
No branch tenure records
@else
@foreach($branchTenures as $tenure) @endforeach
Branch Joined Left Duration Status
{{ $tenure->branch?->name ?? '—' }} {{ $tenure->joined_at?->format('Y-m-d') ?? '—' }} {{ $tenure->isCurrent() ? 'Present' : ($tenure->left_at?->format('Y-m-d') ?? '—') }} @if($tenure->hasStarted()) {{ $tenure->durationLabel() }} ({{ $tenure->durationDays() }} days) @else {{ $tenure->durationLabel() }} @endif @if($tenure->isCurrent()) Current @else Past @endif
@endif
Current Loans & Outstanding
@if($loanHistory['pf']['enabled'])
Provident Fund (PF)
{{ number_format($loanHistory['pf']['outstanding'], 2) }}
Balance {{ number_format($loanHistory['pf']['balance'], 2) }} · {{ $loanHistory['pf']['current']->count() }} active
@endif @if($loanHistory['gf']['enabled'])
Gratuity Fund (GF)
{{ number_format($loanHistory['gf']['outstanding'], 2) }}
Balance {{ number_format($loanHistory['gf']['balance'], 2) }} · {{ $loanHistory['gf']['current']->count() }} active
@endif @if($loanHistory['swf']['enabled'])
Staff Welfare Fund (SWF)
{{ number_format($loanHistory['swf']['outstanding'], 2) }}
Balance {{ number_format($loanHistory['swf']['balance'], 2) }} · {{ $loanHistory['swf']['current']->count() }} active
@endif
Advance Salary
{{ number_format($loanHistory['advance_salary']['outstanding'], 2) }}
{{ $loanHistory['advance_salary']['current']->count() }} active schedule(s)
@if($loanHistory['pf']['enabled'])
PF Loan History Balance {{ number_format($loanHistory['pf']['balance'], 2) }}
@if($loanHistory['pf']['history']->isEmpty())
No PF loan records
@else
@include('livewire.hr.partials.fund-loan-table', ['loans' => $loanHistory['pf']['history']])
@endif
@endif @if($loanHistory['gf']['enabled'])
GF Loan History Balance {{ number_format($loanHistory['gf']['balance'], 2) }}
@if($loanHistory['gf']['history']->isEmpty())
No GF loan records
@else
@include('livewire.hr.partials.fund-loan-table', ['loans' => $loanHistory['gf']['history']])
@endif
@endif @if($loanHistory['swf']['enabled'])
SWF Loan History Balance {{ number_format($loanHistory['swf']['balance'], 2) }}
@if($loanHistory['swf']['history']->isEmpty())
No SWF loan records
@else
@include('livewire.hr.partials.fund-loan-table', ['loans' => $loanHistory['swf']['history']])
@endif
@endif
Advance Salary History
@if($loanHistory['advance_salary']['history']->isEmpty())
No advance salary records
@else
@foreach($loanHistory['advance_salary']['history'] as $advance) @endforeach
Applied Amount Paid Remaining Duration Status Reason
{{ $advance->apply_date ? \Carbon\Carbon::parse($advance->apply_date)->format('Y-m-d') : ($advance->created_at?->format('Y-m-d') ?? '—') }} {{ number_format((float) $advance->amount, 2) }} {{ number_format((float) $advance->paid_amount, 2) }} {{ number_format((float) $advance->remaining_amount, 2) }} {{ $advance->duration }} mo @if((int) $advance->status !== 1) Pending @elseif($advance->remaining_amount > 0) Active @else Closed @endif {{ $advance->reason ? \Illuminate\Support\Str::limit($advance->reason, 120) : '—' }}
@endif
Asset History (Latest 100)
@if($assetHistory->isEmpty())
No asset records
@else
@foreach($assetHistory as $a) @endforeach
Recorded Assign Date Asset Category Qty Status Return Description
{{ $a->created_at?->format('Y-m-d H:i') }} {{ $a->assign_date ? \Carbon\Carbon::parse($a->assign_date)->format('Y-m-d') : '—' }} {{ $a->asset_item?->name ?? '—' }} {{ $a->asset_category?->name ?? '—' }} {{ $a->qty }} {{ (int) $a->status === 1 ? 'Active' : 'Inactive' }} {{ (int) $a->return === 1 ? 'Returned' : 'Not Returned' }} {{ $a->description ? \Illuminate\Support\Str::limit($a->description, 160) : '—' }}
@endif