Removed Recipe Template as it was not needed.
Moved host listeners to the component declaration. Form submit on Return fixed.
This commit is contained in:
@@ -312,7 +312,7 @@
|
||||
<div class="recipe-print__header">
|
||||
<h1 class="recipe-print__title">{{ dishName }}</h1>
|
||||
<div class="recipe-print__meta">
|
||||
<span><strong>Date:</strong> {{ formModel().basics.date.format('DD-MMM-YYYY') }}</span>
|
||||
<span><strong>Date:</strong> {{ formModel().basics.date }}</span>
|
||||
<span><strong>Source:</strong> {{ formModel().basics.source }}</span>
|
||||
<span>
|
||||
<strong>Yield:</strong>
|
||||
|
||||
@@ -63,7 +63,7 @@ export interface IngredientFormData {
|
||||
|
||||
export interface RecipeDetailFormData {
|
||||
basics: {
|
||||
date: moment.Moment;
|
||||
date: string;
|
||||
source: string;
|
||||
recipeYield: string;
|
||||
product: ProductSku | string | null;
|
||||
@@ -136,7 +136,7 @@ export class RecipeDetailComponent {
|
||||
source: this.item,
|
||||
computation: (itemVal): RecipeDetailFormData => ({
|
||||
basics: {
|
||||
date: itemVal.date ? moment(itemVal.date) : moment(new Date()),
|
||||
date: itemVal.date,
|
||||
source: itemVal.source ?? '',
|
||||
recipeYield: `${itemVal.recipeYield ?? ''}`,
|
||||
product: itemVal.sku ?? null,
|
||||
|
||||
Reference in New Issue
Block a user