@extends('admin.layouts.app') @section('title', 'Customers') @section('content')
@if(auth()->user()->hasPermission('create_customer')) Create Customer @else
@endif
@forelse($customers as $index => $customer) @php $currentPoints = $customer->points->first(); @endphp @empty @endforelse
# Name Phone State Redemption Center Wrappers (Month {{ $currentCycle }}) Points (Month {{ $currentCycle }}) Status Actions
{{ $customers->firstItem() + $index }} {{ $customer->full_name }} {{ $customer->phone }} {{ $customer->state?->name ?? '—' }} {{ $customer->redemptionCenter?->name ?? '—' }} {{ $currentPoints->total_wrappers ?? 0 }} {{ $currentPoints->points ?? 0 }} {{ ucfirst($customer->status) }} @if(auth()->user()->hasPermission('deactivate_customer')) @if($customer->isActive())
@csrf
@else
@csrf
@endif @endif
No customers found.
{{ $customers->links() }}
@endsection