@extends('backEnd.layouts.master') @section('title', 'My Customers') @push('styles') @endpush @section('content') @php $formatCourier = function (array $stat): string { $d = (int) ($stat['d'] ?? 0); $r = (int) ($stat['r'] ?? 0); return ($d === 0 && $r === 0) ? '-' : ($d . '-' . $r); }; $courierOrderUrl = function (string $phone, string $courier) { return route('admin.orders.shipped', [ 'search' => $phone, 'courier_filter' => $courier, ]); }; @endphp
| ID | Customer Name | Phone Number | Last Order | Address | Customer Rank | Total Order | Status | |
|---|---|---|---|---|---|---|---|---|
| {{ $customer->id }} |
{{ $customer->name }}
@if($isBlocked)
Blocked
@endif
|
@if($phoneIntl)
{{ $phoneIntl }}
@if($customer->has_whatsapp === true)
W
@elseif($customer->has_whatsapp === false)
✕
@else
?
@endif
@if($waLinkDefault)
@endif
@elseif($phone)
{{ $phone }}
@else
—
@endif
@if($waLinkDefault && $customer->has_whatsapp === null)
·
@endif
|
@if(!empty($lastOrder['last_order_at']))
@php
$lastAt = \Carbon\Carbon::parse($lastOrder['last_order_at']);
$daysAgo = $lastAt->copy()->startOfDay()->diffInDays(now()->startOfDay());
$agoLabel = $daysAgo === 0 ? 'আজ' : ($daysAgo . ' din age');
@endphp
{{ $agoLabel }}
@if(!empty($lastOrder['order_id']))
{{ $lastAt->format('d M Y') }}
@else
{{ $lastAt->format('d M Y') }}
@endif
@else
—
@endif
|
@if($locMain)
{{ $locMain }}
@endif
@if($addressLine)
Address: {{ $addressLine }}
@elseif(!$locMain)
—
@endif
|
@include('backEnd.customer.partials.tier-badge', ['tier' => $customerTier, 'sm' => true]) | @if($totalOrders > 0 && $phone) {{ $totalOrders }} @else 0 @endif | {!! implode(', ', $courierParts) !!} | |
| No customers found. @if(!($search ?? '') && !($district ?? '') && !($whatsapp ?? '')) @endif | ||||||||