Moved to Angular 20
Moved to Tailwind 4 Moved to Python 3.13 Enabled arm64/v8 Builds
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { CurrencyPipe } from '@angular/common';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { FormArray, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
@ -17,7 +17,6 @@ import { map } from 'rxjs/operators';
|
||||
import { MenuCategory } from '../core/menu-category';
|
||||
import { ToasterService } from '../core/toaster.service';
|
||||
import { ToCsvService } from '../shared/to-csv.service';
|
||||
|
||||
import { UpdateProductPrices } from './update-product-prices';
|
||||
import { UpdateProductPricesDataSource } from './update-product-prices-datasource';
|
||||
import { UpdateProductPricesService } from './update-product-prices.service';
|
||||
@ -41,6 +40,12 @@ import { UpdateProductPricesService } from './update-product-prices.service';
|
||||
],
|
||||
})
|
||||
export class UpdateProductPricesComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private toCsv = inject(ToCsvService);
|
||||
private toaster = inject(ToasterService);
|
||||
private ser = inject(UpdateProductPricesService);
|
||||
|
||||
info: UpdateProductPrices = new UpdateProductPrices();
|
||||
dataSource: UpdateProductPricesDataSource = new UpdateProductPricesDataSource(this.info.items);
|
||||
form: FormGroup<{
|
||||
@ -58,13 +63,7 @@ export class UpdateProductPricesComponent implements OnInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['name', 'oldPrice', 'newPrice'];
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private toCsv: ToCsvService,
|
||||
private toaster: ToasterService,
|
||||
private ser: UpdateProductPricesService,
|
||||
) {
|
||||
constructor() {
|
||||
// Create form
|
||||
this.form = new FormGroup({
|
||||
date: new FormControl(new Date(), { nonNullable: true }),
|
||||
|
||||
@ -2,7 +2,6 @@ import { Routes } from '@angular/router';
|
||||
|
||||
import { authGuard } from '../auth/auth-guard.service';
|
||||
import { menuCategoryListResolver } from '../menu-category/menu-category-list.resolver';
|
||||
|
||||
import { UpdateProductPricesComponent } from './update-product-prices.component';
|
||||
import { updateProductPricesResolver } from './update-product-prices.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 { Product } from '../core/product';
|
||||
|
||||
import { UpdateProductPrices } from './update-product-prices';
|
||||
|
||||
const url = '/api/update-product-prices';
|
||||
@ -15,10 +14,8 @@ const serviceName = 'UpdateProductPricesService';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class UpdateProductPricesService {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
private http = inject(HttpClient);
|
||||
private log = inject(ErrorLoggerService);
|
||||
|
||||
get(id: string | null, date: string | null): Observable<UpdateProductPrices> {
|
||||
const getUrl: string = id === null ? url : `${url}/${id}`;
|
||||
|
||||
Reference in New Issue
Block a user