@extends('admin.layouts.app') @section('head') {{-- --}} @endsection @section('content')

{{$title}}

@php $cant = 0; $categorias = []; $days = []; foreach ($order->orderDetails as $detail) { $day = json_decode($detail->menu->days); $cant += $detail->quantity; $categorias[] = $detail->menu->category->name; $days[] = $day[0]; } // Colores por categoría (puedes añadir más) $categoryColors = [ 1 => 'bg-primary', // Azul 2 => 'bg-success', // Verde 3 => 'bg-warning', // Amarillo 4 => 'bg-danger', // Rojo 5 => 'bg-info', // Cian ]; $dayColorMap = [ 'monday' => '#3498db', // Blue 'tuesday' => '#e74c3c', // Red 'wednesday' => '#2ecc71', // Green 'thursday' => '#f1c40f', // Yellow 'friday' => '#9b59b6', // Purple 'saturday' => '#e67e22', // Orange 'sunday' => '#e84393' // Pink ]; @endphp
Datos del cliente

{{$order->client->name}}

{{$order->client->address}}

{{$order->client->cel}}

{{$order->client->email}}

Resumen orden
Menus totales:
Menus cant:
Categorias:
Días:

{{count($order->orderDetails)}}
{{$cant}}
{{ implode(', ', array_unique($categorias)) }}

{{ implode(', ', array_unique($days)) }}

Total:

{{$order->total}} USD
@foreach ($order->orderDetails as $detail)
@php $day = json_decode($detail->menu->days); $dayColor = $dayColors[$day[0]] ?? 'bg-secondary'; // Color por defecto @endphp {{ ucfirst($day[0]) }}


{{$detail->quantity}}

@php $categoryColor = $categoryColors[$detail->menu->category->id] ?? 'bg-secondary'; // Color por defecto @endphp
{{$detail->menu->category->name}}

{{$detail->unit_price}} USD

{{$detail->total_price}} USD

@endforeach
@section('scripts') @endsection @endsection