Moved to Angular 16
Moved to FastAPI 0.100.0
Moved to pydantic 2.0
This commit is contained in:
2023-07-22 09:19:48 +05:30
parent 8b2d15b9e1
commit 09b762d154
161 changed files with 693 additions and 753 deletions

View File

@ -1,5 +1,4 @@
import { Injectable } from '@angular/core';
import { Resolve } from '@angular/router';
import { Observable } from 'rxjs';
import { Product } from '../core/product';
@ -9,7 +8,7 @@ import { ProductService } from './product.service';
@Injectable({
providedIn: 'root',
})
export class ProductListResolver implements Resolve<Product[]> {
export class ProductListResolver {
constructor(private ser: ProductService) {}
resolve(): Observable<Product[]> {

View File

@ -56,7 +56,7 @@
<!-- Price Column -->
<ng-container matColumnDef="price">
<mat-header-cell *matHeaderCellDef class="right">Price</mat-header-cell>
<mat-cell *matCellDef="let row" class="right">{{ row.price | currency : 'INR' }}</mat-cell>
<mat-cell *matCellDef="let row" class="right">{{ row.price | currency: 'INR' }}</mat-cell>
</ng-container>
<!-- Menu Category Column -->
@ -95,7 +95,7 @@
<!-- Quantity Column -->
<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' }}</mat-cell>
<mat-cell *matCellDef="let row" class="right">{{ row.quantity | number: '1.2-2' }}</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve } from '@angular/router';
import { ActivatedRouteSnapshot } from '@angular/router';
import { Observable } from 'rxjs';
import { Product } from '../core/product';
@ -9,7 +9,7 @@ import { ProductService } from './product.service';
@Injectable({
providedIn: 'root',
})
export class ProductResolver implements Resolve<Product> {
export class ProductResolver {
constructor(private ser: ProductService) {}
resolve(route: ActivatedRouteSnapshot): Observable<Product> {

View File

@ -15,7 +15,10 @@ const serviceName = 'ProductService';
@Injectable({ providedIn: 'root' })
export class ProductService {
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
constructor(
private http: HttpClient,
private log: ErrorLoggerService,
) {}
get(id: string | null): Observable<Product> {
const getUrl: string = id === null ? `${url}` : `${url}/${id}`;