@extends('Employee.layout') @section('title',"Claim Points") @section('page-name',"Employee Point") @section('page-detail',"All Points Information") {{--@section('pagelink', 'dashboard')--}} @section('body')
{{--
--}} {{--
--}} {{-- --}} {{-- Claim Points--}} {{--
--}} {{--
--}}
@if($points->isEmpty())

No Points Yet!

@else
@foreach($points as $point) @php $target = $targets->firstWhere('id', $point->target_id); $name = 'N/A'; if ($target) { if ($target->product_id) { $product = $products->firstWhere('id', $target->product_id); $name = $product ? $product->name : 'Product Not Found'; } else { $name = $target->custom ?? 'Custom Target'; } } @endphp @endforeach
VIN# Target/Product Points Claimed Date Status Detail
{{ $point->vin_no }} {{ $name }} {{ $point->points }} {{ \Carbon\Carbon::parse($point->created_at)->format('m-d-y') }} @if($point->status === 'Redeemed') Redeemed @elseif($point->status === 'Rejected') Rejected @else Pending @endif @if($point->status === 'Rejected') @else N/A @endif
@endif
@endsection @section('custom-scripts') @endsection