Moved to Angular 20
Moved to Tailwind 4 Moved to Python 3.13 Enabled arm64/v8 Builds
This commit is contained in:
@ -2,7 +2,6 @@ import { inject } from '@angular/core';
|
||||
import { ResolveFn } from '@angular/router';
|
||||
|
||||
import { User } from '../core/user';
|
||||
|
||||
import { CashierReportService } from './cashier-report.service';
|
||||
|
||||
export const activeCashiersResolver: ResolveFn<User[]> = (route) => {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
@ -16,7 +16,6 @@ import moment from 'moment';
|
||||
import { ToasterService } from '../core/toaster.service';
|
||||
import { User } from '../core/user';
|
||||
import { ToCsvService } from '../shared/to-csv.service';
|
||||
|
||||
import { CashierReport } from './cashier-report';
|
||||
import { CashierReportDataSource } from './cashier-report-datasource';
|
||||
import { CashierReportService } from './cashier-report.service';
|
||||
@ -40,6 +39,12 @@ import { CashierReportService } from './cashier-report.service';
|
||||
],
|
||||
})
|
||||
export class CashierReportComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private toCsv = inject(ToCsvService);
|
||||
private toaster = inject(ToasterService);
|
||||
private ser = inject(CashierReportService);
|
||||
|
||||
activeCashiers: User[] = [];
|
||||
info: CashierReport = new CashierReport();
|
||||
dataSource: CashierReportDataSource = new CashierReportDataSource(this.info.amounts);
|
||||
@ -52,13 +57,7 @@ export class CashierReportComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['name', 'amount'];
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private toCsv: ToCsvService,
|
||||
private toaster: ToasterService,
|
||||
private ser: CashierReportService,
|
||||
) {
|
||||
constructor() {
|
||||
// Create form
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { Routes } from '@angular/router';
|
||||
|
||||
import { authGuard } from '../auth/auth-guard.service';
|
||||
|
||||
import { activeCashiersResolver } from './active-cashiers.resolver';
|
||||
import { CashierReportComponent } from './cashier-report.component';
|
||||
import { cashierReportResolver } from './cashier-report.resolver';
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
|
||||
import { ErrorLoggerService } from '../core/error-logger.service';
|
||||
import { User } from '../core/user';
|
||||
|
||||
import { CashierReport } from './cashier-report';
|
||||
|
||||
const url = '/api/cashier-report';
|
||||
@ -15,10 +14,8 @@ const serviceName = 'CashierReportService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class CashierReportService {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
private http = inject(HttpClient);
|
||||
private log = inject(ErrorLoggerService);
|
||||
|
||||
list(id: string | null, startDate: string | null, finishDate: string | null): Observable<CashierReport> {
|
||||
const listUrl = id === null ? url : `${url}/${id}`;
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { User } from '../core/user';
|
||||
|
||||
import { CashierReportDisplayItem } from './cashier-report-display-item';
|
||||
import { CashierReportPrintItem } from './cashier-report-print-item';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user