@extends('backend.template.layouts.template-base') @section('title', 'Vital Kitchen - ' . $product->name) @section('content')
{{-- Header --}}
@if ($product->status === 'active') @else @endif icon Edit Product icon Duplicate Product
{{-- Hero card --}}
@if ($product->image) product @else image @endif
{{ $product->name }}
@if ($product->short_description)

{{ $product->short_description }}

@endif Last Updated on : {{ $product->updated_at->format('d/m/Y') }}
Status
{{ ucfirst($product->status) }}
{{-- Product Info --}}
Product Info

{{ $product->name }}

{{ $product->name_tamil ?: '-' }}

{{ $product->group?->name ?: '-' }}

{{ $product->product_code }}

{{ $product->min_order_qty }}

{{ $product->max_order_qty }}

@if ($product->description)
{!! $product->description !!}
@endif @if ($product->keywords)
@foreach (preg_split('/[\s,]+/', $product->keywords, -1, PREG_SPLIT_NO_EMPTY) as $kw) {{ $kw }} @endforeach
@endif @if ($product->relatedProducts->count())
@foreach ($product->relatedProducts as $rp) {{ $rp->name }} @endforeach
@endif
{{-- Ingredients --}}
Ingredients Total: {{ $product->ingredients->count() }}  |  MRP (Standards): ₹{{ number_format($product->ingredients->where('pivot.ingredient_type', 'standard')->sum('mrp'), 2) }}
@php $allIngredients = $product->ingredients; $ungrouped = $allIngredients->filter(fn($i) => is_null($i->pivot->group_id)); $grouped = $allIngredients->filter(fn($i) => !is_null($i->pivot->group_id)); $sno = 1; @endphp {{-- Ungrouped --}} @foreach ($ungrouped as $ing) @endforeach {{-- Grouped --}} @foreach ($product->ingredientGroups as $group) @php $members = $grouped->filter(fn($i) => $i->pivot->group_id === $group->id); @endphp @if ($members->count()) @foreach ($members as $ing) @endforeach @endif @endforeach @if ($product->ingredients->isEmpty()) @endif
S.No Image Ingredient Name Variant & Units Price ₹ Type Pre-Suggested
{{ $sno++ }} @if ($ing->image) @else @endif {{ $ing->name }}
{{ $ing->name_tamil }}
{{ $ing->variant_label }} ₹{{ number_format($ing->mrp, 2) }} @if ($ing->pivot->ingredient_type === 'standard') Standard @else Dressing @endif @if ($ing->pivot->ingredient_type === 'standard') Mandatory @else @if ($ing->pivot->is_suggested) Yes @else No @endif @endif
{{ $sno++ }} {{ $group->label }}  • {{ $members->count() }} ingredients @if($group->section_type)  | {{ str_replace('_', ' ', $group->section_type) }} @endif @if($group->min_dressings || $group->max_dressings)  | Pick {{ $group->min_dressings }}–{{ $group->max_dressings }} @endif arrow
{{ $loop->iteration }} @if ($ing->image) @else @endif
{{ $ing->name }}
{{ $ing->name_tamil }}
{{ $ing->variant_label }} ₹{{ number_format($ing->mrp, 2) }} @if ($ing->pivot->ingredient_type === 'standard') Standard @else Dressing @endif @if ($ing->pivot->ingredient_type === 'standard') Mandatory @elseif ($ing->pivot->is_suggested) Yes @else No @endif
No ingredients added.
{{-- SEO --}} @if ($product->seo)
SEO Settings

{{ $product->seo->image_alt ?: '-' }}

{{ $product->seo->meta_title ?: '-' }}

{{ $product->seo->meta_description ?: '-' }}

{{ $product->seo->schema ?: '-' }}

{{ $product->seo->h1 ?: '-' }}

@endif
{{-- Activate Modal --}} {{-- Inactivate Modal --}} {{-- Delete Modal --}} @endsection @section('scripts') @endsection