@props(['loan', 'compact' => false]) @php $steps = $loan->timelineSteps(); $progress = $loan->durationProgressPercent(); $daysLeft = $loan->daysRemaining(); $interest = $loan->interestSummary(); $startAt = $loan->disbursement_date ?? $loan->approval_date ?? $loan->application_date; $maturityAt = $loan->maturity_date ? $loan->maturity_date->copy()->endOfDay() : null; $startIso = $startAt?->toIso8601String(); $maturityIso = $maturityAt?->toIso8601String(); $countdownTone = $daysLeft === null ? 'navy' : ($daysLeft < 0 ? 'danger' : ($daysLeft <= 30 ? 'warn' : 'ok')); @endphp
Loan duration {{ $loan->tenor_months }} months @if($loan->disbursement_date && $loan->maturity_date) · {{ $loan->disbursement_date->format('d M Y') }} → {{ $loan->maturity_date->format('d M Y') }} 23:59 @elseif($loan->maturity_date) · matures {{ $loan->maturity_date->format('d M Y') }} 23:59 @endif
@if($maturityIso)
@if($daysLeft !== null && $daysLeft < 0) Overdue @else Time remaining @endif
days : hrs : min : sec
@endif {{ number_format($progress, 0) }}% elapsed
    @foreach($steps as $step) @php $stepDate = !empty($step['date']) ? \Illuminate\Support\Carbon::parse($step['date']) : null; $isMaturity = ($step['key'] ?? '') === 'maturity'; if ($stepDate && $isMaturity) { $stepDate = $stepDate->copy()->endOfDay(); } @endphp
  1. {{ $step['label'] }} @if($stepDate) {{ $stepDate->format('d M Y') }} {{ $stepDate->format('H:i') }} @else — @endif
  2. @endforeach
Rate {{ rtrim(rtrim(number_format($interest['rate'], 2), '0'), '.') }}% {{ $interest['method'] ? '· '.ucfirst($interest['method']) : '' }}
Interest accrued {{ money($interest['accrued_estimate']) }}
Interest paid {{ money($interest['paid']) }}
Interest outstanding {{ money($interest['outstanding']) }}
@once @endonce