@extends('admin.layouts.app') @section('page-title',$currentPage) @push('styles')@endpush @section('content') @php($module = $type === 'order' ? 'orders' : 'customers')

{{ $currentPage }}

@if($record){{ $type === 'order' ? 'Order' : 'Customer' }} List@endif
@if(session('status'))

{{ session('status') }}

@endif @if($errors->any())@endif @if(!$record)
@forelse($records as $row)@empty@endforelse
ReferenceNameContactStatus{{ $type === 'order' ? 'Total (BDT)' : 'Account type' }}Action
{{ $type === 'order' ? $row->code() : 'CU'.str_pad((string)$row->id,6,'0',STR_PAD_LEFT) }}{{ $type === 'order' ? $row->customer_name : $row->name }}{{ $type === 'order' ? $row->customer_phone : $row->email }}{{ $type === 'order' ? ucwords(str_replace('_',' ',$row->status)) : ($row->is_active ? 'Active' : 'Suspended') }}{{ $type === 'order' ? number_format($row->total / 100,2) : ucfirst($row->account_type) }}Details
No saved {{ $module }} match this search.
{{ $records->firstItem() ?? 0 }}–{{ $records->lastItem() ?? 0 }} of {{ $records->total() }}
@if($records->previousPageUrl())Previous@endif @if($records->nextPageUrl())Next@endif
@else

{{ $type === 'order' ? $record->code().' · '.$record->customer_name : $record->name }}

@if($type === 'order')
Status
{{ ucwords(str_replace('_',' ',$record->status)) }}
Payment status / Total
{{ $record->payment_status }} · BDT {{ number_format($record->total / 100,2) }}
Phone / Address
{{ $record->customer_phone }} · {{ $record->address }}
Courier / Tracking
{{ $record->courier ?: '—' }} · {{ $record->tracking ?: '—' }}
@foreach($record->items as $item)@endforeach
Product / SKUColour / SizeQuantityRate (BDT)
{{ $item['name'] ?? '' }}{{ $item['sku'] ?? '' }}{{ $item['colour'] ?? '' }} / {{ $item['size'] ?? '' }}{{ $item['quantity'] ?? 0 }}{{ number_format(($item['unit_price'] ?? 0) / 100,2) }}
@else
Email / Phone
{{ $record->email }} · {{ $record->phone ?: 'Not provided' }}
Status
{{ $record->is_active ? 'Active' : 'Suspended' }}
Account type
{{ ucfirst($record->account_type) }}
Mobile verification
{{ $record->phone_verified_at ? 'Verified' : 'Not verified' }}
@endif
@php($choices = $type === 'order' ? (\App\Services\ClientRecords::Transitions[$record->status] ?? []) : [$record->is_active ? 'suspended' : 'active']) @if($choices && auth()->user()->hasPermission($module.'.update'))
@csrf @method('PATCH')

Change {{ $type }} status

@if($type === 'order')
@endif

{{ $type === 'order' ? 'Fulfilment status only. Inventory, collected money and refunds are recorded separately.' : 'Suspension revokes server sessions; staff and developer accounts cannot be changed here.' }}

@endif

Status history

@forelse($events as $event)@empty@endforelse
DateBefore → AfterReason
{{ $event->created_at }}{{ json_decode($event->before,true)['status'] }} → {{ json_decode($event->after,true)['status'] }}{{ $event->reason }}
No status changes recorded.
{{ $events->total() }} changes
@if($events->previousPageUrl())Previous@endif @if($events->nextPageUrl())Next@endif
@endif

Saved database records. Storefront demo checkout/account records are separate until their authenticated API integration is completed.

@endsection