@extends('layouts.customer') @section('content')

Rewards

{{-- Debug dump for backend reference only --}} {{-- {{ dump($tp) }} {{ dump($customer) }} // Uncomment these while debugging to inspect data --}} {{-- Customer Profile Card --}} @if($customer)
Profile Image

{{ $customer['first_name'] ?? '' }} {{ $customer['last_name'] ?? '' }}

{{ $customer['email'] ?? '' }} | {{ $customer['phone'] ?? '' }}

Loyalty Tier: Tier {{ $customer['tier_id'] ?? '-' }} | Member Since: {{ \Carbon\Carbon::parse($customer['created_at'])->format('M Y') }}

@endif

{{ $points['available'] ?? 0 }}

Available Points

{{ $points['redeemed'] ?? 0 }}

Redeemed Points

{{ $rewards['eligible'] ?? 0 }}

Eligible Rewards

{{ $rewards['not_eligible'] ?? 0 }}

Npt Eligible Rewards

@if($tp) @foreach($tp as $point) @endforeach @else @endif
Type Description Points Order Details Date/Time Status
@if($point->trans_type == 1) {{-- For green text --}} Credited @elseif($point->trans_type == 2) {{-- For red text --}} Redeemed @else {{-- For gray/secondary text --}} Unknown @endif {{ $point->description ?? '-' }} {{ $point->point }} pts @if(isset($point->order)) #{{ $point->order->id ?? '-' }} (₹{{ number_format($point->order->order_total ?? 0, 2) }}) @else — @endif {{ \Carbon\Carbon::parse($point->datetime)->format('d M Y, h:i A') }} @if($point->is_redeem) Used @else Active @endif
No records found!
@endsection