Moved to Angular 20
Moved to Tailwind 4 Moved to Python 3.13 Enabled arm64/v8 Builds
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
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';
|
||||
@ -14,7 +14,6 @@ import moment from 'moment';
|
||||
import { environment } from '../app.environment';
|
||||
import { AuthService } from '../auth/auth.service';
|
||||
import { ToasterService } from '../core/toaster.service';
|
||||
|
||||
import { SettingsService } from './settings.service';
|
||||
|
||||
@Component({
|
||||
@ -33,6 +32,13 @@ import { SettingsService } from './settings.service';
|
||||
],
|
||||
})
|
||||
export class SettingsComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dialog = inject(MatDialog);
|
||||
private toaster = inject(ToasterService);
|
||||
auth = inject(AuthService);
|
||||
private ser = inject(SettingsService);
|
||||
|
||||
prefillCustomerDiscount = true;
|
||||
version: string;
|
||||
maintenanceForm: FormGroup<{
|
||||
@ -43,14 +49,7 @@ export class SettingsComponent implements OnInit {
|
||||
beerFile: File | null = null;
|
||||
saleFile: File | null = null;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dialog: MatDialog,
|
||||
private toaster: ToasterService,
|
||||
public auth: AuthService,
|
||||
private ser: SettingsService,
|
||||
) {
|
||||
constructor() {
|
||||
this.version = environment.version;
|
||||
this.maintenanceForm = 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 { prefillCustomerDiscountResolver } from './prefill-customer-discount.resolver';
|
||||
import { SettingsComponent } from './settings.component';
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
|
||||
@ -9,10 +9,8 @@ const serviceName = 'SettingsService';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class SettingsService {
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private log: ErrorLoggerService,
|
||||
) {}
|
||||
private http = inject(HttpClient);
|
||||
private log = inject(ErrorLoggerService);
|
||||
|
||||
getPrefillCustomerDiscount(): Observable<boolean> {
|
||||
const url = '/api/settings/prefill-customer-discount';
|
||||
|
||||
Reference in New Issue
Block a user