Chore: Upgrade to Angular v18

Chore: Upgrade to Python 3.12
Chore: Upgrade to psycopg3
This commit is contained in:
2024-06-03 13:22:56 +05:30
parent 56c1be5e05
commit 010e9a84db
573 changed files with 5727 additions and 6528 deletions
+31 -7
View File
@@ -1,10 +1,17 @@
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatButton } from '@angular/material/button';
import { MatCard, MatCardContent } from '@angular/material/card';
import { MatDatepickerInput, MatDatepickerToggle, MatDatepicker } from '@angular/material/datepicker';
import { MatDialog } from '@angular/material/dialog';
import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';
import { MatInput } from '@angular/material/input';
import { MatSlideToggle } from '@angular/material/slide-toggle';
import { MatTabGroup, MatTab } from '@angular/material/tabs';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { environment } from '../../environments/environment';
import { environment } from '../app.environment';
import { AuthService } from '../auth/auth.service';
import { ToasterService } from '../core/toaster.service';
@@ -14,6 +21,23 @@ import { SettingsService } from './settings.service';
selector: 'app-settings',
templateUrl: './settings.component.html',
styleUrls: ['./settings.component.css'],
standalone: true,
imports: [
MatTabGroup,
MatTab,
MatCard,
MatCardContent,
MatSlideToggle,
ReactiveFormsModule,
MatFormField,
MatLabel,
MatInput,
MatDatepickerInput,
MatDatepickerToggle,
MatSuffix,
MatDatepicker,
MatButton,
],
})
export class SettingsComponent implements OnInit {
prefillCustomerDiscount = true;
@@ -74,13 +98,13 @@ export class SettingsComponent implements OnInit {
this.toaster.show('Danger', 'Please choose both files first!');
return;
}
this.ser.runMaintenance(startDate, finishDate, this.beerFile, this.saleFile).subscribe(
() => {
this.ser.runMaintenance(startDate, finishDate, this.beerFile, this.saleFile).subscribe({
next: () => {
this.toaster.show('Success', 'Maintenance done');
},
(error) => {
error: (error) => {
this.toaster.show('Danger', error);
},
);
});
}
}