Chore: Updated to Angular 16

This commit is contained in:
tanshu committed 2023-07-23 09:01:18 +05:30
1 parent 9589081046
commit 78d98f979d
99 files changed
+416 -232

No files matched your search

@@ -54,28 +54,28 @@
<ng-container matColumnDef="quantity">
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
<mat-cell *matCellDef="let row" class="right">{{
row.quantity | number : '1.2-2'
row.quantity | number: '1.2-2'
}}</mat-cell>
<mat-footer-cell *matFooterCellDef class="right">
{{ info.footer.quantity | number : '1.2-2' }}
{{ info.footer.quantity | number: '1.2-2' }}
</mat-footer-cell>
</ng-container>
<!-- Rate Column -->
<ng-container matColumnDef="rate">
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency : 'INR' }}</mat-cell>
<mat-cell *matCellDef="let row" class="right">{{ row.rate | currency: 'INR' }}</mat-cell>
<mat-footer-cell *matFooterCellDef class="right">
{{ info.footer.rate | currency : 'INR' }}
{{ info.footer.rate | currency: 'INR' }}
</mat-footer-cell>
</ng-container>
<!-- Amount Column -->
<ng-container matColumnDef="amount">
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Amount</mat-header-cell>
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency : 'INR' }}</mat-cell>
<mat-cell *matCellDef="let row" class="right">{{ row.amount | currency: 'INR' }}</mat-cell>
<mat-footer-cell *matFooterCellDef class="right">
{{ info.footer.amount | currency : 'INR' }}
{{ info.footer.amount | currency: 'INR' }}
</mat-footer-cell>
</ng-container>
@@ -28,7 +28,10 @@ export class PurchasesComponent implements OnInit {
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
displayedColumns = ['product', 'quantity', 'rate', 'amount'];
constructor(private route: ActivatedRoute, private router: Router) {
constructor(
private route: ActivatedRoute,
private router: Router,
) {
this.form = new FormGroup({
startDate: new FormControl(new Date(), { nonNullable: true }),
finishDate: new FormControl(new Date(), { nonNullable: true }),
@@ -14,7 +14,10 @@ const serviceName = 'PurchasesService';
providedIn: 'root',
})
export class PurchasesService {
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
constructor(
private http: HttpClient,
private log: ErrorLoggerService,
) {}
list(startDate: string | null, finishDate: string | null): Observable<Purchases> {
const startDateWithSlash = startDate ? `/${startDate}` : '';