{{-- ===================================================== Etebarit - by Gisoo Web Solutions ------------------------------------------------------ Gisoo.net ------------------------------------------------------ Copyright (c) 2026 Gisoo Web Solutions ===================================================== This code is protected by copyright ===================================================== File: customers.blade.php ------------------------------------------------------ Use: The merchant's shop customers: a searchable list of buyers with a per-customer purchase summary, and a detail modal that lists their orders by id only - never a product name, never their installment plan. ===================================================== --}} @extends('layouts.merchant') @section('title', __('front.shop.customers.title')) @php use App\Support\Format; @endphp @section('breadcrumb') @endsection @section('page')

{{ __('front.shop.customers.title') }}

{{ __('front.shop.customers.subtitle') }}

{{-- Header: title + search --}}

{{ __('front.shop.customers.card_title') }}

@if ($customers->isEmpty())
{{ $search !== '' ? __('front.shop.customers.empty_search') : __('front.shop.customers.empty') }}
@else
@foreach ($customers as $customer) @php $blocked = $customer->blocked_at !== null; @endphp @endforeach
{{ __('front.shop.customers.col_user') }} {{ __('front.shop.customers.col_mobile') }} {{ __('front.shop.customers.col_count') }} {{ __('front.shop.customers.col_total') }} {{ __('front.shop.customers.col_last') }} {{ __('front.shop.customers.col_status') }}
{{ mb_substr($customer->first_name, 0, 1) }}.{{ mb_substr($customer->last_name, 0, 1) }} {{ trim($customer->first_name.' '.$customer->last_name) }}
{{ Format::persianDigits($customer->mobile) }} {{ Format::persianDigits((string) $customer->orders_count) }} {{ __('front.shop.customers.count_unit') }} @toman((int) $customer->total_amount) @jalali($customer->last_paid_at) ! $blocked, 'bg-[#f1f0f5] text-ink-muted' => $blocked, ])>{{ $blocked ? __('front.shop.customers.status.inactive') : __('front.shop.customers.status.active') }}
{{ __('front.shop.customers.summary', [ 'from' => Format::persianDigits((string) $customers->firstItem()), 'to' => Format::persianDigits((string) $customers->lastItem()), 'total' => Format::persianDigits((string) $customers->total()), ]) }}
{{ $customers->links() }}
@endif {{-- ===== Customer detail modal ===== --}}
@endsection