feat: add rematch functionality for recipe ingredients and enhance inventory management
Test Suite / test (24.15.0) (push) Has been cancelled

- Added a new API path for rematching recipe ingredients in `api_paths.dart`.
- Implemented a manual product creation dialog in `inventory_screen.dart` to allow users to create new products directly.
- Integrated the rematch functionality in `recipe_repository.dart` to handle rematching of recipe ingredients.
- Updated the recipe detail screen to include a button for triggering the rematch process.
- Introduced a new `RecipeMatchingService` in the backend to handle ingredient matching logic.
- Added database migration to include `aiEngineEnabled` column in the User table.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Nils-Johan Gynther
2026-05-06 09:20:31 +02:00
parent 9fe85a719c
commit 04b1fc3024
53 changed files with 1420 additions and 652 deletions
+19 -19
View File
@@ -6,6 +6,8 @@ export declare class UserProductsService {
findAll(userId: number): import(".prisma/client").Prisma.PrismaPromise<({
product: {
nutrition: {
id: number;
productId: number;
calories: number | null;
protein: number | null;
fat: number | null;
@@ -13,8 +15,6 @@ export declare class UserProductsService {
salt: number | null;
sugar: number | null;
fiber: number | null;
id: number;
productId: number;
} | null;
tags: ({
tag: {
@@ -26,13 +26,13 @@ export declare class UserProductsService {
tagId: number;
})[];
} & {
name: string;
category: string | null;
status: string;
name: string;
categoryId: number | null;
canonicalName: string | null;
id: number;
categoryId: number | null;
normalizedName: string;
canonicalName: string | null;
isActive: boolean;
deletedAt: Date | null;
createdAt: Date;
@@ -46,14 +46,16 @@ export declare class UserProductsService {
updatedAt: Date;
isPrivate: boolean;
productId: number;
note: string | null;
userId: number;
note: string | null;
preferredBrand: string | null;
preferredStore: string | null;
})[]>;
findOne(userId: number, productId: number): import(".prisma/client").Prisma.Prisma__UserProductClient<({
product: {
nutrition: {
id: number;
productId: number;
calories: number | null;
protein: number | null;
fat: number | null;
@@ -61,8 +63,6 @@ export declare class UserProductsService {
salt: number | null;
sugar: number | null;
fiber: number | null;
id: number;
productId: number;
} | null;
tags: ({
tag: {
@@ -74,13 +74,13 @@ export declare class UserProductsService {
tagId: number;
})[];
} & {
name: string;
category: string | null;
status: string;
name: string;
categoryId: number | null;
canonicalName: string | null;
id: number;
categoryId: number | null;
normalizedName: string;
canonicalName: string | null;
isActive: boolean;
deletedAt: Date | null;
createdAt: Date;
@@ -94,14 +94,16 @@ export declare class UserProductsService {
updatedAt: Date;
isPrivate: boolean;
productId: number;
note: string | null;
userId: number;
note: string | null;
preferredBrand: string | null;
preferredStore: string | null;
}) | null, null, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
upsert(userId: number, dto: UpsertUserProductDto): import(".prisma/client").Prisma.Prisma__UserProductClient<{
product: {
nutrition: {
id: number;
productId: number;
calories: number | null;
protein: number | null;
fat: number | null;
@@ -109,8 +111,6 @@ export declare class UserProductsService {
salt: number | null;
sugar: number | null;
fiber: number | null;
id: number;
productId: number;
} | null;
tags: ({
tag: {
@@ -122,13 +122,13 @@ export declare class UserProductsService {
tagId: number;
})[];
} & {
name: string;
category: string | null;
status: string;
name: string;
categoryId: number | null;
canonicalName: string | null;
id: number;
categoryId: number | null;
normalizedName: string;
canonicalName: string | null;
isActive: boolean;
deletedAt: Date | null;
createdAt: Date;
@@ -142,8 +142,8 @@ export declare class UserProductsService {
updatedAt: Date;
isPrivate: boolean;
productId: number;
note: string | null;
userId: number;
note: string | null;
preferredBrand: string | null;
preferredStore: string | null;
}, never, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;
@@ -153,8 +153,8 @@ export declare class UserProductsService {
updatedAt: Date;
isPrivate: boolean;
productId: number;
note: string | null;
userId: number;
note: string | null;
preferredBrand: string | null;
preferredStore: string | null;
}, never, import("@prisma/client/runtime/library").DefaultArgs, import(".prisma/client").Prisma.PrismaClientOptions>;