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

@ -39,7 +39,7 @@
<mat-label>Discount on {{ r.name }}</mat-label>
<input matInput formControlName="discount" />
<span matSuffix>%</span>
<mat-hint>Max {{ r.limit | percent : '1.2-2' }}</mat-hint>
<mat-hint>Max {{ r.limit | percent: '1.2-2' }}</mat-hint>
</mat-form-field>
</div>
</div>

View File

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

View File

@ -42,7 +42,7 @@
<mat-cell *matCellDef="let row">
<ul>
<li *ngFor="let discount of row.discounts">
{{ discount.name }} - {{ discount.discount | percent : '1.2-2' }}
{{ discount.name }} - {{ discount.discount | percent: '1.2-2' }}
</li>
</ul>
</mat-cell>

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 { Customer } from '../core/customer';
@ -9,7 +9,7 @@ import { CustomerService } from './customer.service';
@Injectable({
providedIn: 'root',
})
export class CustomerResolver implements Resolve<Customer> {
export class CustomerResolver {
constructor(private ser: CustomerService) {}
resolve(route: ActivatedRouteSnapshot): Observable<Customer> {

View File

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