@extends('layouts.app') @section('content') @php // Live Uber snapshot (authoritative) with the last applied payload as fallback. $contact = data_get($store, 'contact') ?? []; $location = data_get($store, 'location') ?? []; $orderability = data_get($store, 'orderability') ?? []; $prepTimes = data_get($store, 'prep_times') ?? []; $infoPayload = data_get($settings, 'store_information.payload') ?? []; $statusPayload = data_get($settings, 'store_status.payload') ?? []; $prepPayload = data_get($settings, 'prep_time.payload') ?? []; $syncedAt = data_get($settings, 'synced_at'); $hasStore = filled($integration->account_id); // Prefill helpers: old() (after a validation error) wins, then the live Uber // value, then the last payload we applied. $pick = fn ($field, $live, $applied) => old($field, filled($live) ? $live : (filled($applied) ? $applied : '')); $currentStatus = strtoupper((string) (data_get($orderability, 'status') ?: data_get($statusPayload, 'status'))); $currentPrep = data_get($prepTimes, 'default_value') ?? data_get($prepPayload, 'default_prep_time'); $input = 'block w-full px-3 py-2 text-sm text-stone-800 bg-white border border-stone-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-stone-400 disabled:bg-stone-100 disabled:text-stone-400'; $label = 'block text-xs font-medium text-stone-500'; $disabled = $hasStore ? '' : 'disabled'; @endphp
{{ __('Selected business:') }} {{ session('selected_pos_note') ?: __('None') }} @if ($hasStore) · {{ __('Store') }}: {{ $integration->account_id }} @endif
@if ($syncedAt){{ __('Last synced from Uber: :time', ['time' => \Illuminate\Support\Carbon::parse($syncedAt)->format('d.m.Y H:i')]) }}
@endif{{ __('Contact, location and pickup instructions. Only filled fields are sent to Uber.') }}
{{ __('Bring the store online or take it offline on Uber Eats.') }}
{{ __('Default time Uber shows customers before an order is ready.') }}