@extends('layouts.empresa') @section('title') Comanda — Mesa #{{ $comanda->mesa?->numero }} @endsection @section('content') @php $fechada = in_array($comanda->status->value, ['fechada', 'cancelada'], true); @endphp
Mesa e responsável

Mesa: #{{ $comanda->mesa?->numero }} {{ $comanda->mesa?->nome }}

Status comanda: {{ $comanda->status->label() }}

@if (! $fechada)
@csrf @method('PUT')
@if (auth()->user()->temPainelEmpresaCompleto())
@else

Atendente: {{ auth()->user()->name }}

@endif
@endif
Adicionar produto
@if ($fechada)

Comanda encerrada — somente consulta.

@else
@csrf
@endif
Itens @if (! $fechada)
@csrf
Pré-conta @if (auth()->user()->role !== \App\Models\User::ROLE_ATENDENTE) Fechamento @endif
@endif
@forelse ($comanda->itens as $item)
{{ $item->nome_produto }} × {{ $item->quantidade }}
{{ $item->setor_destino->label() }} · {{ $item->status->label() }}
@if ($item->observacao)
{{ $item->observacao }}
@endif
R$ {{ number_format((float) $item->valor_total, 2, ',', '.') }}
@if (! $fechada && $item->status === \App\Enums\Mesas\ComandaItemStatus::Pendente)
@csrf @method('DELETE')
@endif
@empty
Nenhum item lançado.
@endforelse
@endsection