Recipe Editor

@if (itemResource.isLoading()) { } @else if (itemResource.error()) { } @else {
@if (selectedSection === 'basics') {

Basics

Date Source
Dish / Product @for (product of products(); track product) { {{ product.name }} } Yield
} @if (selectedSection === 'ingredients') {

Ingredients

Ingredient @for (product of ingredients(); track product) { {{ product.name }} ({{ product.fractionUnits }}) } Quantity Description
Product {{ row.product.name }} {{ row.description }} Quantity {{ row.quantity | number: '1.2-2' }} Units {{ row.product.fractionUnits }} Action
} @if (selectedSection === 'steps') {

Steps

Add steps and reorder them using ↑ / ↓. Keep titles short and chef-friendly.

@for (step of form.steps; track step; let i = $index) {
Step {{ i + 1 }}
Phase Title Duration (min)
Step Text
Notes (optional)
}
} @if (selectedSection === 'photos') {

Photos

Captions are optional. Reorder with ↑ / ↓.
@if (form.photos.length === 0) {

No photos yet.

} @for (p of form.photos; track p; let i = $index) {
Recipe photo
Caption
}
} @if (selectedSection === 'notes') {

Notes

Garnishing
Plating
Additional Notes
} @if (selectedSection === 'preview') {

Preview

{{ dishName }}

Date: {{ formModel().basics.date }} Source: {{ formModel().basics.source }} Yield: {{ yieldText }}

Ingredients

    @for (ing of formModel().ingredients; track ing) {
  • {{ ing.product.name }} @if (ing.description) { — {{ ing.description }} }
    {{ ing.quantity | number: '1.2-2' }} {{ ing.product.fractionUnits }}
  • }
@if (formModel().steps.length > 0) {

Steps

    @for (step of formModel().steps; track step; let i = $index) {
  1. Step {{ i + 1 }} - {{ step.phase }}: {{ step.title }} @if (step.durationMinutes) { ({{ step.durationMinutes }} min) }

    {{ step.text }}

    @if (step.notes) {

    Note: {{ step.notes }}

    }
  2. }
} @if (formModel().photos.length > 0) {

Photos

@for (p of formModel().photos; track p; let i = $index) {
Recipe photo @if (p.caption) {
{{ p.caption }}
}
}
} @if (formModel().notes.garnishing || formModel().notes.plating || formModel().notes.notes) {

Notes

@if (formModel().notes.garnishing) {
Garnishing

{{ formModel().notes.garnishing }}

} @if (formModel().notes.plating) {
Plating

{{ formModel().notes.plating }}

} @if (formModel().notes.notes) {
Additional Notes

{{ formModel().notes.notes }}

}
}
}
}
@if (id()) { }