@extends('layouts.dashboard') @section('content') @php /** * Vendor → TV Screens → slideshow form: link saved boards into one rotation. The boards * are picked by CLICKING them in play order (numbered badges show the sequence), then the * swap transition and dwell time are chosen — and the saved row pairs to a TV exactly the * way a single board does (same pairing panel below). * * @var array|null $screen the slideshow row being edited (null = creating) * @var array $playlist ['screens' => [ids], 'transition' => …, 'seconds' => …] * @var array $boards the restaurant's plain boards (id, name, config) * @var array $devices TVs paired to this row (edit only) * @var array $schedules the restaurant's serving times (dayparting, optional) * @var array $restaurant */ $screen = $screen ?? null; $playlist = $playlist ?? ['screens' => [], 'transition' => 'fade', 'seconds' => 8]; $boards = $boards ?? []; $devices = $devices ?? []; $schedules = $schedules ?? []; $scheduleId = (int) ($screen['schedule_id'] ?? 0); $sid = $screen ? (int) $screen['id'] : 0; $slug = (string) ($restaurant['slug'] ?? ''); $playUrl = rtrim((string) route('tv.play'), '/'); /** The same live thumbnail seam the screens list uses. */ $previewUrl = static function (\App\Models\TvScreen|array $b) use ($slug, $__env): string { $c = \App\Models\TvScreen::config($b); return url('/tv/preview?' . http_build_query([ 'slug' => $slug, 'orientation' => $c['orientation'], 'theme' => $c['theme'], 'accent' => $c['accent'], 'bgColor' => $c['bgColor'], 'header' => $c['header'] ? 1 : 0, 'headerText' => $c['headerText'], 'showCuisine' => $c['showCuisine'] ? 1 : 0, 'footer' => $c['footer'] ? 1 : 0, 'footerText' => $c['footerText'], 'poweredBy' => $c['poweredBy'] ? 1 : 0, 'spacing' => $c['spacing'], 'columns' => json_encode($c['columns'], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), ])); }; $chosen = array_map('intval', $playlist['screens'] ?? []); @endphp @php /* .qm-d2: the dashboard density standard (app.css §35) */ @endphp

{{ t_raw($screen ? 'vendor.screens.edit' : 'vendor.screens.show_add') }}

{{ t_raw('vendor.screens.show_sub') }}

@csrf @if ($screen)@endif
@if ($schedules)
@endif

{{ t_raw('vendor.screens.show_pick') }}

{{ t_raw('vendor.screens.show_pick_hint') }}

@foreach ($boards as $b) @php $bid = (int) $b['id']; @endphp @endforeach
{{ t_raw('common.cancel') }}
@if ($screen) @partial('tv-pair', ['sid' => $sid, 'devices' => $devices, 'playUrl' => $playUrl]) @endif
@php /* /.qm-d2 */ @endphp @endsection