@extends('layouts.app') @section('title', 'My Portal') @section('content')

Welcome, {{ $staff->first_name }}

Your leave balances, payslips and statutory tax documents in one place.
Apply for leave Payslips
@include('my._nav') @if($onLeave)
You are currently on {{ $onLeave->type?->name ?? 'leave' }} until {{ $onLeave->end_date?->format('d M Y') }}.
@endif

Leave balances

Live balances for {{ current_year() }} after pending and approved leave.
@forelse($balances as $balance) @php $total = (float) $balance->entitled + (float) $balance->carried_over; $available = \App\Support\LeaveService::availableDays($balance); $width = $total > 0 ? max(0, min(100, ($available / $total) * 100)) : 0; $tone = !$balance->type?->paid ? '#b45309' : '#0f5e54'; @endphp
{{ $balance->type?->name ?? 'Leave' }}
{{ num($balance->used, 1) }} used · {{ num($balance->pending, 1) }} pending @if(!$balance->type?->paid) · unpaid @endif
{{ num($available, 1) }}
{{ num($total, 1) }} day entitlement @if($balance->carried_over > 0)· {{ num($balance->carried_over, 1) }} carried over @endif
@empty @endforelse

Recent leave requests

Latest applications and their approval status.
@forelse($requests as $leave) @empty @endforelse
RequestTypeDatesDaysStatus
{{ $leave->request_no }} {{ $leave->type?->name ?? '—' }} {{ $leave->start_date?->format('d M') }} – {{ $leave->end_date?->format('d M Y') }} {{ num($leave->days, 1) }}

My details

Employment record
{{ $staff->full_name }}
{{ $staff->staff_no ?: 'No staff number' }}
Role{{ \App\Support\Permissions::label($staff->role) }}
Employment{{ $staff->employment_type ?: '—' }}
Department{{ $staff->category ?: '—' }}
Date joined{{ $staff->date_joined?->format('d M Y') ?? '—' }}
KRA PIN{{ $staff->kra_pin ?: '—' }}
NSSF{{ $staff->nssf_no ?: '—' }}
SHIF / NHIF{{ $staff->nhif_no ?: '—' }}

Next public holiday

Leave days exclude holidays
@if($nextHoliday)
{{ $nextHoliday->name }}
{{ $nextHoliday->date?->format('l, d M Y') }}
@else
No upcoming public holidays captured for this year.
@endif

Latest payslips

Download or view your pay
@forelse($payslips as $payslip)
{{ $payslip->run?->period ?? 'Payslip' }} {{ $payslip->payslip_no }} {{ money($payslip->net) }}
@empty @endforelse
@endsection