Add CreateRecipePage component for recipe creation with ingredients. Updated UX

This commit is contained in:
Nils-Johan Gynther
2026-04-09 22:53:52 +02:00
parent 3e38cb5f98
commit 898ac2ef19
7 changed files with 293 additions and 23 deletions
+19 -1
View File
@@ -4,9 +4,27 @@ import {
IsString,
ValidateNested,
ArrayMinSize,
IsInt,
IsNumber,
Min,
} from 'class-validator';
import { Type } from 'class-transformer';
import { CreateRecipeIngredientDto } from './create-recipe-ingredient.dto';
class CreateRecipeIngredientDto {
@IsInt()
productId!: number;
@IsNumber()
@Min(0.01)
quantity!: number;
@IsString()
unit!: string;
@IsOptional()
@IsString()
note?: string;
}
export class CreateRecipeDto {
@IsString()