From 5c9f6c812069c9af55567171bebc764e39bd5be1 Mon Sep 17 00:00:00 2001 From: Francesco Lorenzo D'Amico Date: Tue, 27 May 2025 13:47:51 +0200 Subject: [PATCH] add comment for a specification of this code --- ...4459_CreateNewTableRecipeIngredientShoppinglist.Designer.cs | 3 --- Francesco.Recipes.World/Views/Recipe/Details.cshtml | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Francesco.Recipes.World/Migrations/20250324124459_CreateNewTableRecipeIngredientShoppinglist.Designer.cs b/Francesco.Recipes.World/Migrations/20250324124459_CreateNewTableRecipeIngredientShoppinglist.Designer.cs index 6807402..e98a564 100644 --- a/Francesco.Recipes.World/Migrations/20250324124459_CreateNewTableRecipeIngredientShoppinglist.Designer.cs +++ b/Francesco.Recipes.World/Migrations/20250324124459_CreateNewTableRecipeIngredientShoppinglist.Designer.cs @@ -1,11 +1,8 @@ // -using System; using Francesco.Recipes.World.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable diff --git a/Francesco.Recipes.World/Views/Recipe/Details.cshtml b/Francesco.Recipes.World/Views/Recipe/Details.cshtml index 777ebce..545b9f3 100644 --- a/Francesco.Recipes.World/Views/Recipe/Details.cshtml +++ b/Francesco.Recipes.World/Views/Recipe/Details.cshtml @@ -123,6 +123,8 @@ finalQuantity = Math.round(adjustedQuantity); } } + // Convert small unit "msp" (pinch) to teaspoons (TL) for a better estimate + // 4 pinches = about 1 TL → show that as a note, rounded to 1 decimal else if (specialUnits.smallUnits.includes(unitSymbol)) { if (adjustedQuantity > 3) { finalQuantity = Math.round(adjustedQuantity / 4 * 10) / 10;