Chore: Updated to Angular 16

This commit is contained in:
2023-07-23 09:01:18 +05:30
parent 9589081046
commit 78d98f979d
99 changed files with 416 additions and 232 deletions
@@ -104,7 +104,7 @@
<ng-container matColumnDef="quantity">
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
<mat-cell *matCellDef="let row" class="right"
>{{ row.quantity | number : '1.2-2' }} {{ row.product.fractionUnits }}</mat-cell
>{{ row.quantity | number: '1.2-2' }} {{ row.product.fractionUnits }}</mat-cell
>
</ng-container>
@@ -35,7 +35,10 @@ export class RecipeListComponent implements OnInit {
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
displayedColumns = ['name', 'yield', 'date', 'source'];
constructor(private route: ActivatedRoute, private router: Router) {
constructor(
private route: ActivatedRoute,
private router: Router,
) {
this.form = new FormGroup({
period: new FormControl(new Period(), { nonNullable: true }),
productGroup: new FormControl<ProductGroup | string | null>(null),
+4 -1
View File
@@ -12,7 +12,10 @@ const serviceName = 'RecipeService';
@Injectable({ providedIn: 'root' })
export class RecipeService {
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
constructor(
private http: HttpClient,
private log: ErrorLoggerService,
) {}
get(id: string | null): Observable<Recipe> {
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;