11D recipe preview
This commit is contained in:
@@ -53,4 +53,65 @@ export type InventoryConsumption = {
|
||||
amountUsed: string;
|
||||
comment: string | null;
|
||||
createdAt: string;
|
||||
};
|
||||
export type RecipeIngredient = {
|
||||
id: number;
|
||||
recipeId: number;
|
||||
productId: number;
|
||||
quantity: string;
|
||||
unit: string;
|
||||
note: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
product: Product;
|
||||
};
|
||||
|
||||
export type Recipe = {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string | null;
|
||||
instructions: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
ingredients: RecipeIngredient[];
|
||||
};
|
||||
|
||||
export type RecipePreviewInventoryItem = {
|
||||
id: number;
|
||||
quantity: string;
|
||||
unit: string;
|
||||
brand: string | null;
|
||||
location: string | null;
|
||||
bestBeforeDate: string | null;
|
||||
};
|
||||
|
||||
export type RecipeInventoryPreviewIngredient = {
|
||||
ingredientId: number;
|
||||
productId: number;
|
||||
productName: string;
|
||||
requiredQuantity: number;
|
||||
requiredUnit: string;
|
||||
note: string | null;
|
||||
availableQuantity: number;
|
||||
availableUnit: string | null;
|
||||
matchingInventoryItems: RecipePreviewInventoryItem[];
|
||||
otherInventoryItems: RecipePreviewInventoryItem[];
|
||||
status: 'enough' | 'missing' | 'unit_mismatch';
|
||||
missingQuantity: number;
|
||||
};
|
||||
|
||||
export type RecipeInventoryPreview = {
|
||||
recipe: {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string | null;
|
||||
};
|
||||
ingredients: RecipeInventoryPreviewIngredient[];
|
||||
summary: {
|
||||
totalIngredients: number;
|
||||
enoughCount: number;
|
||||
missingCount: number;
|
||||
unitMismatchCount: number;
|
||||
canCookExactly: boolean;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user