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

View File

@ -1,7 +1,28 @@
import { CurrencyPipe } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { MatIconButton, MatButton } from '@angular/material/button';
import { MatCard, MatCardHeader, MatCardTitleGroup, MatCardTitle, MatCardContent } from '@angular/material/card';
import { MatOption } from '@angular/material/core';
import { MatDatepickerInput, MatDatepickerToggle, MatDatepicker } from '@angular/material/datepicker';
import { MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';
import { MatIcon } from '@angular/material/icon';
import { MatInput } from '@angular/material/input';
import { MatSelect } from '@angular/material/select';
import {
MatTable,
MatColumnDef,
MatHeaderCellDef,
MatHeaderCell,
MatCellDef,
MatCell,
MatHeaderRowDef,
MatHeaderRow,
MatRowDef,
MatRow,
} from '@angular/material/table';
import { ActivatedRoute, Router } from '@angular/router';
import * as moment from 'moment';
import moment from 'moment';
import { ToasterService } from '../core/toaster.service';
import { User } from '../core/user';
@ -15,6 +36,38 @@ import { CashierReportService } from './cashier-report.service';
selector: 'app-cashier-report',
templateUrl: './cashier-report.component.html',
styleUrls: ['./cashier-report.component.css'],
standalone: true,
imports: [
MatCard,
MatCardHeader,
MatCardTitleGroup,
MatCardTitle,
MatIconButton,
MatIcon,
MatCardContent,
ReactiveFormsModule,
MatFormField,
MatLabel,
MatInput,
MatDatepickerInput,
MatDatepickerToggle,
MatSuffix,
MatDatepicker,
MatSelect,
MatOption,
MatButton,
MatTable,
MatColumnDef,
MatHeaderCellDef,
MatHeaderCell,
MatCellDef,
MatCell,
MatHeaderRowDef,
MatHeaderRow,
MatRowDef,
MatRow,
CurrencyPipe,
],
})
export class CashierReportComponent implements OnInit {
activeCashiers: User[] = [];
@ -73,14 +126,14 @@ export class CashierReportComponent implements OnInit {
}
print() {
this.ser.print(this.info.cashier.id as string, this.info.startDate, this.info.finishDate).subscribe(
() => {
this.ser.print(this.info.cashier.id as string, this.info.startDate, this.info.finishDate).subscribe({
next: () => {
this.toaster.show('', 'Successfully Printed');
},
(error) => {
error: (error) => {
this.toaster.show('Error', error);
},
);
});
}
getInfo(): CashierReport {