feat: add unit mapping functionality
Test Suite / test (24.15.0) (push) Has been cancelled

- Added new API path for unit mappings in `api_paths.dart`.
- Implemented `upsertUnitMapping` method in `ImportRepository` to handle unit mapping creation.
- Updated `ReceiptImportTab` to learn and save unit mappings during receipt import.
- Created DTO for unit mapping with validation in `create-unit-mapping.dto.ts`.
- Added SQL migration for `UnitMapping` table creation with necessary constraints.
This commit is contained in:
Nils-Johan Gynther
2026-05-07 10:00:42 +02:00
parent 26823fbf35
commit a68a0ca86f
35 changed files with 558 additions and 24 deletions
+3
View File
@@ -26,6 +26,7 @@ export declare class PantryController {
createdAt: Date;
updatedAt: Date;
productId: number;
location: string | null;
userId: number;
})[]>;
create(user: {
@@ -51,6 +52,7 @@ export declare class PantryController {
createdAt: Date;
updatedAt: Date;
productId: number;
location: string | null;
userId: number;
}>;
remove(user: {
@@ -60,6 +62,7 @@ export declare class PantryController {
createdAt: Date;
updatedAt: Date;
productId: number;
location: string | null;
userId: number;
}>;
}