@extends('layouts.dashboard') @section('content') @php /** * Vendor → Google Business Profile → pick the location. * * A Google account can manage several businesses, and Google addresses a menu as * accounts/{a}/locations/{l} — so which one this restaurant is cannot be inferred, only * chosen. Once, then stored. * * @var array $locations account, location, name, address, eligible */ $locations = $locations ?? []; @endphp @php /* .qm-d2: the dashboard density standard (app.css §35) */ @endphp
@php ob_start(); @endphp {{ t_raw('vendor.menu.import_back') }} @php \App\Support\View::slot('subhead', ob_get_clean()); @endphp

{!! google_mark(18, 'me-2') !!}{{ t_raw('vendor.menu.google_pick_heading') }}

{{ t_raw('vendor.menu.google_pick_sub') }}

@csrf
@if (!$locations) @php /* Either the account manages nothing, or — far more often — Google has not approved this platform's project and every listing call came back empty. */ @endphp

{{ t_raw('vendor.menu.google_none_title') }}

{{ t_raw('vendor.menu.google_none_body') }}

@else
@foreach ($locations as $loc) @endforeach
{{ t_raw('vendor.menu.google_col_location') }} {{ t_raw('vendor.menu.google_col_menu') }}
{{ (string) $loc['name'] }} @if (($loc['address'] ?? '') !== '')
{{ (string) $loc['address'] }}@endif
@php /* Google decides per location whether it may carry a food menu (metadata.canHaveFoodMenus). Saying so here beats letting the owner pick one and meet an empty import. */ @endphp @if (!empty($loc['eligible'])) {{ t_raw('vendor.menu.google_eligible') }} @else {{ t_raw('vendor.menu.google_not_eligible') }} @endif
@csrf
@endif
@php /* /.qm-d2 */ @endphp @endsection