Smart Carb Nutritecs

Where Experience Meets Innovation

{{ $menu->patient?->full_name }}

{{ $menu->title ?? $menu->dietType?->name }} · {{ $menu->starts_on?->format('Y-m-d') }} · {{ $menu->duration_days }} {{ __('common.days') }}

{{-- Daily targets --}} @foreach ([ [__('patients.target_calories'), number_format($menu->target_calories) . ' ' . __('common.kcal'), '#5F8A31'], [__('patients.protein'), $menu->protein_g . __('common.grams'), '#0c6bab'], [__('patients.carbs'), $menu->carbs_g . __('common.grams'), '#5F8A31'], [__('patients.fat'), $menu->fat_g . __('common.grams'), '#c98a06'], ] as [$label, $value, $color]) @endforeach
{{ $label }}
{{ $value }}
@foreach ($days as $index => $day) @php $dayTotal = $totals[$index] ?? null; @endphp

{{ __('common.day') }} {{ $day['day'] }} @if ($dayTotal) · {{ number_format($dayTotal['calories']) }} {{ __('common.kcal') }} @endif

@foreach ($day['meals'] as $meal) @php $mealColor = ['breakfast' => '#17b8a6', 'lunch' => '#F2B705', 'dinner' => '#E8792A'][$meal['slot']] ?? '#5F8A31'; $actual = $meal['actual_calories'] ?? collect($meal['items'])->sum('calories'); $pct = $meal['target_calories'] > 0 ? min(100, round(($actual / $meal['target_calories']) * 100)) : 0; @endphp
{{ __('menus.slots.' . $meal['slot']) }} {{ round($actual) }} / {{ $meal['target_calories'] }} {{ __('common.kcal') }}
{{-- Email-safe "chart": a table-cell bar sized by width%, since email clients don't render /SVG reliably. --}}
   
@foreach ($meal['items'] as $item) @php // Shows both languages when the saved item has them; falls // back to whichever single name an older/manually-edited // item happens to carry. $itemName = collect([$item['name_en'] ?? null, $item['name_ar'] ?? null]) ->filter() ->unique() ->implode(' / '); if ($itemName === '') { $itemName = $item['name'] ?? (app()->getLocale() === 'ar' ? ($item['name_ar'] ?? null) : ($item['name_en'] ?? null)); } @endphp @endforeach
{{ $itemName }} {{ $item['grams'] }}{{ ($item['unit'] ?? null) === 'ml' ? __('common.ml') : __('common.grams') }}
@endforeach
@endforeach @if ($totalDays > count($days))

{{ __('menus.email_more_days', ['count' => $totalDays - count($days)]) }}

@endif

Smart Carb Nutritecs · {{ now()->format('Y-m-d') }}