new: display the default address checkbox on profile load
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
'prefix' => 'deliveries',
|
||||
'addresses' => $customer['delivery_addresses'],
|
||||
'with_name' => true,
|
||||
'selected' => $customer['delivery_address_id'] ?? null,
|
||||
])
|
||||
</x-card>
|
||||
|
||||
@@ -32,6 +33,7 @@
|
||||
'prefix' => 'invoices',
|
||||
'addresses' => $customer['invoice_addresses'],
|
||||
'with_name' => true,
|
||||
'selected' => $customer['invoice_address_id'] ?? null,
|
||||
])
|
||||
</x-card>
|
||||
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
<div class="col-1">
|
||||
@php
|
||||
$inputName = isset($prefix) && $prefix ? $prefix.'[address_id]' : 'address_id';
|
||||
$currentValue = $selected ?? null;
|
||||
@endphp
|
||||
<x-form.radios.icheck name="{{ $inputName }}" val="{{ $address['id'] }}" id="address_{{ $address['id'] }}" />
|
||||
<x-form.radios.icheck name="{{ $inputName }}" val="{{ $address['id'] }}"
|
||||
:value="$currentValue" id="address_{{ $address['id'] }}" />
|
||||
</div>
|
||||
<div class="col-10">
|
||||
@if ($with_name ?? false)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
'address' => $address,
|
||||
'prefix' => $prefix ?? null,
|
||||
'with_name' => $with_name ?? false,
|
||||
'selected' => $selected ?? null,
|
||||
])
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user