Moved to Angular 16
Moved to FastAPI 0.100.0
Moved to pydantic 2.0
This commit is contained in:
2023-07-22 09:20:01 +05:30
parent 8b2d15b9e1
commit 09b762d154
161 changed files with 693 additions and 753 deletions
@@ -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 { BeerSaleReport } from './beer-sale-report';
@@ -8,7 +8,7 @@ import { BeerSaleReportService } from './beer-sale-report.service';
@Injectable({
providedIn: 'root',
})
export class BeerSaleReportResolver implements Resolve<BeerSaleReport> {
export class BeerSaleReportResolver {
constructor(private ser: BeerSaleReportService) {}
resolve(route: ActivatedRouteSnapshot): Observable<BeerSaleReport> {
@@ -29,7 +29,11 @@ export class BeerSaleReportComponent implements OnInit {
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
displayedColumns: string[] = ['date'];
constructor(private route: ActivatedRoute, private router: Router, private toCsv: ToCsvService) {
constructor(
private route: ActivatedRoute,
private router: Router,
private toCsv: ToCsvService,
) {
// Create form
this.form = new FormGroup({
startDate: new FormControl(new Date(), { nonNullable: true }),
@@ -14,7 +14,10 @@ const serviceName = 'BeerSaleReportService';
providedIn: 'root',
})
export class BeerSaleReportService {
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
constructor(
private http: HttpClient,
private log: ErrorLoggerService,
) {}
get(
startDate: string | null,