@php $name = $profile['full_name'] ?? 'Student'; $studentId = $profile['upsi_id'] ?? ''; $rolePath = 'student'; $portal = 'STUDENT PORTAL'; $displayRole = 'Student'; $defaultTotal = 100; $total = (float)($allocation['total_amount'] ?? 100); $used = (float)($allocation['used_amount'] ?? 0); $balance = (float)($allocation['balance_amount'] ?? ($total - $used)); $isFullyUsed = $total > 0 && $balance <= 0; @endphp Book Appointment - Student

Book Appointment — Step 1 of 4

{{ now()->format('D, d M Y') }}

Select Patient

This appointment will be booked under your student profile.

1
Select Patient
2
Appointment Type
3
Choose Date
4
Select Time
Please make sure your student profile information is correct before continuing with the booking.
@csrf

Patient selected for this appointment

{{ strtoupper(substr($name,0,1)) }}

{{ $name }}

Student ID: {{ $studentId }}

RM{{ number_format($balance,2) }} of RM{{ number_format($total,2) }} remaining
Student
← Back to Dashboard
@if($isFullyUsed)
!

Allocation Fully Utilized

Your annual dental allocation of RM{{ number_format($total, 2) }} has been fully utilised for this year. You will not be able to book further appointments.

Allocation Summary

Total RM{{ number_format($total, 2) }}
Used RM{{ number_format($used, 2) }}
Remaining RM{{ number_format($balance, 2) }}

Allocation resets on 1 January {{ now()->addYear()->format('Y') }}. Contact PKU for emergencies.

@endif