{{-- Compact courier buttons for booking table rows --}} @php $orderId = $orderId ?? null; $btnClass = $btnClass ?? 'booking-btn-single'; $manualNamedClass = $manualNamedClass ?? 'booking-btn-manual-named'; $steadfastOn = $steadfastOn ?? false; $pathaoOn = $pathaoOn ?? false; $redxOn = $redxOn ?? false; $carrybeeOn = $carrybeeOn ?? false; $manualOn = $manualOn ?? false; $manualCouriers = $manualCouriers ?? collect(); $apiTiles = [ 'steadfast' => ['on' => $steadfastOn, 'class' => 'btn-success', 'short' => 'SF'], 'pathao' => ['on' => $pathaoOn, 'class' => 'btn-danger', 'short' => 'PA'], 'redx' => ['on' => $redxOn, 'class' => 'btn-danger', 'short' => 'RX'], 'carrybee' => ['on' => $carrybeeOn, 'class' => 'btn-warning', 'short' => 'CB'], ]; @endphp
@foreach($apiTiles as $type => $meta) @if(!$meta['on']) @continue @endif @php $label = \App\Models\CourierApi::displayName($type); @endphp @endforeach @if($manualOn) @foreach($manualCouriers as $mc) @endforeach @endif @if(!collect($apiTiles)->filter(fn ($m) => $m['on'])->count() && !$manualOn) No courier ON @endif