Chore: Updated to Angular 16

This commit is contained in:
2023-07-23 09:01:18 +05:30
parent 9589081046
commit 78d98f979d
99 changed files with 416 additions and 232 deletions

View File

@ -52,18 +52,18 @@
<!-- 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>
<!-- Total Column -->
<ng-container matColumnDef="total">
<mat-header-cell *matHeaderCellDef mat-sort-header class="right">Total</mat-header-cell>
<mat-cell *matCellDef="let row" class="right">{{ row.total | currency : 'INR' }}</mat-cell>
<mat-cell *matCellDef="let row" class="right">{{ row.total | currency: 'INR' }}</mat-cell>
<mat-footer-cell *matFooterCellDef class="right">
{{ info.footer.total | currency : 'INR' }}
{{ info.footer.total | currency: 'INR' }}
</mat-footer-cell>
</ng-container>

View File

@ -27,7 +27,10 @@ export class ProfitLossComponent implements OnInit {
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
displayedColumns = ['group', 'name', 'amount', 'total'];
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 }),

View File

@ -14,7 +14,10 @@ const serviceName = 'ProfitLossService';
providedIn: 'root',
})
export class ProfitLossService {
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
constructor(
private http: HttpClient,
private log: ErrorLoggerService,
) {}
list(startDate: string | null, finishDate: string | null): Observable<ProfitLoss> {
const startDateWithSlash = startDate ? `/${startDate}` : '';