- 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:
@@ -1,5 +1,6 @@
|
||||
import { ReceiptImportService } from './receipt-import.service';
|
||||
import { ParsedReceiptItem } from './dto/parsed-receipt-item.dto';
|
||||
import { CreateUnitMappingDto } from './dto/create-unit-mapping.dto';
|
||||
export declare class ReceiptImportController {
|
||||
private readonly receiptImportService;
|
||||
constructor(receiptImportService: ReceiptImportService);
|
||||
@@ -7,4 +8,5 @@ export declare class ReceiptImportController {
|
||||
refreshCategories(): Promise<{
|
||||
message: string;
|
||||
}>;
|
||||
upsertUnitMapping(dto: CreateUnitMappingDto, req?: any): Promise<any>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user