Moved to Angular v20 and Tailwind v4 plus all related dependencies
Renamed Docker directory. Also serving static files from FastAPI.
This commit is contained in:
@@ -1,30 +1,29 @@
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { Component, ElementRef, HostListener, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, ElementRef, HostListener, inject, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
import { MatCard, MatCardHeader, MatCardTitle, MatCardContent } from '@angular/material/card';
|
||||
import { MatDatepickerInput, MatDatepickerToggle, MatDatepicker } from '@angular/material/datepicker';
|
||||
import { MatCard, MatCardContent, MatCardHeader, MatCardTitle } from '@angular/material/card';
|
||||
import { MatDatepicker, MatDatepickerInput, MatDatepickerToggle } from '@angular/material/datepicker';
|
||||
import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';
|
||||
import { MatInput } from '@angular/material/input';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort, MatSortHeader } from '@angular/material/sort';
|
||||
import {
|
||||
MatTable,
|
||||
MatColumnDef,
|
||||
MatHeaderCellDef,
|
||||
MatHeaderCell,
|
||||
MatCellDef,
|
||||
MatCell,
|
||||
MatHeaderRowDef,
|
||||
MatCellDef,
|
||||
MatColumnDef,
|
||||
MatHeaderCell,
|
||||
MatHeaderCellDef,
|
||||
MatHeaderRow,
|
||||
MatRowDef,
|
||||
MatHeaderRowDef,
|
||||
MatRow,
|
||||
MatRowDef,
|
||||
MatTable,
|
||||
} from '@angular/material/table';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import moment from 'moment';
|
||||
|
||||
import { AccountingPipe } from '../shared/accounting.pipe';
|
||||
|
||||
import { NetTransactions } from './net-transactions';
|
||||
import { NetTransactionsDataSource } from './net-transactions-datasource';
|
||||
|
||||
@@ -32,7 +31,6 @@ import { NetTransactionsDataSource } from './net-transactions-datasource';
|
||||
selector: 'app-net-transactions',
|
||||
templateUrl: './net-transactions.component.html',
|
||||
styleUrls: ['./net-transactions.component.css'],
|
||||
standalone: true,
|
||||
imports: [
|
||||
MatCard,
|
||||
MatCardHeader,
|
||||
@@ -65,6 +63,9 @@ import { NetTransactionsDataSource } from './net-transactions-datasource';
|
||||
],
|
||||
})
|
||||
export class NetTransactionsComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
@ViewChild(MatPaginator, { static: true }) paginator!: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort!: MatSort;
|
||||
@ViewChild('startDateElement', { static: true }) startDate!: ElementRef<HTMLInputElement>;
|
||||
@@ -86,10 +87,7 @@ export class NetTransactionsComponent implements OnInit {
|
||||
this.startDate.nativeElement.select();
|
||||
}
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
constructor() {
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Routes } from '@angular/router';
|
||||
|
||||
import { authGuard } from '../auth/auth-guard.service';
|
||||
|
||||
import { NetTransactionsComponent } from './net-transactions.component';
|
||||
import { netTransactionsResolver } from './net-transactions.resolver';
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
|
||||
import { ErrorLoggerService } from '../core/error-logger.service';
|
||||
|
||||
import { NetTransactions } from './net-transactions';
|
||||
|
||||
const url = '/api/net-transactions';
|
||||
@@ -14,10 +13,8 @@ const serviceName = 'NetTransactionsService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class NetTransactionsService {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
private http = inject(HttpClient);
|
||||
private log = inject(ErrorLoggerService);
|
||||
|
||||
list(startDate: string | null, finishDate: string | null): Observable<NetTransactions> {
|
||||
const startDateWithSlash = startDate ? `/${startDate}` : '';
|
||||
|
||||
Reference in New Issue
Block a user