@extends('admin.layouts.admin') @section('title', 'Receta base — ' . $fermento->name) @php // Unit options for the selects. Admin may enter in kg/L; stored canonical (g/ml/unit). $unitOptions = ['g' => 'g', 'kg' => 'kg', 'ml' => 'ml', 'l' => 'L', 'unit' => 'ud']; $stepOptions = $fermento->steps->sortBy('step_number'); $fmt = fn ($v) => rtrim(rtrim(number_format((float) $v, 3, '.', ''), '0'), '.'); @endphp @section('content')
← {{ $fermento->name }}
Receta base — {{ $fermento->name }}

Ingredientes en métrico (g, ml). Se escalan a la cantidad que elija el usuario al iniciar un lote.

{{-- Rendimiento base --}}
@if($fermento->hasBaseRecipe())
Rendimiento base
{{ $fmt($fermento->base_yield_value) }} {{ $fermento->base_yield_unit }}
Cambiar
@else
Falta el rendimiento base
Define cuánto produce la receta base (p.ej. 2 L) para poder escalar los ingredientes.
Definir rendimiento
@endif
{{-- Ingredientes actuales --}}
Ingredientes ({{ $fermento->ingredients->count() }})
@forelse($fermento->ingredients as $ing)
@csrf @method('PUT')
is_optional ? 'checked' : '' }} title="Opcional"> Opcional
@csrf @method('DELETE')
@empty
Aún no hay ingredientes en la receta base.
@endforelse {{-- Añadir ingrediente --}}
Añadir ingrediente
@csrf
@error('ingredient_id')
{{ $message }}
@enderror
{{-- Crear ingrediente del catálogo en línea (mismo endpoint que el wizard). --}} @endsection @push('scripts') @endpush