@extends('adminlte::page') @section('title', 'Template: ' . $template->nome) @section('content_header')

{{ $template->nome }}

@stop @section('content')

Torna alla biblioteca @if(!auth()->user()->can('manage-banche-dati-generali') && $template->created_by != auth()->id()) Clona questo template @endif

@if($template->descrizione)
Descrizione: {{ $template->descrizione }}
@endif
Visibilità: @if($template->pubblica) Pubblico @else Privato @endif

Struttura settimanale (sola lettura)

@forelse($giorniVista as $giornoVista)
{{ $giornoVista['label_giorno'] }}
@foreach($giornoVista['pasti'] as $pastoVista)
{{ $pastoVista['label'] }} @if(!empty($pastoVista['ora'])) ({{ $pastoVista['ora'] }}) @endif
    @foreach($pastoVista['voci'] as $voce) @if(($voce['tipo'] ?? 'alimento') === 'ricetta')
  • {{ $voce['nome'] ?? 'Ricetta' }} @if(!empty($voce['componenti']))
      @foreach($voce['componenti'] as $componente)
    • {{ $componente['nome'] ?? 'Alimento' }} — {{ (int) ($componente['quantita_g'] ?? 0) }} g @foreach($componente['sostituti'] ?? [] as $sost)
      o {{ $sost['nome'] ?? 'Alimento' }} — {{ (int) ($sost['quantita_g'] ?? 0) }} g
      @endforeach
    • @endforeach
    @endif @foreach($voce['sostituti'] ?? [] as $sostRicetta)
    oppure {{ $sostRicetta['nome'] ?? 'Ricetta' }} @foreach($sostRicetta['componenti'] ?? [] as $compSost)
    {{ $compSost['nome'] ?? 'Alimento' }} — {{ (int) ($compSost['quantita_g'] ?? 0) }} g
    @endforeach
    @endforeach
  • @else
  • {{ $voce['nome'] ?? 'Alimento' }} — {{ (int) ($voce['quantita_g'] ?? 0) }} g @foreach($voce['sostituti'] ?? [] as $sost)
    o {{ $sost['nome'] ?? 'Alimento' }} — {{ (int) ($sost['quantita_g'] ?? 0) }} g
    @endforeach
  • @endif @endforeach
@endforeach
@empty
Nessun alimento presente in questo template.
@endforelse
@if(!auth()->user()->can('manage-banche-dati-generali') && $template->created_by != auth()->id())
Clona questo template
@endif
@stop