@extends('layouts.app') @section('title', 'Overview') @section('content')

Workshop overview

Good to see you, {{ auth()->user()->username }}.

What needs attention across the shop and workshop.

Updated when you open this page

$isAdmin]) aria-label="Key metrics"> @if($isAdmin)

Awaiting dispatch

↗

{{ $etsyConnected ? $awaitingDispatch : '—' }}

{{ $etsyStatus }} · Latest 20 Etsy receipts

@endif

Printing now

↗

{{ $printerStatus === 'Live from BamBuddy' ? $printingCount : '—' }}/ {{ $printerStatus === 'Live from BamBuddy' ? count($printers) : '—' }}

{{ $printerStatus }}

@if($isAdmin)

Active listings

↗

{{ $listingCount ?? '—' }}

{{ $etsyStatus }}

@endif

Filament dryer

↗

{{ $dryerState }}

Current workshop state

@if($isAdmin)

Orders awaiting dispatch

Placed in the last 14 days among the latest 20 unshipped Etsy receipts

View Etsy →
@if($etsyConnected && array_sum($orderChart['series']) > 0)
@else

No recent dispatch orders to chart

{{ $etsyStatus === 'Not connected' ? 'Connect Etsy to see the current dispatch queue.' : ($etsyStatus === 'Temporarily unavailable' ? 'Etsy data is temporarily unavailable.' : 'Paid orders awaiting dispatch will appear here.') }}

@endif
@endif

Print farm status

Live printer states from BamBuddy

@if(count($printerChart))
@else

No printer status to chart

Open print farm →
@endif
@unless($isAdmin)

Workshop status

Print farm: {{ $printerStatus }}

Dryer: {{ $dryerState }}

@endunless

Print farm

{{ $printerStatus }}

View all →
@forelse(array_slice($printers, 0, 4) as $printer) @php $live = $printer['live'] ?? []; @endphp

{{ $printer['name'] ?? 'Printer' }}

{{ $live['current_print'] ?? $live['subtask_name'] ?? 'No active job' }}

in_array(strtoupper((string) ($live['state'] ?? '')), ['RUNNING', 'PRINTING']), 'text-slate-400' => ! in_array(strtoupper((string) ($live['state'] ?? '')), ['RUNNING', 'PRINTING'])])>{{ $live['state'] ?? $printer['status'] ?? 'Unavailable' }}

{{ isset($live['progress']) ? number_format((float) $live['progress'], 0).'%' : '—' }}

@empty

{{ $printerStatus === 'Live from BamBuddy' ? 'No printers returned by BamBuddy.' : $printerStatus }}

@endforelse
@if($isAdmin)

Orders to pack

Latest paid Etsy receipts awaiting dispatch

View all →
@forelse($receipts as $receipt)

#{{ $receipt['receipt_id'] ?? '—' }} · {{ $receipt['name'] ?? 'Buyer' }}

{{ isset($receipt['create_timestamp']) ? \Illuminate\Support\Carbon::createFromTimestamp((int) $receipt['create_timestamp'])->format('d M Y') : 'Date unavailable' }}

Pack & send
@empty

{{ $etsyStatus === 'Not connected' ? 'Connect Etsy to see orders.' : ($etsyStatus === 'Temporarily unavailable' ? 'Etsy data is temporarily unavailable.' : 'No orders awaiting dispatch.') }}

@endforelse
@endif
@if($isAdmin)

Recent shipments

Parcel2Go · {{ $shippingStatus }}

Labels & collections →
@forelse($shipments as $shipment)

#{{ $shipment['OrderLineId'] ?? '—' }} · {{ $shipment['Courier'] ?? 'Courier' }}

{{ app(\App\Services\Display::class)->flag($shipment['DeliveryAddress'] ?? []) }}{{ $shipment['DeliveryAddress']['ContactName'] ?? 'Recipient unavailable' }}

{{ ($shipment['Tracking']['Delivered'] ?? false) ? 'Delivered' : 'In transit' }}
@empty

{{ $shippingStatus === 'Live account' ? 'No recent shipments.' : $shippingStatus }}

@endforelse
@endif @endsection