@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

@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 }}

Tracked materials

↗

{{ $filamentCount }}

{{ count($materials) }} material types in your tracker

@if($isAdmin)

Active listings

↗

{{ $listingCount ?? '—' }}

{{ $etsyStatus }}

@else

Filament dryer

↗

{{ $dryerState }}

Current workshop state

@endif
@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

Material mix

Tracked filaments by material

@if($filamentCount)
@else

No materials tracked yet

Open filament tracker →
@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' }}

{{ $shipment['DeliveryAddress']['ContactName'] ?? 'Recipient unavailable' }}

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

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

@endforelse
@endif

Filament tracker

Most recently tracked materials

View all →
@forelse($recentFilaments as $filament)

{{ $filament->filamentName }}

{{ $filament->brand ?: 'Unknown brand' }} · {{ $filament->material ?: 'Material pending' }}

{{ $filament->prices->first() ? '£'.number_format($filament->prices->first()->price, 2) : 'Pending' }}
@empty

No filament is being tracked yet.

@endforelse

Dryer status

{{ $dryerState }}

Open controls →
@endsection