@php $primary = $setting?->primary_color ?: '#124a61'; $accent = $setting?->accent_color ?: '#2e86ab'; $company = $setting?->company_name ?: __('Print Shop'); $logo = $setting?->logoSrc(); $money = fn ($n) => ($request->currency_code ?: 'USD') . ' ' . number_format((float) $n, 2); // The customer-facing journey, which differs by lane: a counter job is // printed and collected, a quote-lane enquiry is priced and sent. // 'cancelled' is handled separately below. $isQuoteLane = $request->isQuoteLane(); $flow = $isQuoteLane ? [ 'new' => __('Received'), 'quoting' => __('Being priced'), 'quoted' => __('Quote sent'), 'converted' => __('Accepted'), ] : [ 'new' => __('Received'), 'printing' => __('Printing'), 'ready' => __('Ready for collection'), 'completed' => __('Collected'), ]; $order = array_keys($flow); $currentIndex = array_search($request->status, $order, true); $currentIndex = $currentIndex === false ? 0 : $currentIndex; $cancelled = $request->status === 'cancelled'; @endphp {{-- Polls while there is anything left to happen. Fifteen seconds is chosen against the counter, not against the server: a customer waiting outside for a job that takes four minutes should not find out a quarter of an hour late, and a job that is already collected stops polling entirely ($live). --}}
{{-- Success banner --}}
@if ($logo) {{ $company }} @endif

{{ $company }}

{{ $request->intakeService?->name ?: __('Print request') }}

{{ __('Request received!') }}

{{ __('Reference') }} {{ $request->reference }}

{{-- Something moved while they were watching. --}}
{{-- Status --}} @if ($cancelled)
{{ __('This request was cancelled. Please contact the shop if this is unexpected.') }}
@else

{{ __('Status') }}

@if ($live) {{-- Says the page is watching, so nobody sits there refreshing it out of doubt. --}} {{ __('Live') }} @endif
    @foreach ($flow as $key => $label) @php $i = array_search($key, $order, true); $done = $i < $currentIndex; $current = $i === $currentIndex; @endphp
  1. @if ($done) @else @endif {{ $label }} @if ($current) {{ __('Now') }} @endif
  2. @endforeach
@endif {{-- Summary --}}
{{ __('Name') }}{{ $request->customer_name }}
@if ($isQuoteLane) @foreach ($request->answerSummary() as $row)
{{ $row['label'] }}{{ $row['value'] }}
@endforeach @if ($request->needed_by)
{{ __('Needed by') }}{{ $request->needed_by->format('j M Y') }}
@endif @else
{{ __('Print') }}{{ $request->colorLabel() }} · {{ $request->paper_size }} {{ $request->material_type }}
{{ __('Quantity') }}{{ $request->pages }} {{ trans_choice('{1}page|[2,*]pages', $request->pages) }} × {{ $request->copies }}{{ $request->double_sided ? ' · ' . __('back-to-back') : '' }}
@endif
{{ __('Files') }}{{ $request->files->count() }}
@if ($isQuoteLane) @if ($quoteToken) {{-- The quote exists, so the page it announces has to be one tap away. Telling somebody their quote is ready and leaving them to find it in an inbox is where this used to stop. --}} {{ __('View your quote') }} @else {{-- No price yet, and saying so plainly beats showing a zero. --}}

{{ __('No payment yet') }}

{{ __('We are pricing this now and will send you a quote. Nothing is booked in, and you owe nothing, until you accept it.') }}

@endif @else {{-- Payment --}}
{{ __('Amount') }} {{ $money($request->total) }}
{{ $request->isEcocash() ? __('EcoCash') : __('Cash') }} @if ($request->isPaid()) {{ __('Paid') }} @else {{ __('Payment pending') }} @endif
@if ($request->isEcocash() && ! $request->isPaid())

{{ __('We will confirm your EcoCash payment shortly.') }}

@endif
@endif @if (($credit ?? 0) > 0)

{{ __('You have :amt in saved change', ['amt' => $money($credit)]) }}

{{ __('Use it on your next print. Mention your phone number at the counter.') }}

@endif {{-- Install the shop, and be told without having to look. wire:ignore because this card is entirely browser state — a poll re-rendering the page underneath it must not reset the buttons mid-tap or lose the message it is showing. --}}

{{ __('Keep this page to check your status. Screenshot the reference for the counter.') }}

{{ $isQuoteLane ? __('We keep your artwork while we work on your quote.') : __('Your uploaded files are automatically deleted 24 hours after submission.') }}