{!! $dealBadge($d) !!}{!! isset($d['title']) ? e($d['title']) : t('kiosk.special_offer_fallback') !!}
@if (!empty($d['description'])){{ $d['description'] }}
@endif {{ $d['code'] }}@php
/**
* In-restaurant self-order touch panel.
* @var array $restaurant @var array $categories @var array $items
* @var array $featured @var array $deals @var array $optJson @var array $ingJson
* @var string $cuisineName @var string $tableLabel @var bool $dineIn
* @var bool $orderingOn @var bool $codOn @var bool $offlineOn @var array $cart
* @var bool $headerEnabled @var bool $sidebarEnabled
* @var string $closedNotice @var float $minOrder
*
* The basket is the session cart (/cart/add) and "place order" submits the
* standard checkout, so kiosk orders are priced, recorded and tracked exactly
* like storefront orders. A table-mounted kiosk (?t={qr_token}) is bound to
* its table and places dine-in orders; a counter kiosk places pickup orders.
*
* $headerEnabled (Vendor Settings > Dine-in, default on) shows the standard
* site header + cuisines panel above the kiosk shell, so a guest - or a
* store reviewer - can still leave the kiosk and browse the rest of the site.
* An owner running a dedicated in-restaurant tablet may turn it off for a
* fully immersive, chrome-free shell.
*
* $sidebarEnabled (same tab, default OFF) adds the storefront's left store-type
* rail. It is separate because a fixed in-restaurant panel is ordering from THIS
* kitchen, so a rail that navigates away is usually unwanted even when the header
* is kept. The header's burger opens that rail, so it is only rendered when the
* rail is - otherwise it would control nothing.
*/
use App\Services\PreviewMenu;
use App\Support\App;
$curSym = preg_replace('/[0-9.,\s]/', '', money(0)) ?: '$';
// Seconds a guest has to intervene before the kiosk resets itself. One number for both
// of the shell's resets - the order-placed screen and the idle warning - so a guest
// never meets two different countdowns on the same panel.
$resetCountdown = 20;
$itemsByCat = [];
foreach ($items as $it) { $itemsByCat[(int) $it['menu_category_id']][] = $it; }
$catIcon = function (string $name): string {
$slug = PreviewMenu::categoryIcon3d($name) ?: 'diner-grill';
return '
';
};
$czAttrs = function (array $it) use ($optJson, $ingJson, $__env): string {
$id = (int) $it['id'];
return 'data-cz'
. ' data-cz-id="' . $id . '"'
. ' data-cz-name="' . e($it['name']) . '"'
. ' data-cz-price="' . e(number_format((float) $it['price'], 2, '.', '')) . '"'
. ' data-cz-img="' . e(media($it['image'] ?? '', 'assets/client/dish/dish-1.png')) . '"'
. ' data-cz-desc="' . e((string) ($it['description'] ?? '')) . '"'
. ' data-cz-options="' . e($optJson[$id] ?? '[]') . '"'
. ' data-cz-ings="' . e($ingJson[$id] ?? '[]') . '"';
};
$dealBadge = function (array $d) use ($curSym, $__env): string {
$value = rtrim(rtrim(number_format((float) $d['value'], 2), '0'), '.');
return $d['type'] === 'percent'
? t_raw('common.deal_percent_off', [':n' => $value])
: t_raw('common.deal_amount_off', [':amount' => $curSym . $value]);
};
@endphp
{{ t_raw('kiosk.offline_body') }}
{{ $restaurant['name'] ?? t('kiosk.menu_fallback_name') }}
{{ $restaurant['tagline'] ?? $cuisineName }}
{{ t_raw('kiosk.hero_text', [':name' => $restaurant['name'] ?? '']) }}
{!! $dealBadge($d) !!}{{ $d['description'] }}
@endif {{ $d['code'] }}
{{ $it['description'] ?? '' }}
@partial('cards/dish-attrs', ['item' => $it])