{{-- Brand --}}
@if ($logo = $media->logo(360))
@else
Smart Carb Nutritecs
@endif
|
{{-- Plan header + daily targets --}}
|
{{ __('menus.recipes.email_greeting', ['name' => $menu->patient?->first_name ?? $menu->patient?->full_name]) }}
{{ $menu->title }} · {{ $menu->starts_on?->format('Y-m-d') }}
@foreach ([
[__('patients.target_calories'), number_format($menu->target_calories), __('menus.recipes.kcal'), '#5F8A31', '#F2F6E9'],
[__('patients.protein'), $menu->protein_g, $grams, '#1B1813', '#F6F6F5'],
[__('patients.carbs'), $menu->carbs_g, $grams, '#1B1813', '#F6F6F5'],
[__('patients.fat'), $menu->fat_g, $grams, '#1B1813', '#F6F6F5'],
] as [$label, $value, $unit, $color, $bg])
|
{{ $label }}
{{ $value }} {{ $unit }}
|
@endforeach
|
| |
@foreach ($days as $day)
@if (count($days) > 1)
| {{ __('common.day') }} {{ $day['day'] }} |
@endif
@foreach ($day['meals'] as $meal)
@php
$slot = $meal['slot'];
$recipe = $meal['recipe'] ?? null;
$items = collect($meal['items']);
$stats = [
['kcal', number_format((int) round($items->sum('calories'))), ''],
['fat', round($items->sum('fat_g'), 1), $grams],
['fiber', round($items->sum('fiber_g'), 1), $grams],
['protein', round($items->sum('protein_g'), 1), $grams],
['carbs', round($items->sum('carbs_g'), 1), $grams],
];
$pill = 'display:inline-block; border-radius:999px; padding:6px 14px; font-size:13px; font-weight:700; margin:0 0 4px;';
@endphp
{{-- Tabs --}}
@if ($icon = $media->icon($slot)) @endif{{ __('menus.slots.' . $slot) }}
@if ($recipe['is_super_meal'] ?? false)
@if ($icon = $media->icon('super')) @endif{{ __('menus.recipes.super_meal') }}
@endif
@if ($recipe['is_new'] ?? false)
{{ __('menus.recipes.new') }}
@endif
|
{{ __('menus.recipes.meal_target') }}: {{ number_format($meal['target_calories']) }} {{ __('menus.recipes.kcal') }}
|
@if ($recipe)
{{ $name($recipe) }}
@if ($otherName($recipe))
{{ $otherName($recipe) }}
@endif
@if ($dish = $media->dish($recipe['image'] ?? null, 1200))
@endif
@elseif ($isRecipeMenu)
{{ __('menus.recipes.fallback_note') }}
@endif
{{-- Nutrition row --}}
@foreach ($stats as $i => [$key, $value, $unit])
@if ($icon = $media->icon($key))
@endif
{{ $value }} {{ $unit }}
{{ __('menus.recipes.' . $key) }}
|
|
@endforeach
{{-- Core components + ingredients --}}
@if ($recipe)
|
{{ __('menus.recipes.core_components') }}
@foreach (array_chunk($categories, 4) as $row)
@foreach ($row as $category)
@php $on = in_array($category, $recipe['core_categories'] ?? [], true); @endphp
@if ($icon = $media->icon($category . ($on ? '-on' : '-off')))  @endif
{{ __('menus.recipes.categories.' . $category) }}
|
@endforeach
@endforeach
{{-- The paid components the clinic has bought; locked ones stay off the reviewer's copy --}}
@if (! empty($benefits['unlocked']))
@php
$earned = $benefits['recipes'][$recipe['id']] ?? [];
$shown = collect($benefits['all'])->whereIn('slug', $benefits['unlocked']);
@endphp
@foreach ($shown->chunk(4) as $row)
@foreach ($row as $benefit)
@php $on = in_array($benefit['slug'], $earned, true); @endphp
@if ($icon = $media->icon($benefit['slug'] . ($on ? '-on' : '-off')))  @endif
{{ $benefit['name'] }}
|
@endforeach
@endforeach
@endif
|
|
@endif
|
{{ __('menus.recipes.ingredients') }}
@foreach ($meal['items'] as $item)
@php
$photo = \App\Services\RecipeMenuService::pickPhoto(($componentPhotos ?? [])[$item['component_id'] ?? 0] ?? [], (float) $item['grams']);
$thumb = $photo ? $media->photo($photo, 96) : null;
@endphp
@if ($thumb)
@else
@endif
|
{{ $itemName($item) }} |
{{ $amount($item) }} |
@endforeach
|
|
|
| |
@endforeach
@endforeach
@if (($totalDays ?? count($days)) > count($days))
| {{ __('menus.email_more_days', ['count' => $totalDays - count($days)]) }} |
@endif
{{-- Footer (the API's in-app preview reuses this page, with no attachment) --}}
@if ($attachmentNote ?? true)
| {{ __('menus.recipes.email_pdf_note') }} |
@endif
| Smart Carb Nutritecs · {{ now()->format('Y-m-d') }} |
|