@extends($layout ?? 'layouts.app') @section('title', 'Connect - My Leaves') @section('content')
@if($balances->isEmpty())

No leave balances initialized for you this year. Please contact HR.

@else @foreach($balances as $balance)

{{ $balance->leaveType->name }}

{{ $balance->leaveType->code }}
Allocated
{{ (float)$balance->allocated }} days
Used
{{ (float)$balance->used }} days
@php $percent = $balance->allocated > 0 ? ($balance->used / $balance->allocated) * 100 : 0; @endphp
Remaining Balance {{ (float)$balance->remaining }} Days
@endforeach @endif

My Leave Requests History

@if($leaveRequests->isEmpty()) @else @foreach($leaveRequests as $req) @endforeach @endif
Leave Type Start Date End Date Total Days Reason Attachment Status Reviewed By

You haven't submitted any leave requests yet.

{{ $req->leaveType->name }} {{ $req->start_date->format('d-M-Y') }} {{ $req->end_date->format('d-M-Y') }} {{ (float)$req->total_days }} days {{ $req->reason ?? '-' }} @if($req->attachment_path) Download @else - @endif {{ ucfirst($req->status) }} @if($req->approvedBy)
{{ $req->approvedBy->name }}
@if($req->approval_comments) "{{ Str::limit($req->approval_comments, 20) }}" @endif @else - @endif
@endsection