@foreach($allDresses as $d)
@php
$avail = $batchAvail[$d->id] ?? ['is_available' => true, 'reason' => null];
$isAvail = $avail['is_available'];
$photo = $d->images && $d->images->isNotEmpty() ? $d->images->first()->image_url : $d->primary_image_url;
@endphp
{{ $d->code }}
{{ $isAvail ? 'Tersedia' : 'Bentrok' }}
{{ $d->name }}
{{ $d->size }} / {{ $d->color }}
Rp {{ number_format($d->rental_price_3d, 0, ',', '.') }}
(Dep: {{ number_format($d->deposit_amount, 0, ',', '.') }})
@if($isAvail)
@else
@endif
@endforeach