Feature: Adding recipe templates to print recipes.

Feautre: Recipe export to xlsx
Chore: Python 11 style type annotations
Chore: Moved to sqlalchemy 2.0
Chore: Minimum python is 3.11
Fix: Fix nullability of a lot of fields in the database.
This commit is contained in:
2023-07-23 08:12:21 +05:30
parent d2d26ab1ae
commit 22cac61761
344 changed files with 3247 additions and 2370 deletions
-23
View File
@@ -4,7 +4,6 @@ import { Observable, of as observableOf } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { ErrorLoggerService } from '../core/error-logger.service';
import { ProductSku } from '../core/product-sku';
import { Recipe } from './recipe';
@@ -55,26 +54,4 @@ export class RecipeService {
.delete<Recipe>(`${url}/${id}`)
.pipe(catchError(this.log.handleError(serviceName, 'delete'))) as Observable<Recipe>;
}
getIngredientDetails(
id: string,
startDate: string | null,
finishDate: string | null,
): Observable<ProductSku> {
const getUrl = `${url}/ingredient-details/${id}`;
const options = {
params: new HttpParams(),
};
if (startDate !== null) {
options.params = options.params.set('s', startDate);
}
if (finishDate !== null) {
options.params = options.params.set('f', finishDate);
}
return this.http
.get<ProductSku>(getUrl, options)
.pipe(
catchError(this.log.handleError(serviceName, `get id=${id}`)),
) as Observable<ProductSku>;
}
}