@extends('layouts.app') @section('content') {{-- POS ocupa 100% del viewport independiente del layout --}}
{{-- TOPBAR POS --}}
Volver
🍽️ Mesa: {{ $table->name }}
Zona: {{ $table->area->name }}
@if($order && $mergedTables->count() > 0) Unidas: @foreach($mergedTables as $mt) {{ $mt->name }}
@csrf
{{ !$loop->last ? ',' : '' }} @endforeach
@endif
@if($order)
@csrf
@endif {{ auth()->user()->name }}
{{-- CUERPO: dos columnas (productos | carrito) --}}
{{-- Productos --}}
{{-- Barra búsqueda + categorías --}}
{{-- Categorías en pills horizontales --}}
@foreach($categories as $category) @endforeach
@php // Paleta de colores por categoría (ciclo automático) $catPalette = [ ['bg'=>'#fff4e6','icon'=>'#ff8c00','border'=>'#ffd08a','iconClass'=>'bi-egg-fried'], ['bg'=>'#f3eeff','icon'=>'#9b5de5','border'=>'#c9a8f5','iconClass'=>'bi-award-fill'], ['bg'=>'#ecfeff','icon'=>'#06b6d4','border'=>'#67e8f9','iconClass'=>'bi-cup-straw'], ['bg'=>'#f0fdf4','icon'=>'#22c55e','border'=>'#86efac','iconClass'=>'bi-cup-hot-fill'], ['bg'=>'#fef2f2','icon'=>'#ef4444','border'=>'#fca5a5','iconClass'=>'bi-fire'], ['bg'=>'#eff6ff','icon'=>'#3b82f6','border'=>'#93c5fd','iconClass'=>'bi-droplet-fill'], ['bg'=>'#fdf4ff','icon'=>'#d946ef','border'=>'#f0abfc','iconClass'=>'bi-flower1'], ['bg'=>'#fff7ed','icon'=>'#f97316','border'=>'#fdba74','iconClass'=>'bi-basket2-fill'], ]; $catColorMap = []; $ci = 0; foreach($categories as $cat) { $catColorMap[$cat->id] = $catPalette[$ci % count($catPalette)]; $ci++; } @endphp
@foreach($categories as $category) @php $pal = $catColorMap[$category->id]; @endphp @foreach($category->products as $product)
{{-- Imagen o bloque de color con ícono --}}
@if($product->image) {{ $product->name }} @else
@endif {{-- Badge Precio --}}
S/ {{ number_format($product->price, 2) }}
{{-- Badge Stock --}} @if(!is_null($product->stock))
{{ $product->stock }}
@endif
{{-- Nombre --}} {{-- Overlay al hover --}}
Agregar
@endforeach @endforeach
{{-- CARRITO: columna derecha con ancho fijo (en móvil se convierte en panel deslizable) --}}
Cuenta Actual
@include('pos.partials.cart', ['order' => $order, 'printers' => $printers])
{{-- Botón flotante "Ver Cuenta" — solo visible en celular --}} @if($order) @endif @endsection