Upgrading to Angular 20:
Replaced checked in package-lock.json by regenerated one. Ran ng update @angular/core@20 @angular/cli@20 Ran npm install @angular-builders/jest@^20.0.0 @fortawesome/angular-fontawesome@^3.0.0 @swimlane/ngx-graph@^11 Ran npm install ngx-mat-select-search@^8.0.2. Ran ng update @angular/material@20. Updated all eslint and typescript to the latest versions. Removed @angular-devkit/schematics. Updated fontawesome. Updated rxjs and tslib. Moved required node version from 16 to 20. Updated jest-preset-angular. Set preserveWhitespaces to false. Corrected two type declarations in two typescript files to make ng serve run without errors. Removed unused angular-devkit/schematics from view-user.component.ts . Updated list of supported browsers. Upgraded prettier. Ran prettier . --write the first time. Ran prettier . --write the second time. Ran ng generate @angular/core:inject with defaults, excepted a handful of files. Fixed remaining eslint problems. Added dist directory to ignores in eslint.config.js. Let prettier fix formatting, almost everything is just line breaks. Made htmlhint ignore @if and @for Angular constructs. Updated node version in Github workflow to 22.12.0 (build.yml). Updated .env.ts. Updated Angular datetime format strings from YYYY-MM-DD to yyyy-MM-dd. Merged changes from dev into angular20 branch.
This commit is contained in:
+166
-163
@@ -1,170 +1,173 @@
|
||||
<mat-card class="container" *ngIf="!isCollapsed">
|
||||
<div class="alert" *ngIf="noData">
|
||||
<div class="message">
|
||||
<i class="fa fa-exclamation-circle alert-check"></i>
|
||||
{{ 'labels.text.No repayments and disbursal' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form [formGroup]="collectionSheetForm" (ngSubmit)="previewCollectionSheet()">
|
||||
<div class="layout-row-wrap gap-2percent responsive-column align-start-center">
|
||||
<mat-form-field class="flex-98">
|
||||
<mat-label>{{ 'labels.inputs.Branch Office' | translate }}</mat-label>
|
||||
<mat-select formControlName="officeId" required>
|
||||
<mat-option *ngFor="let office of officesData" [value]="office.id">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="collectionSheetForm.controls.officeId.hasError('required')">
|
||||
{{ 'labels.inputs.Branch Office' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-98" (click)="transactionDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Repayment Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="transactionDatePicker"
|
||||
required
|
||||
formControlName="transactionDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #transactionDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="collectionSheetForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Repayment Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field class="flex-98">
|
||||
<mat-label>{{ 'labels.inputs.Staff' | translate }}</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
<mat-option *ngFor="let loanOfficer of loanOfficerData" [value]="loanOfficer.id">
|
||||
{{ loanOfficer.displayName }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
<button type="button" mat-raised-button [routerLink]="['../']">{{ 'labels.buttons.Cancel' | translate }}</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!collectionSheetForm.valid">
|
||||
<fa-icon icon="search" class="m-r-10"></fa-icon> {{ 'labels.buttons.Collection Sheet' | translate }}
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</form>
|
||||
</mat-card>
|
||||
|
||||
<div class="showcollectionsheet">
|
||||
<div class="container" *ngIf="isCollapsed">
|
||||
<mat-card>
|
||||
<div class="m-b-20">
|
||||
<button mat-raised-button color="primary" (click)="isCollapsed = false">
|
||||
{{ 'labels.buttons.Parameters' | translate }}
|
||||
</button>
|
||||
@if (!isCollapsed) {
|
||||
<mat-card class="container">
|
||||
@if (noData) {
|
||||
<div class="alert">
|
||||
<div class="message">
|
||||
<i class="fa fa-exclamation-circle alert-check"></i>
|
||||
{{ 'labels.text.No repayments and disbursal' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<form [formGroup]="collectionSheetForm" (ngSubmit)="previewCollectionSheet()">
|
||||
<div class="layout-row-wrap gap-2percent responsive-column align-start-center">
|
||||
<mat-form-field class="flex-98">
|
||||
<mat-label>{{ 'labels.inputs.Branch Office' | translate }}</mat-label>
|
||||
<mat-select formControlName="officeId" required>
|
||||
@for (office of officesData; track office) {
|
||||
<mat-option [value]="office.id">
|
||||
{{ office.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
@if (collectionSheetForm.controls.officeId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Branch Office' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-98" (click)="transactionDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Repayment Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="transactionDatePicker"
|
||||
required
|
||||
formControlName="transactionDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #transactionDatePicker></mat-datepicker>
|
||||
@if (collectionSheetForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Repayment Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
<mat-form-field class="flex-98">
|
||||
<mat-label>{{ 'labels.inputs.Staff' | translate }}</mat-label>
|
||||
<mat-select formControlName="staffId">
|
||||
@for (loanOfficer of loanOfficerData; track loanOfficer) {
|
||||
<mat-option [value]="loanOfficer.id">
|
||||
{{ loanOfficer.displayName }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="loansDataSource">
|
||||
<h2 class="mat-h2">{{ 'labels.heading.Due Collections' | translate }}</h2>
|
||||
|
||||
<table class="mat-elevation-z1" mat-table [dataSource]="loansDataSource" matSort>
|
||||
<ng-container matColumnDef="loanAccount">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Loan Account' | translate }} #</th>
|
||||
<td mat-cell *matCellDef="let loan">{{ loan.accountId }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="productName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Product Name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let loan">{{ loan.productShortName }}({{ loan.productId }})</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="clientName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Client Name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let loan">{{ loan.clientName }}({{ loan.clientId }})</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="totalDue">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Total Due' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let loan">{{ loan.totalDue }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="charges">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Charges' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let loan">{{ loan.feeDue }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Actions' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let loan; let i = index">
|
||||
<button mat-raised-button color="primary" (click)="showAndStorePaymentDetails('loans/accounts', loan, i)">
|
||||
{{ 'labels.buttons.Add Payment' | translate }}
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="loansDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: loansDisplayedColumns"></tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="savingsDataSource">
|
||||
<h2 class="mat-h2">{{ 'labels.inputs.Due Savings Collections' | translate }}</h2>
|
||||
|
||||
<table class="mat-elevation-z1" mat-table [dataSource]="savingsDataSource" matSort>
|
||||
<ng-container matColumnDef="depositAccount">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Deposit Account' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let saving">{{ saving.depositAccountType }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="savingsAccountNo">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
{{ 'labels.inputs.Savings Account' | translate }} #
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let saving">{{ saving.accountId }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="productName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Product Name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let saving">{{ saving.productName }}({{ saving.productId }})</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="clientName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Client Name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let saving">{{ saving.clientName }}({{ saving.clientId }})</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="totalDue">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Total Due' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let saving">{{ saving.dueAmount }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Actions' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let saving; let j = index">
|
||||
<button mat-raised-button color="primary" (click)="showAndStorePaymentDetails('savings', saving, j)">
|
||||
{{ 'labels.buttons.Add Payment' | translate }}
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="savingsDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: savingsDisplayedColumns"></tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
</ng-container>
|
||||
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
<button type="button" mat-raised-button [routerLink]="['../']">
|
||||
{{ 'labels.buttons.Cancel' | translate }}
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="submit()">{{ 'labels.buttons.Submit' | translate }}</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!collectionSheetForm.valid">
|
||||
<fa-icon icon="search" class="m-r-10"></fa-icon> {{ 'labels.buttons.Collection Sheet' | translate }}
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
</form>
|
||||
</mat-card>
|
||||
}
|
||||
|
||||
<div class="showcollectionsheet">
|
||||
@if (isCollapsed) {
|
||||
<div class="container">
|
||||
<mat-card>
|
||||
<div class="m-b-20">
|
||||
<button mat-raised-button color="primary" (click)="isCollapsed = false">
|
||||
{{ 'labels.buttons.Parameters' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
@if (loansDataSource) {
|
||||
<h2 class="mat-h2">{{ 'labels.heading.Due Collections' | translate }}</h2>
|
||||
<table class="mat-elevation-z1" mat-table [dataSource]="loansDataSource" matSort>
|
||||
<ng-container matColumnDef="loanAccount">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
{{ 'labels.inputs.Loan Account' | translate }} #
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let loan">{{ loan.accountId }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="productName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Product Name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let loan">{{ loan.productShortName }}({{ loan.productId }})</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="clientName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Client Name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let loan">{{ loan.clientName }}({{ loan.clientId }})</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="totalDue">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Total Due' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let loan">{{ loan.totalDue }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="charges">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Charges' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let loan">{{ loan.feeDue }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Actions' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let loan; let i = index">
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
(click)="showAndStorePaymentDetails('loans/accounts', loan, i)"
|
||||
>
|
||||
{{ 'labels.buttons.Add Payment' | translate }}
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="loansDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: loansDisplayedColumns"></tr>
|
||||
</table>
|
||||
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
}
|
||||
@if (savingsDataSource) {
|
||||
<h2 class="mat-h2">{{ 'labels.inputs.Due Savings Collections' | translate }}</h2>
|
||||
<table class="mat-elevation-z1" mat-table [dataSource]="savingsDataSource" matSort>
|
||||
<ng-container matColumnDef="depositAccount">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
{{ 'labels.inputs.Deposit Account' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let saving">{{ saving.depositAccountType }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="savingsAccountNo">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
{{ 'labels.inputs.Savings Account' | translate }} #
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let saving">{{ saving.accountId }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="productName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Product Name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let saving">{{ saving.productName }}({{ saving.productId }})</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="clientName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Client Name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let saving">{{ saving.clientName }}({{ saving.clientId }})</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="totalDue">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Total Due' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let saving">{{ saving.dueAmount }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Actions' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let saving; let j = index">
|
||||
<button mat-raised-button color="primary" (click)="showAndStorePaymentDetails('savings', saving, j)">
|
||||
{{ 'labels.buttons.Add Payment' | translate }}
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="savingsDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: savingsDisplayedColumns"></tr>
|
||||
</table>
|
||||
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
}
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
<button type="button" mat-raised-button [routerLink]="['../']">
|
||||
{{ 'labels.buttons.Cancel' | translate }}
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="submit()">
|
||||
{{ 'labels.buttons.Submit' | translate }}
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user