@extends('layouts.public') @section('content') @php /** @var array $user */ /** @var array $addresses */ $addresses = $addresses ?? []; @endphp

{{ t_raw('account.saved_addresses_title') }}

@php /* The page's messages belong UNDER its title band, inside the page the reader is looking at — not floating above it. getFlashes() consumes, so the layout's own call further out finds nothing and does not draw it twice. */ @endphp
@partial('flash')
@partial('account-nav')

{{ t_raw('account.your_addresses_title') }}

@if (count($addresses))
    @foreach ($addresses as $a)
  • {!! $a['label'] ? e($a['label']) : t('account.address_fallback_label') !!} @php // Rendered always so set-default can toggle it in place (no reload). @endphp {{ t_raw('vendor.reservations.default_pill') }}
    @if (!empty($a['recipient']))

    {{ $a['recipient'] }}

    @endif

    {{ $a['line1'] }}@if (!empty($a['line2'])), {{ $a['line2'] }}@endif

    @if (!empty($a['city']) || !empty($a['postcode']))

    {{ trim(($a['city'] ?? '') . ' ' . ($a['postcode'] ?? '')) }}

    @endif @if (!empty($a['phone']))

    {{ $a['phone'] }}

    @endif
    @php // Rendered always; hidden when this is the default. JS toggles it in place // on set-default, and it still works as a plain POST without JS. @endphp
    @csrf
    @csrf
  • @endforeach
@else

{{ t_raw('account.no_addresses_empty') }}

@endif

{{ t_raw('account.add_address_title') }}

@csrf
@endsection