@extends('apex-layouts.main') @section('title',"Pre Reservation") @section('header-right') Total:  {{ $preReservation->total() }} @if(\Illuminate\Support\Facades\Auth::user()->alphaRole ==\App\managers\UserManager::AlphaRoleSuper) Upload Pre Reservation @endif @endsection @section('content')
@foreach($insights as $index =>$value)

{!! $value->title !!}

{!! $value->count !!} Days Meals
@endforeach
@foreach($preReservation as $reservation) @php $totalCalories = $reservation->breakfastCalories +$reservation->lunchCalories +$reservation->snackCalories +$reservation->dinnerCalories; $totalGrams = $reservation->breakfastGrams +$reservation->lunchGrams +$reservation->snackGrams +$reservation->dinnerGrams; @endphp @endforeach
Sort meal_plan breakfast lunch snack dinner nutrition
{!! $reservation->sort!!} {!! $reservation->meal_plan!!} @if($reservation->breakfast) {!! $reservation->breakfast!!}

Kcal {!! number_format($reservation->breakfastCalories,0) !!}

{{--

{!! $reservation->breakfastGrams !!}

--}} @endif
@if($reservation->lunch) {!! $reservation->lunch!!}

Kcal {!! number_format($reservation->lunchCalories,0) !!}

{{--

{!! $reservation->breakfastGrams !!}

--}} @endif
@if($reservation->snack) {!! $reservation->snack!!}

Kcal {!! number_format($reservation->snackCalories,0) !!}

{{--

{!! $reservation->breakfastGrams !!}

--}} @endif
@if($reservation->dinner) {!! $reservation->dinner!!}

Kcal {!! number_format($reservation->dinnerCalories,0) !!}

{{--

{!! $reservation->breakfastGrams !!}

--}} @endif

Kcal {!! number_format($totalCalories,0) !!} {{-- G: {!! $totalGrams!!}--}}

@if($diff < 0 and $diff < -100)

Difference: {!! number_format($diff,0) !!} is Less

@elseif($diff > 0 and $diff > 100)

Difference: {!! number_format($diff,0) !!} is Extra

@else

Difference: {!! number_format($diff,0) !!}

@endif
@if($preReservation->total() > $preReservation->perPage()) @endif
@endsection @section('scripts') @stop @section('styles') @stop