@extends('Manager.layout') @section('title',"Employee Points") @section('page-name',$category." Employee Point") @section('page-detail',"All Requested Points Information") {{--@section('pagelink', 'dashboard')--}} @section('body')

@if($points->isEmpty())

No Points Yet!

@else
@foreach($points as $point) @php $empName = $employees->firstWhere('employee_id', $point->employee_id)->name; @endphp @if($targets->firstWhere('id', $point->target_id)->product_id ) @php $prod = $targets->firstWhere('id', $point->target_id)->product_id; $name = $products->firstWhere('id', $prod)->name; @endphp @else @endif @endforeach
Employee VIN# Target/Product Points Claimed Date Action
{{ $empName }} {{ $point->vin_no }}{{ $name }}{{ Str::limit($targets->firstWhere('id', $point->target_id)->custom ?? 'No Custom', 20) }}{{ $point->points }} {{ \Carbon\Carbon::parse($point->created_at)->format('m-d-y') }} @if($point->status === 'Pending') Approve Reject @elseif($point->status === 'Redeemed') Approved @elseif($point->status === 'Rejected') Rejected @endif
@endif
@endsection @section('custom-scripts') @endsection