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:
+15
-11
@@ -6,23 +6,27 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Collateral Type' | translate }}</mat-label>
|
||||
<mat-select required formControlName="collateralTypeId">
|
||||
<mat-option *ngFor="let collateral of dataObject.allowedCollateralTypes" [value]="collateral.id">
|
||||
{{ collateral.name }}</mat-option
|
||||
>
|
||||
@for (collateral of dataObject.allowedCollateralTypes; track collateral) {
|
||||
<mat-option [value]="collateral.id"> {{ collateral.name }}</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="collateralForm.controls.collateralTypeId.hasError('required')">
|
||||
{{ 'labels.inputs.Collateral Type' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (collateralForm.controls.collateralTypeId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Collateral Type' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Value' | translate }}</mat-label>
|
||||
<input matInput required formControlName="value" />
|
||||
<mat-error *ngIf="collateralForm.controls.value.hasError('required')">
|
||||
{{ 'labels.inputs.Value' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (collateralForm.controls.value.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Value' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
+6
-15
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports. */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -21,6 +21,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AddCollateralComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private router = inject(Router);
|
||||
private route = inject(ActivatedRoute);
|
||||
private loanService = inject(LoansService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
|
||||
/** Collateral form. */
|
||||
@@ -28,20 +33,6 @@ export class AddCollateralComponent implements OnInit {
|
||||
/** Loan Id. */
|
||||
loanId: string;
|
||||
|
||||
/**
|
||||
* Retrieve data from `Resolver`.
|
||||
* @param {FormBuilder} formBuilder Form Builder.
|
||||
* @param {Router} router Router.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {LoansService} LoansService loans service.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private loanService: LoansService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.createAddCollateralForm();
|
||||
}
|
||||
|
||||
+15
-9
@@ -1,8 +1,10 @@
|
||||
<div class="container mat-elevation-z8">
|
||||
<mat-card>
|
||||
<div class="m-b-20 layout-column" *ngIf="maturityDate">
|
||||
<span class="m-r-10">{{ 'Maturity Date' | translateKey: 'inputs' }} : {{ maturityDate | dateFormat }}</span>
|
||||
</div>
|
||||
@if (maturityDate) {
|
||||
<div class="m-b-20 layout-column">
|
||||
<span class="m-r-10">{{ 'Maturity Date' | translateKey: 'inputs' }} : {{ maturityDate | dateFormat }}</span>
|
||||
</div>
|
||||
}
|
||||
<form [formGroup]="interestPauseLoanForm" (ngSubmit)="submit()">
|
||||
<mat-card-content>
|
||||
<div class="layout-column">
|
||||
@@ -18,9 +20,11 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="startDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #startDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="interestPauseLoanForm.controls.startDate.hasError('required')">
|
||||
{{ 'labels.inputs.Start Date' | translate }}<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (interestPauseLoanForm.controls.startDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Start Date' | translate }}<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="endDatePicker.open()">
|
||||
@@ -35,9 +39,11 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="endDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #endDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="interestPauseLoanForm.controls.endDate.hasError('required')">
|
||||
{{ 'labels.inputs.End Date' | translate }}<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (interestPauseLoanForm.controls.endDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.End Date' | translate }}<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
|
||||
+9
-9
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
@@ -17,6 +17,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AddInterestPauseComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -40,14 +47,7 @@ export class AddInterestPauseComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+38
-28
@@ -6,23 +6,29 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Charge' | translate }}</mat-label>
|
||||
<mat-select required formControlName="chargeId">
|
||||
<mat-option *ngFor="let loanCharge of loanChargeOptions" [value]="loanCharge.id">
|
||||
{{ loanCharge.name + ' (' + loanCharge?.currency.name + ')' }}
|
||||
</mat-option>
|
||||
@for (loanCharge of loanChargeOptions; track loanCharge) {
|
||||
<mat-option [value]="loanCharge.id">
|
||||
{{ loanCharge.name + ' (' + loanCharge?.currency.name + ')' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="loanChargeForm.controls.chargeId.hasError('required')">
|
||||
{{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (loanChargeForm.controls.chargeId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Charge' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
|
||||
<input type="number" required matInput formControlName="amount" />
|
||||
<mat-error *ngIf="loanChargeForm.controls.amount.hasError('required')">
|
||||
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (loanChargeForm.controls.amount.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
@@ -35,23 +41,27 @@
|
||||
<input matInput formControlName="chargeTime" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="loanChargeForm.controls['dueDate']" (click)="dueDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Due On' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="dueDatePicker"
|
||||
required
|
||||
formControlName="dueDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="dueDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dueDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="loanChargeForm.controls.dueDate.hasError('required')">
|
||||
{{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (loanChargeForm.controls['dueDate']) {
|
||||
<mat-form-field (click)="dueDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Due On' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="dueDatePicker"
|
||||
required
|
||||
formControlName="dueDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="dueDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dueDatePicker></mat-datepicker>
|
||||
@if (loanChargeForm.controls.dueDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Due Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
</div>
|
||||
|
||||
<mat-card-actions class="layout-row layout-xs-column layout-align-center gap-5px">
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
UntypedFormGroup,
|
||||
UntypedFormBuilder,
|
||||
@@ -27,6 +27,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AddLoanChargeComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private loansService = inject(LoansService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Minimum Due Date allowed. */
|
||||
minDate = new Date(2000, 0, 1);
|
||||
/** Maximum Due Date allowed. */
|
||||
@@ -60,14 +67,7 @@ export class AddLoanChargeComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private loansService: LoansService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { actionButtonData: any }) => {
|
||||
this.loanChargeOptions = data.actionButtonData.chargeOptions;
|
||||
});
|
||||
|
||||
+13
-13
@@ -8,10 +8,12 @@
|
||||
<span matTextSuffix class="m-l-10">{{ loanDetailsData.currency.code }}</span>
|
||||
<span class="flex-auto"></span>
|
||||
<input type="number" matInput required class="right-input" formControlName="amount" />
|
||||
<mat-error *ngIf="adjustLoanChargeForm.controls.amount.hasError('required')">
|
||||
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (adjustLoanChargeForm.controls.amount.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Amount' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
@@ -22,9 +24,11 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Payment Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="paymentTypeId">
|
||||
<mat-option *ngFor="let paymentType of paymentTypes" [value]="paymentType.id">
|
||||
{{ paymentType.name }}
|
||||
</mat-option>
|
||||
@for (paymentType of paymentTypes; track paymentType) {
|
||||
<mat-option [value]="paymentType.id">
|
||||
{{ paymentType.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -38,32 +42,28 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="showPaymentDetails">
|
||||
@if (showPaymentDetails) {
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Account' | translate }} #</mat-label>
|
||||
<input matInput formControlName="accountNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Cheque' | translate }} #</mat-label>
|
||||
<input matInput formControlName="checkNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Routing Code' | translate }}</mat-label>
|
||||
<input matInput formControlName="routingCode" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reciept' | translate }} #</mat-label>
|
||||
<input matInput formControlName="receiptNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Bank' | translate }} #</mat-label>
|
||||
<input matInput formControlName="bankNumber" />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Note' | translate }}</mat-label>
|
||||
|
||||
+9
-9
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import {
|
||||
UntypedFormBuilder,
|
||||
UntypedFormControl,
|
||||
@@ -25,6 +25,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AdjustLoanChargeComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
private organizationService = inject(OrganizationService);
|
||||
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
chargeId: string;
|
||||
@@ -50,14 +57,7 @@ export class AdjustLoanChargeComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService,
|
||||
private organizationService: OrganizationService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
this.chargeId = this.route.snapshot.params['id'];
|
||||
this.route.data.subscribe((data: { loansAccountCharge: any; loanDetailsData: any }) => {
|
||||
|
||||
+12
-8
@@ -14,10 +14,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="approvedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #approvedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="approveLoanForm.controls.approvedOnDate.hasError('required')">
|
||||
{{ 'labels.inputs.Approved Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (approveLoanForm.controls.approvedOnDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Approved Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="disbursementDatePicker.open()">
|
||||
@@ -49,10 +51,12 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Transaction Amount' | translate }}</mat-label>
|
||||
<input matInput type="number" required formControlName="approvedLoanAmount" />
|
||||
<mat-error *ngIf="approveLoanForm.controls.approvedLoanAmount.hasError('required')">
|
||||
{{ 'labels.inputs.Transaction Amount' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (approveLoanForm.controls.approvedLoanAmount.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Transaction Amount' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports. */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
@@ -28,6 +28,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ApproveLoanComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private dateUtils = inject(Dates);
|
||||
private loanService = inject(LoansService);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Approve Loan form. */
|
||||
approveLoanForm: UntypedFormGroup;
|
||||
/** Loan data. */
|
||||
@@ -49,14 +56,7 @@ export class ApproveLoanComponent implements OnInit {
|
||||
* @param router Router.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private dateUtils: Dates,
|
||||
private loanService: LoansService,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.route.data.subscribe((data: { actionButtonData: any }) => {
|
||||
this.loanData = data.actionButtonData;
|
||||
this.currency = data.actionButtonData.currency;
|
||||
|
||||
+30
-20
@@ -15,29 +15,39 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="settlementDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #settlementDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="saleLoanForm.controls.settlementDate.hasError('required')">
|
||||
{{ 'labels.inputs.Settlement Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (saleLoanForm.controls.settlementDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Settlement Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="!isBuyBack()">
|
||||
<mat-label>{{ 'labels.inputs.Purchase Price Ratio' | translate }}</mat-label>
|
||||
<input type="number" matInput required formControlName="purchasePriceRatio" />
|
||||
<mat-error *ngIf="saleLoanForm.controls.purchasePriceRatio.hasError('required')">
|
||||
{{ 'labels.inputs.Purchase Price Ratio' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (!isBuyBack()) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Purchase Price Ratio' | translate }}</mat-label>
|
||||
<input type="number" matInput required formControlName="purchasePriceRatio" />
|
||||
@if (saleLoanForm.controls.purchasePriceRatio.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Purchase Price Ratio' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field *ngIf="!isBuyBack()">
|
||||
<mat-label>{{ 'labels.inputs.Owner External Id' | translate }}</mat-label>
|
||||
<input matInput formControlName="ownerExternalId" />
|
||||
<mat-error *ngIf="saleLoanForm.controls.ownerExternalId.hasError('required')">
|
||||
{{ 'labels.inputs.Owner External Id' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (!isBuyBack()) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Owner External Id' | translate }}</mat-label>
|
||||
<input matInput formControlName="ownerExternalId" />
|
||||
@if (saleLoanForm.controls.ownerExternalId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Owner External Id' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Transfer External Id' | translate }}</mat-label>
|
||||
|
||||
+9
-9
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
@@ -15,6 +15,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AssetTransferLoanComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private externalAssetOwnerService = inject(ExternalAssetOwnerService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
BUYBACK_COMMAND = 'buyback';
|
||||
SALE_COMMAND = 'sale';
|
||||
|
||||
@@ -28,14 +35,7 @@ export class AssetTransferLoanComponent implements OnInit {
|
||||
/** Sell Loan Form */
|
||||
saleLoanForm: UntypedFormGroup;
|
||||
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private externalAssetOwnerService: ExternalAssetOwnerService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
const actionName = this.route.snapshot.params['action'];
|
||||
this.command = actionName === 'Sell Loan' ? this.SALE_COMMAND : this.BUYBACK_COMMAND;
|
||||
|
||||
+17
-11
@@ -6,14 +6,18 @@
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.To Loan Officer' | translate }}</mat-label>
|
||||
<mat-select required formControlName="toLoanOfficerId">
|
||||
<mat-option *ngFor="let loanOfficer of loanOfficers" [value]="loanOfficer.id">
|
||||
{{ loanOfficer.displayName }}
|
||||
</mat-option>
|
||||
@for (loanOfficer of loanOfficers; track loanOfficer) {
|
||||
<mat-option [value]="loanOfficer.id">
|
||||
{{ loanOfficer.displayName }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="assignOfficerForm.controls.toLoanOfficerId.hasError('required')">
|
||||
{{ 'labels.inputs.Loan Officer' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (assignOfficerForm.controls.toLoanOfficerId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Loan Officer' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="assignOnDatePicker.open()">
|
||||
@@ -28,10 +32,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="assignOnDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #assignOnDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="assignOfficerForm.controls.assignmentDate.hasError('required')">
|
||||
{{ 'labels.inputs.Assignment Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (assignOfficerForm.controls.assignmentDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Assignment Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
|
||||
+9
-9
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
@@ -17,6 +17,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class AssignLoanOfficerComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -35,14 +42,7 @@ export class AssignLoanOfficerComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+17
-11
@@ -15,23 +15,29 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #transactionDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="chargeoffLoanForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (chargeoffLoanForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reason for Charge-Off' | translate }}</mat-label>
|
||||
<mat-select formControlName="chargeOffReasonId">
|
||||
<mat-option *ngFor="let chargeOffReason of chargeOffReasonOptions" [value]="chargeOffReason.id">
|
||||
{{ chargeOffReason.name }}
|
||||
</mat-option>
|
||||
@for (chargeOffReason of chargeOffReasonOptions; track chargeOffReason) {
|
||||
<mat-option [value]="chargeOffReason.id">
|
||||
{{ chargeOffReason.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="chargeoffLoanForm.controls.chargeOffReasonId.hasError('required')">
|
||||
{{ 'labels.inputs.Reason for Charge-Off' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (chargeoffLoanForm.controls.chargeOffReasonId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Reason for Charge-Off' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
@@ -17,6 +17,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ChargeOffComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
|
||||
/** Loan Id */
|
||||
@@ -41,14 +48,7 @@ export class ChargeOffComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+6
-4
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="closedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #closedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="closeLoanForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Closed Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (closeLoanForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Closed Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
+9
-9
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
@@ -19,6 +19,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class CloseAsRescheduledComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
|
||||
/** Close form. */
|
||||
@@ -37,14 +44,7 @@ export class CloseAsRescheduledComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+46
-45
@@ -7,118 +7,119 @@
|
||||
{{ 'labels.inputs.Existing Client' | translate }}
|
||||
</mat-checkbox>
|
||||
|
||||
<ng-container *ngIf="!showClientDetailsForm">
|
||||
@if (!showClientDetailsForm) {
|
||||
<mat-form-field class="flex-30">
|
||||
<mat-label>{{ 'labels.inputs.name' | translate }}</mat-label>
|
||||
<input matInput formControlName="name" [matAutocomplete]="clientsAutocomplete" />
|
||||
<mat-error *ngIf="newGuarantorForm.controls.name.hasError('required')">
|
||||
{{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (newGuarantorForm.controls.name.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-autocomplete
|
||||
autoActiveFirstOption
|
||||
#clientsAutocomplete="matAutocomplete"
|
||||
[displayWith]="displayClient"
|
||||
(optionSelected)="clientSelected($event.option.value)"
|
||||
>
|
||||
<mat-option *ngFor="let client of clientsData" [value]="client">
|
||||
{{ client.displayName }}
|
||||
</mat-option>
|
||||
@for (client of clientsData; track client) {
|
||||
<mat-option [value]="client">
|
||||
{{ client.displayName }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-autocomplete>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Relationship' | translate }}</mat-label>
|
||||
<mat-select formControlName="clientRelationshipTypeId">
|
||||
<mat-option *ngFor="let relationType of relationTypes" [value]="relationType.id">
|
||||
{{ relationType.name }}
|
||||
</mat-option>
|
||||
@for (relationType of relationTypes; track relationType) {
|
||||
<mat-option [value]="relationType.id">
|
||||
{{ relationType.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<ng-container *ngIf="accountOptions?.length > 0">
|
||||
@if (accountOptions?.length > 0) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Account' | translate }}</mat-label>
|
||||
<mat-select formControlName="savingsId">
|
||||
<mat-option *ngFor="let accountOption of accountOptions" [value]="accountOption.id">
|
||||
{{ accountOption.productName }} - {{ accountOption.accountNo }}
|
||||
</mat-option>
|
||||
@for (accountOption of accountOptions; track accountOption) {
|
||||
<mat-option [value]="accountOption.id">
|
||||
{{ accountOption.productName }} - {{ accountOption.accountNo }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Amount' | translate }}</mat-label>
|
||||
<input type="number" matInput required formControlName="amount" />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
}
|
||||
}
|
||||
|
||||
<ng-container *ngIf="showClientDetailsForm">
|
||||
@if (showClientDetailsForm) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Relationship' | translate }}</mat-label>
|
||||
<mat-select formControlName="clientRelationshipTypeId">
|
||||
<mat-option *ngFor="let relationType of relationTypes" [value]="relationType.id">
|
||||
{{ relationType.name }}
|
||||
</mat-option>
|
||||
@for (relationType of relationTypes; track relationType) {
|
||||
<mat-option [value]="relationType.id">
|
||||
{{ relationType.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.First Name' | translate }}</mat-label>
|
||||
<input matInput required formControlName="firstname" />
|
||||
<mat-error *ngIf="newGuarantorForm.controls.firstname.hasError('required')">
|
||||
{{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
{{ 'labels.commons.is' | translate }} <strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (newGuarantorForm.controls.firstname.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.First Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
{{ 'labels.commons.is' | translate }} <strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Last Name' | translate }}</mat-label>
|
||||
<input matInput required formControlName="lastname" />
|
||||
<mat-error *ngIf="newGuarantorForm.controls.lastname.hasError('required')">
|
||||
{{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
{{ 'labels.commons.is' | translate }} <strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (newGuarantorForm.controls.lastname.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Last Name' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
{{ 'labels.commons.is' | translate }} <strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="dobDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Date Of Birth' | translate }}</mat-label>
|
||||
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="dobDatePicker" formControlName="dob" />
|
||||
<mat-datepicker-toggle matSuffix [for]="dobDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #dobDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Address Line' | translate }} 1</mat-label>
|
||||
<input matInput formControlName="addressLine1" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Address Line' | translate }} 2</mat-label>
|
||||
<input matInput formControlName="addressLine2" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.City' | translate }}</mat-label>
|
||||
<input matInput formControlName="city" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Zip' | translate }}</mat-label>
|
||||
<input matInput formControlName="zip" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Mobile' | translate }}</mat-label>
|
||||
<input type="number" matInput formControlName="mobileNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Residence Phone' | translate }} #</mat-label>
|
||||
<input type="number" matInput formControlName="housePhoneNumber" />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
</div>
|
||||
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
@@ -137,7 +138,7 @@
|
||||
</mat-card-content>
|
||||
</form>
|
||||
|
||||
<ng-container *ngIf="newGuarantorForm?.controls?.name?.value">
|
||||
@if (newGuarantorForm?.controls?.name?.value) {
|
||||
<div class="mat-table">
|
||||
<div class="mat-header-row">
|
||||
<div class="mat-header-cell">{{ 'labels.inputs.Client Details' | translate }}</div>
|
||||
@@ -155,6 +156,6 @@
|
||||
<div class="mat-cell">{{ newGuarantorForm.controls.name.value.officeName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
}
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input, AfterViewInit } from '@angular/core';
|
||||
import { Component, OnInit, Input, AfterViewInit, inject } from '@angular/core';
|
||||
import {
|
||||
UntypedFormGroup,
|
||||
UntypedFormBuilder,
|
||||
@@ -33,6 +33,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class CreateGuarantorComponent implements OnInit, AfterViewInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private clientsService = inject(ClientsService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** New Guarantor Form */
|
||||
newGuarantorForm: UntypedFormGroup;
|
||||
@@ -58,15 +66,7 @@ export class CreateGuarantorComponent implements OnInit, AfterViewInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private clientsService: ClientsService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+12
-8
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="disbursementDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #disbursementDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="disbursementForm.controls.actualDisbursementDate.hasError('required')">
|
||||
{{ 'labels.inputs.Disbursement Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (disbursementForm.controls.actualDisbursementDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Disbursement Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mifosx-input-amount
|
||||
@@ -35,10 +37,12 @@
|
||||
<input matInput [value]="dataObject.availableDisbursementAmountWithOverApplied | formatNumber" readonly />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="dataObject.fixedEmiAmount">
|
||||
<mat-label>{{ 'labels.inputs.Fixed EMI amount' | translate }}</mat-label>
|
||||
<input matInput type="number" formControlName="fixedEmiAmount" />
|
||||
</mat-form-field>
|
||||
@if (dataObject.fixedEmiAmount) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Fixed EMI amount' | translate }}</mat-label>
|
||||
<input matInput type="number" formControlName="fixedEmiAmount" />
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Note' | translate }}</mat-label>
|
||||
|
||||
+8
-18
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
@@ -22,6 +22,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class DisburseToSavingsAccountComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private loanService = inject(LoansService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
|
||||
/** Minimum Date allowed. */
|
||||
@@ -32,23 +39,6 @@ export class DisburseToSavingsAccountComponent implements OnInit {
|
||||
disbursementForm: UntypedFormGroup;
|
||||
currency: Currency;
|
||||
|
||||
/**
|
||||
* Get data from `Resolver`.
|
||||
* @param {FormBuilder} formBuilder FormBuilder.
|
||||
* @param {ActivatedRoute} route ActivatedRoute.
|
||||
* @param {Router} router Router.
|
||||
* @param {LoansService} loanService Loan Service.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private loanService: LoansService,
|
||||
private settingsService: SettingsService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.setDisbursementToSavingsForm();
|
||||
|
||||
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="actualDisbursementDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #actualDisbursementDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="disbursementLoanForm.controls.actualDisbursementDate.hasError('required')">
|
||||
{{ 'labels.inputs.Disbursed On Date' | translate
|
||||
}}<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (disbursementLoanForm.controls.actualDisbursementDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Disbursed On Date' | translate
|
||||
}}<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mifosx-input-amount
|
||||
@@ -43,9 +45,11 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Payment Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="paymentTypeId">
|
||||
<mat-option *ngFor="let paymentType of paymentTypes" [value]="paymentType.id">
|
||||
{{ paymentType.name }}
|
||||
</mat-option>
|
||||
@for (paymentType of paymentTypes; track paymentType) {
|
||||
<mat-option [value]="paymentType.id">
|
||||
{{ paymentType.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -59,32 +63,28 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="showPaymentDetails">
|
||||
@if (showPaymentDetails) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Account' | translate }} #</mat-label>
|
||||
<input matInput formControlName="accountNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Cheque' | translate }} #</mat-label>
|
||||
<input matInput formControlName="checkNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Routing Code' | translate }}</mat-label>
|
||||
<input matInput formControlName="routingCode" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reciept' | translate }} #</mat-label>
|
||||
<input matInput formControlName="receiptNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Bank' | translate }} #</mat-label>
|
||||
<input matInput formControlName="bankNumber" />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Note' | translate }}</mat-label>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@@ -30,6 +30,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class DisburseComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -52,14 +59,7 @@ export class DisburseComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+8
-7
@@ -2,13 +2,14 @@
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div class="m-b-10 layout-column">
|
||||
<mifosx-repayment-schedule-tab
|
||||
*ngIf="repaymentScheduleDetails"
|
||||
class="flex-100"
|
||||
[repaymentScheduleDetails]="repaymentScheduleDetails"
|
||||
[forEditing]="true"
|
||||
>
|
||||
</mifosx-repayment-schedule-tab>
|
||||
@if (repaymentScheduleDetails) {
|
||||
<mifosx-repayment-schedule-tab
|
||||
class="flex-100"
|
||||
[repaymentScheduleDetails]="repaymentScheduleDetails"
|
||||
[forEditing]="true"
|
||||
>
|
||||
</mifosx-repayment-schedule-tab>
|
||||
}
|
||||
</div>
|
||||
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
|
||||
+10
-11
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
@@ -24,6 +24,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class EditRepaymentScheduleComponent implements OnInit {
|
||||
private loansService = inject(LoansService);
|
||||
private router = inject(Router);
|
||||
private route = inject(ActivatedRoute);
|
||||
private dialog = inject(MatDialog);
|
||||
private dateUtils = inject(Dates);
|
||||
private translateService = inject(TranslateService);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Loan ID. */
|
||||
loanId: string;
|
||||
/** Indicates If the Schedule has been changed */
|
||||
@@ -43,15 +51,7 @@ export class EditRepaymentScheduleComponent implements OnInit {
|
||||
* @param {Dates} dateUtils Dates Utils.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private loansService: LoansService,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private dialog: MatDialog,
|
||||
private dateUtils: Dates,
|
||||
private translateService: TranslateService,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
this.getRepaymentSchedule();
|
||||
}
|
||||
@@ -107,7 +107,6 @@ export class EditRepaymentScheduleComponent implements OnInit {
|
||||
type: 'number',
|
||||
required: true
|
||||
})
|
||||
|
||||
];
|
||||
const data = {
|
||||
title: 'Pattern Update',
|
||||
|
||||
+6
-4
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transactionsDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #transactionsDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="foreclosureForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (foreclosureForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
@@ -19,6 +19,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ForeclosureComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
|
||||
loanId: any;
|
||||
@@ -36,14 +43,7 @@ export class ForeclosureComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+108
-69
@@ -1,69 +1,108 @@
|
||||
<mifosx-loans-account-close [dataObject]="actionButtonData" *ngIf="actions['Close']"></mifosx-loans-account-close>
|
||||
<mifosx-undo-approval *ngIf="actions['Undo Approval']"></mifosx-undo-approval>
|
||||
<mifosx-assign-loan-officer
|
||||
*ngIf="actions['Assign Loan Officer']"
|
||||
[dataObject]="actionButtonData"
|
||||
></mifosx-assign-loan-officer>
|
||||
<mifosx-foreclosure [dataObject]="actionButtonData" *ngIf="actions['Foreclosure']"></mifosx-foreclosure>
|
||||
<mifosx-prepay-loan
|
||||
[dataObject]="actionButtonData"
|
||||
*ngIf="actions['Prepay Loan'] || actions['Contract Termination']"
|
||||
></mifosx-prepay-loan>
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Make Repayment']"></mifosx-make-repayment>
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Capitalized Income']"></mifosx-make-repayment>
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Goodwill Credit']"></mifosx-make-repayment>
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Buy Down Fee']"></mifosx-make-repayment>
|
||||
<mifosx-make-repayment
|
||||
[dataObject]="actionButtonData"
|
||||
*ngIf="actions['Interest Payment Waiver']"
|
||||
></mifosx-make-repayment>
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData" *ngIf="actions['Payout Refund']"></mifosx-make-repayment>
|
||||
<mifosx-make-repayment
|
||||
[dataObject]="actionButtonData"
|
||||
*ngIf="actions['Merchant Issued Refund']"
|
||||
></mifosx-make-repayment>
|
||||
<mifosx-loan-credit-balance-refund
|
||||
[dataObject]="actionButtonData"
|
||||
*ngIf="actions['Credit Balance Refund']"
|
||||
></mifosx-loan-credit-balance-refund>
|
||||
<mifosx-waive-interest [dataObject]="actionButtonData" *ngIf="actions['Waive Interest']"></mifosx-waive-interest>
|
||||
<mifosx-write-off-page [dataObject]="actionButtonData" *ngIf="actions['Write Off']"></mifosx-write-off-page>
|
||||
<mifosx-close-as-rescheduled
|
||||
[dataObject]="actionButtonData"
|
||||
*ngIf="actions['Close (as Rescheduled)']"
|
||||
></mifosx-close-as-rescheduled>
|
||||
<mifosx-loan-reschedule [dataObject]="actionButtonData" *ngIf="actions['Reschedule']"></mifosx-loan-reschedule>
|
||||
<mifosx-recovery-repayment
|
||||
[dataObject]="actionButtonData"
|
||||
*ngIf="actions['Recovery Payment']"
|
||||
></mifosx-recovery-repayment>
|
||||
<mifosx-view-guarantors [dataObject]="actionButtonData" *ngIf="actions['View Guarantors']"></mifosx-view-guarantors>
|
||||
<mifosx-create-guarantor [dataObject]="actionButtonData" *ngIf="actions['Create Guarantor']"></mifosx-create-guarantor>
|
||||
<mifosx-disburse-to-savings-account
|
||||
[dataObject]="actionButtonData"
|
||||
*ngIf="actions['Disburse to Savings']"
|
||||
></mifosx-disburse-to-savings-account>
|
||||
<mifosx-reject-loan *ngIf="actions['Reject']"></mifosx-reject-loan>
|
||||
<mifosx-disburse [dataObject]="actionButtonData" *ngIf="actions['Disburse']"></mifosx-disburse>
|
||||
<mifosx-withdrawn-by-client *ngIf="actions['Withdrawn by Client']"></mifosx-withdrawn-by-client>
|
||||
<mifosx-add-collateral [dataObject]="actionButtonData" *ngIf="actions['Add Collateral']"></mifosx-add-collateral>
|
||||
<mifosx-undo-disbursal
|
||||
*ngIf="actions['Undo Disbursal'] || actions['Undo Last Disbursal']"
|
||||
[actionName]="actionName"
|
||||
></mifosx-undo-disbursal>
|
||||
<mifosx-loan-screen-reports
|
||||
[dataObject]="actionButtonData"
|
||||
*ngIf="actions['Loan Screen Reports']"
|
||||
></mifosx-loan-screen-reports>
|
||||
<mifosx-approve-loan *ngIf="actions['Approve']"></mifosx-approve-loan>
|
||||
<mifosx-add-loan-charge *ngIf="actions['Add Loan Charge']"></mifosx-add-loan-charge>
|
||||
<mifosx-edit-repayment-schedule *ngIf="actions['Edit Repayment Schedule']"></mifosx-edit-repayment-schedule>
|
||||
<mifosx-charge-off [dataObject]="actionButtonData" *ngIf="actions['Charge-Off']"></mifosx-charge-off>
|
||||
<mifosx-asset-transfer-loan *ngIf="actions['Sell Loan'] || actions['Buy Back Loan']"></mifosx-asset-transfer-loan>
|
||||
<mifosx-loan-reaging [dataObject]="actionButtonData" *ngIf="actions['Re-Age']"></mifosx-loan-reaging>
|
||||
<mifosx-loan-reamortize [dataObject]="actionButtonData" *ngIf="actions['Re-Amortize']"></mifosx-loan-reamortize>
|
||||
<mifosx-add-interest-pause
|
||||
[dataObject]="navigationData"
|
||||
*ngIf="actions['Add Interest Pause']"
|
||||
></mifosx-add-interest-pause>
|
||||
<mifosx-undo-write-off [dataObject]="actionButtonData" *ngIf="actions['Undo Write-off']"></mifosx-undo-write-off>
|
||||
@if (actions['Close']) {
|
||||
<mifosx-loans-account-close [dataObject]="actionButtonData"></mifosx-loans-account-close>
|
||||
}
|
||||
@if (actions['Undo Approval']) {
|
||||
<mifosx-undo-approval></mifosx-undo-approval>
|
||||
}
|
||||
@if (actions['Assign Loan Officer']) {
|
||||
<mifosx-assign-loan-officer [dataObject]="actionButtonData"></mifosx-assign-loan-officer>
|
||||
}
|
||||
@if (actions['Foreclosure']) {
|
||||
<mifosx-foreclosure [dataObject]="actionButtonData"></mifosx-foreclosure>
|
||||
}
|
||||
@if (actions['Prepay Loan'] || actions['Contract Termination']) {
|
||||
<mifosx-prepay-loan [dataObject]="actionButtonData"></mifosx-prepay-loan>
|
||||
}
|
||||
@if (actions['Make Repayment']) {
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData"></mifosx-make-repayment>
|
||||
}
|
||||
@if (actions['Capitalized Income']) {
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData"></mifosx-make-repayment>
|
||||
}
|
||||
@if (actions['Goodwill Credit']) {
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData"></mifosx-make-repayment>
|
||||
}
|
||||
@if (actions['Buy Down Fee']) {
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData"></mifosx-make-repayment>
|
||||
}
|
||||
@if (actions['Interest Payment Waiver']) {
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData"></mifosx-make-repayment>
|
||||
}
|
||||
@if (actions['Payout Refund']) {
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData"></mifosx-make-repayment>
|
||||
}
|
||||
@if (actions['Merchant Issued Refund']) {
|
||||
<mifosx-make-repayment [dataObject]="actionButtonData"></mifosx-make-repayment>
|
||||
}
|
||||
@if (actions['Credit Balance Refund']) {
|
||||
<mifosx-loan-credit-balance-refund [dataObject]="actionButtonData"></mifosx-loan-credit-balance-refund>
|
||||
}
|
||||
@if (actions['Waive Interest']) {
|
||||
<mifosx-waive-interest [dataObject]="actionButtonData"></mifosx-waive-interest>
|
||||
}
|
||||
@if (actions['Write Off']) {
|
||||
<mifosx-write-off-page [dataObject]="actionButtonData"></mifosx-write-off-page>
|
||||
}
|
||||
@if (actions['Close (as Rescheduled)']) {
|
||||
<mifosx-close-as-rescheduled [dataObject]="actionButtonData"></mifosx-close-as-rescheduled>
|
||||
}
|
||||
@if (actions['Reschedule']) {
|
||||
<mifosx-loan-reschedule [dataObject]="actionButtonData"></mifosx-loan-reschedule>
|
||||
}
|
||||
@if (actions['Recovery Payment']) {
|
||||
<mifosx-recovery-repayment [dataObject]="actionButtonData"></mifosx-recovery-repayment>
|
||||
}
|
||||
@if (actions['View Guarantors']) {
|
||||
<mifosx-view-guarantors [dataObject]="actionButtonData"></mifosx-view-guarantors>
|
||||
}
|
||||
@if (actions['Create Guarantor']) {
|
||||
<mifosx-create-guarantor [dataObject]="actionButtonData"></mifosx-create-guarantor>
|
||||
}
|
||||
@if (actions['Disburse to Savings']) {
|
||||
<mifosx-disburse-to-savings-account [dataObject]="actionButtonData"></mifosx-disburse-to-savings-account>
|
||||
}
|
||||
@if (actions['Reject']) {
|
||||
<mifosx-reject-loan></mifosx-reject-loan>
|
||||
}
|
||||
@if (actions['Disburse']) {
|
||||
<mifosx-disburse [dataObject]="actionButtonData"></mifosx-disburse>
|
||||
}
|
||||
@if (actions['Withdrawn by Client']) {
|
||||
<mifosx-withdrawn-by-client></mifosx-withdrawn-by-client>
|
||||
}
|
||||
@if (actions['Add Collateral']) {
|
||||
<mifosx-add-collateral [dataObject]="actionButtonData"></mifosx-add-collateral>
|
||||
}
|
||||
@if (actions['Undo Disbursal'] || actions['Undo Last Disbursal']) {
|
||||
<mifosx-undo-disbursal [actionName]="actionName"></mifosx-undo-disbursal>
|
||||
}
|
||||
@if (actions['Loan Screen Reports']) {
|
||||
<mifosx-loan-screen-reports [dataObject]="actionButtonData"></mifosx-loan-screen-reports>
|
||||
}
|
||||
@if (actions['Approve']) {
|
||||
<mifosx-approve-loan></mifosx-approve-loan>
|
||||
}
|
||||
@if (actions['Add Loan Charge']) {
|
||||
<mifosx-add-loan-charge></mifosx-add-loan-charge>
|
||||
}
|
||||
@if (actions['Edit Repayment Schedule']) {
|
||||
<mifosx-edit-repayment-schedule></mifosx-edit-repayment-schedule>
|
||||
}
|
||||
@if (actions['Charge-Off']) {
|
||||
<mifosx-charge-off [dataObject]="actionButtonData"></mifosx-charge-off>
|
||||
}
|
||||
@if (actions['Sell Loan'] || actions['Buy Back Loan']) {
|
||||
<mifosx-asset-transfer-loan></mifosx-asset-transfer-loan>
|
||||
}
|
||||
@if (actions['Re-Age']) {
|
||||
<mifosx-loan-reaging [dataObject]="actionButtonData"></mifosx-loan-reaging>
|
||||
}
|
||||
@if (actions['Re-Amortize']) {
|
||||
<mifosx-loan-reamortize [dataObject]="actionButtonData"></mifosx-loan-reamortize>
|
||||
}
|
||||
@if (actions['Add Interest Pause']) {
|
||||
<mifosx-add-interest-pause [dataObject]="navigationData"></mifosx-add-interest-pause>
|
||||
}
|
||||
@if (actions['Undo Write-off']) {
|
||||
<mifosx-undo-write-off [dataObject]="actionButtonData"></mifosx-undo-write-off>
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports. */
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { LoansAccountCloseComponent } from './loans-account-close/loans-account-close.component';
|
||||
import { UndoApprovalComponent } from './undo-approval/undo-approval.component';
|
||||
@@ -75,6 +75,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class LoanAccountActionsComponent {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Loan Details Data */
|
||||
navigationData: any;
|
||||
|
||||
@@ -167,11 +170,8 @@ export class LoanAccountActionsComponent {
|
||||
/**
|
||||
* @param route Activated Route.
|
||||
*/
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
const currentNavigation = this.router.getCurrentNavigation();
|
||||
constructor() {
|
||||
const currentNavigation = this.router.currentNavigation();
|
||||
// Safely access data with optional chaining
|
||||
this.navigationData = currentNavigation?.extras?.state?.data;
|
||||
|
||||
|
||||
+6
-4
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #transactionDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="creditBalanceLoanForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (creditBalanceLoanForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mifosx-input-amount
|
||||
|
||||
+9
-9
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
@@ -20,6 +20,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class LoanCreditBalanceRefundComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -38,14 +45,7 @@ export class LoanCreditBalanceRefundComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+117
-119
@@ -1,125 +1,123 @@
|
||||
<div class="container mat-elevation-z8">
|
||||
<mat-card>
|
||||
<form [formGroup]="reagingLoanForm" (ngSubmit)="submit()" *ngIf="loanTransactionData !== null">
|
||||
<mat-card-content>
|
||||
<div class="layout-column">
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Number of Installments' | translate }}</mat-label>
|
||||
<input type="number" matInput required formControlName="numberOfInstallments" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Frequency Number' | translate }}</mat-label>
|
||||
<input type="number" matInput required formControlName="frequencyNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Frequency Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="frequencyType">
|
||||
<mat-option *ngFor="let frequencyType of periodFrequencyOptions" [value]="frequencyType">
|
||||
{{ frequencyType }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="startDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Start Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="startDatePicker"
|
||||
required
|
||||
formControlName="startDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="startDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #startDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="reagingLoanForm.controls.startDate.hasError('required')">
|
||||
{{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Interest Handling' | translate }}</mat-label>
|
||||
<mat-select formControlName="reAgeInterestHandling">
|
||||
<mat-option
|
||||
*ngFor="let reAgeInterestHandlingOption of reAgeInterestHandlingOptions"
|
||||
[value]="reAgeInterestHandlingOption.id"
|
||||
@if (loanTransactionData !== null) {
|
||||
<form [formGroup]="reagingLoanForm" (ngSubmit)="submit()">
|
||||
<mat-card-content>
|
||||
<div class="layout-column">
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Number of Installments' | translate }}</mat-label>
|
||||
<input type="number" matInput required formControlName="numberOfInstallments" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Frequency Number' | translate }}</mat-label>
|
||||
<input type="number" matInput required formControlName="frequencyNumber" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Frequency Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="frequencyType">
|
||||
@for (frequencyType of periodFrequencyOptions; track frequencyType) {
|
||||
<mat-option [value]="frequencyType">
|
||||
{{ frequencyType }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field (click)="startDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Start Date' | translate }}</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[min]="minDate"
|
||||
[max]="maxDate"
|
||||
[matDatepicker]="startDatePicker"
|
||||
required
|
||||
formControlName="startDate"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="startDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #startDatePicker></mat-datepicker>
|
||||
@if (reagingLoanForm.controls.startDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Start Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Interest Handling' | translate }}</mat-label>
|
||||
<mat-select formControlName="reAgeInterestHandling">
|
||||
@for (reAgeInterestHandlingOption of reAgeInterestHandlingOptions; track reAgeInterestHandlingOption) {
|
||||
<mat-option [value]="reAgeInterestHandlingOption.id">
|
||||
{{ reAgeInterestHandlingOption.value | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reason' | translate }}</mat-label>
|
||||
<mat-select formControlName="reasonCodeValueId">
|
||||
@for (reAgeReasonOption of reAgeReasonOptions; track reAgeReasonOption) {
|
||||
<mat-option [value]="reAgeReasonOption.id">
|
||||
{{ reAgeReasonOption.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.External Id' | translate }}</mat-label>
|
||||
<input matInput formControlName="externalId" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Note' | translate }}</mat-label>
|
||||
<input matInput formControlName="note" />
|
||||
</mat-form-field>
|
||||
<div class="flex-fill">
|
||||
<span
|
||||
class="expandcollapsebutton m-l-10 m-t-5 m-b-5 flex-75"
|
||||
(click)="addTransactionAmount = !addTransactionAmount"
|
||||
>
|
||||
{{ reAgeInterestHandlingOption.value | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reason' | translate }}</mat-label>
|
||||
<mat-select formControlName="reasonCodeValueId">
|
||||
<mat-option *ngFor="let reAgeReasonOption of reAgeReasonOptions" [value]="reAgeReasonOption.id">
|
||||
{{ reAgeReasonOption.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.External Id' | translate }}</mat-label>
|
||||
<input matInput formControlName="externalId" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Note' | translate }}</mat-label>
|
||||
<input matInput formControlName="note" />
|
||||
</mat-form-field>
|
||||
|
||||
<div class="flex-fill">
|
||||
<span
|
||||
class="expandcollapsebutton m-l-10 m-t-5 m-b-5 flex-75"
|
||||
(click)="addTransactionAmount = !addTransactionAmount"
|
||||
>
|
||||
<mat-slide-toggle>
|
||||
<div>
|
||||
<span class="m-l-10">{{ 'labels.inputs.Transaction Amount' | translate }}</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
<mat-slide-toggle>
|
||||
<div>
|
||||
<span class="m-l-10">{{ 'labels.inputs.Transaction Amount' | translate }}</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
</div>
|
||||
@if (addTransactionAmount) {
|
||||
<mifosx-input-amount
|
||||
[currency]="loanTransactionData.currency"
|
||||
[isRequired]="false"
|
||||
[inputFormControl]="reagingLoanForm.controls.transactionAmount"
|
||||
[inputLabel]="'Transaction Amount'"
|
||||
[minVal]="0.01"
|
||||
[maxVal]="loanTransactionData.amount"
|
||||
>
|
||||
</mifosx-input-amount>
|
||||
}
|
||||
</div>
|
||||
|
||||
<mifosx-input-amount
|
||||
*ngIf="addTransactionAmount"
|
||||
[currency]="loanTransactionData.currency"
|
||||
[isRequired]="false"
|
||||
[inputFormControl]="reagingLoanForm.controls.transactionAmount"
|
||||
[inputLabel]="'Transaction Amount'"
|
||||
[minVal]="0.01"
|
||||
[maxVal]="loanTransactionData.amount"
|
||||
>
|
||||
</mifosx-input-amount>
|
||||
</div>
|
||||
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">
|
||||
{{ 'labels.buttons.Cancel' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
[disabled]="!reagingLoanForm.valid"
|
||||
*mifosxHasPermission="'REAGING_LOAN'"
|
||||
>
|
||||
{{ 'labels.buttons.Submit' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
mat-raised-button
|
||||
color="accent"
|
||||
[disabled]="!reagingLoanForm.valid"
|
||||
*mifosxHasPermission="'REAGING_LOAN'"
|
||||
(click)="preview()"
|
||||
>
|
||||
{{ 'labels.buttons.Preview' | translate }}
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
</form>
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">
|
||||
{{ 'labels.buttons.Cancel' | translate }}
|
||||
</button>
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
[disabled]="!reagingLoanForm.valid"
|
||||
*mifosxHasPermission="'REAGING_LOAN'"
|
||||
>
|
||||
{{ 'labels.buttons.Submit' | translate }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
mat-raised-button
|
||||
color="accent"
|
||||
[disabled]="!reagingLoanForm.valid"
|
||||
*mifosxHasPermission="'REAGING_LOAN'"
|
||||
(click)="preview()"
|
||||
>
|
||||
{{ 'labels.buttons.Preview' | translate }}
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
</form>
|
||||
}
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
@@ -24,6 +24,14 @@ import { MatSlideToggle } from '@angular/material/slide-toggle';
|
||||
]
|
||||
})
|
||||
export class LoanReagingComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
private loanService = inject(LoansService);
|
||||
private dateUtils = inject(Dates);
|
||||
private dialog = inject(MatDialog);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -42,15 +50,7 @@ export class LoanReagingComponent implements OnInit {
|
||||
loanTransactionData: LoanTransactionTemplate | null = null;
|
||||
addTransactionAmount = false;
|
||||
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService,
|
||||
private loanService: LoansService,
|
||||
private dateUtils: Dates,
|
||||
private dialog: MatDialog
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -1,4 +1,4 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef, MatDialogContent, MatDialogActions } from '@angular/material/dialog';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
@@ -23,13 +23,15 @@ export interface ReAgePreviewDialogData {
|
||||
]
|
||||
})
|
||||
export class ReAgePreviewDialogComponent {
|
||||
dialogRef = inject<MatDialogRef<ReAgePreviewDialogComponent>>(MatDialogRef);
|
||||
data = inject<ReAgePreviewDialogData>(MAT_DIALOG_DATA);
|
||||
|
||||
repaymentSchedule: RepaymentSchedule;
|
||||
currencyCode: string;
|
||||
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<ReAgePreviewDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: ReAgePreviewDialogData
|
||||
) {
|
||||
constructor() {
|
||||
const data = this.data;
|
||||
|
||||
this.repaymentSchedule = data.repaymentSchedule;
|
||||
this.currencyCode = data.currencyCode;
|
||||
}
|
||||
|
||||
+16
-15
@@ -6,15 +6,14 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Interest Handling' | translate }}</mat-label>
|
||||
<mat-select formControlName="reAmortizationInterestHandling">
|
||||
<mat-option
|
||||
*ngFor="
|
||||
let reAmortizationInterestHandlingOption of reAmortizationInterestHandlingOptions;
|
||||
trackBy: trackByInterestHandlingOption
|
||||
"
|
||||
[value]="reAmortizationInterestHandlingOption.id"
|
||||
>
|
||||
{{ reAmortizationInterestHandlingOption.value | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
@for (
|
||||
reAmortizationInterestHandlingOption of reAmortizationInterestHandlingOptions;
|
||||
track trackByInterestHandlingOption($index, reAmortizationInterestHandlingOption)
|
||||
) {
|
||||
<mat-option [value]="reAmortizationInterestHandlingOption.id">
|
||||
{{ reAmortizationInterestHandlingOption.value | translateKey: 'catalogs' }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@@ -23,12 +22,14 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reason' | translate }}</mat-label>
|
||||
<mat-select formControlName="reasonCodeValueId">
|
||||
<mat-option
|
||||
*ngFor="let reAmortizationReasonOption of reAmortizationReasonOptions; trackBy: trackByReasonOption"
|
||||
[value]="reAmortizationReasonOption.id"
|
||||
>
|
||||
{{ reAmortizationReasonOption.name }}
|
||||
</mat-option>
|
||||
@for (
|
||||
reAmortizationReasonOption of reAmortizationReasonOptions;
|
||||
track trackByReasonOption($index, reAmortizationReasonOption)
|
||||
) {
|
||||
<mat-option [value]="reAmortizationReasonOption.id">
|
||||
{{ reAmortizationReasonOption.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
@@ -15,6 +15,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class LoanReamortizeComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private loanService = inject(LoansService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -23,12 +28,7 @@ export class LoanReamortizeComponent implements OnInit {
|
||||
reAmortizationReasonOptions: CodeValue[] = [];
|
||||
reAmortizationInterestHandlingOptions: OptionData[] = [];
|
||||
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private loanService: LoansService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+31
-24
@@ -14,23 +14,29 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="rescheduleDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #rescheduleDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="rescheduleLoanForm.controls.rescheduleFromDate.hasError('required')">
|
||||
{{ 'labels.inputs.Reschedule Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (rescheduleLoanForm.controls.rescheduleFromDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Reschedule Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reason for Rescheduling' | translate }}</mat-label>
|
||||
<mat-select formControlName="rescheduleReasonId">
|
||||
<mat-option *ngFor="let rescheduleReasonCode of codes" [value]="rescheduleReasonCode.id">
|
||||
{{ rescheduleReasonCode.name }}
|
||||
</mat-option>
|
||||
@for (rescheduleReasonCode of codes; track rescheduleReasonCode) {
|
||||
<mat-option [value]="rescheduleReasonCode.id">
|
||||
{{ rescheduleReasonCode.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="rescheduleLoanForm.controls.rescheduleReasonId.hasError('required')">
|
||||
{{ 'labels.inputs.Reason for Rescheduling' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (rescheduleLoanForm.controls.rescheduleReasonId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Reason for Rescheduling' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field (click)="submittedDatePicker.open()">
|
||||
@@ -44,10 +50,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="submittedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #submittedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="rescheduleLoanForm.controls.submittedOnDate.hasError('required')">
|
||||
{{ 'labels.inputs.Submitted On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (rescheduleLoanForm.controls.submittedOnDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Submitted On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
@@ -59,7 +67,7 @@
|
||||
{{ 'labels.inputs.Change Repayment Date' | translate }}
|
||||
</mat-checkbox>
|
||||
|
||||
<ng-container *ngIf="changeRepaymentDate.value">
|
||||
@if (changeRepaymentDate.value) {
|
||||
<mat-form-field (click)="installmentrescheduledDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Installment Rescheduled to' | translate }}</mat-label>
|
||||
<input
|
||||
@@ -71,44 +79,43 @@
|
||||
<mat-datepicker-toggle matSuffix [for]="installmentrescheduledDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #installmentrescheduledDatePicker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<mat-checkbox [formControl]="introduceGracePeriods">
|
||||
{{ 'labels.inputs.Introduce Mid-term grace periods' | translate }}
|
||||
</mat-checkbox>
|
||||
|
||||
<ng-container *ngIf="introduceGracePeriods.value">
|
||||
@if (introduceGracePeriods.value) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Principal Grace Periods' | translate }} </mat-label>
|
||||
<input matInput formControlName="graceOnPrincipal" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Interest Grace Periods' | translate }} </mat-label>
|
||||
<input matInput formControlName="graceOnInterest" />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<mat-checkbox [formControl]="extendRepaymentPeriod">
|
||||
{{ 'labels.inputs.Extend Repayment Period' | translate }}
|
||||
</mat-checkbox>
|
||||
|
||||
<ng-container *ngIf="extendRepaymentPeriod.value">
|
||||
@if (extendRepaymentPeriod.value) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Number Of new Repayments' | translate }}</mat-label>
|
||||
<input matInput formControlName="extraTerms" />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<mat-checkbox [formControl]="adjustinterestrates">
|
||||
{{ 'labels.inputs.Adjust interest rates for remainder of loan' | translate }}
|
||||
</mat-checkbox>
|
||||
<ng-container *ngIf="adjustinterestrates.value">
|
||||
@if (adjustinterestrates.value) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.New Interest Rate' | translate }}</mat-label>
|
||||
<input matInput formControlName="newInterestRate" />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
</div>
|
||||
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
|
||||
+9
-9
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
import {
|
||||
UntypedFormBuilder,
|
||||
@@ -25,6 +25,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class LoanRescheduleComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
loanId: any;
|
||||
rescheduleLoanForm: UntypedFormGroup;
|
||||
@@ -47,14 +54,7 @@ export class LoanRescheduleComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+11
-7
@@ -6,14 +6,18 @@
|
||||
<mat-form-field class="flex-fill">
|
||||
<mat-label>{{ 'labels.inputs.Loan Screen Reports' | translate }}</mat-label>
|
||||
<mat-select formControlName="templateId">
|
||||
<mat-option *ngFor="let template of templatesData" [value]="template.id">
|
||||
{{ template.name }}
|
||||
</mat-option>
|
||||
@for (template of templatesData; track template) {
|
||||
<mat-option [value]="template.id">
|
||||
{{ template.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
<mat-error *ngIf="loanScreenReportForm.controls.templateId.hasError('required')">
|
||||
{{ 'labels.inputs.Screen Report' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (loanScreenReportForm.controls.templateId.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Screen Report' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Renderer2, ViewChild, ElementRef, SecurityContext, Input } from '@angular/core';
|
||||
import { Component, OnInit, Renderer2, ViewChild, ElementRef, SecurityContext, Input, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -22,6 +22,12 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class LoanScreenReportsComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loansService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private sanitizer = inject(DomSanitizer);
|
||||
private renderer = inject(Renderer2);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Screen Reportform. */
|
||||
loanScreenReportForm: UntypedFormGroup;
|
||||
@@ -43,13 +49,7 @@ export class LoanScreenReportsComponent implements OnInit {
|
||||
* @param {DomSanitizer} sanitizer DOM Sanitizer
|
||||
* @param {Renderer2} renderer Renderer 2
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loansService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private sanitizer: DomSanitizer,
|
||||
private renderer: Renderer2
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+6
-4
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="closedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #closedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="closeLoanForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Closed Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (closeLoanForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Closed Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
||||
import { LoansService } from 'app/loans/loans.service';
|
||||
@@ -20,6 +20,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class LoansAccountCloseComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
|
||||
/** Close form. */
|
||||
@@ -38,14 +45,7 @@ export class LoansAccountCloseComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+57
-56
@@ -15,45 +15,42 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #transactionDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="repaymentLoanForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (repaymentLoanForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<div class="layout-row-wrap" *ngIf="showDetails()">
|
||||
<div class="flex-50 mat-body-strong">
|
||||
{{ 'labels.inputs.Principal' | translate }}
|
||||
@if (showDetails()) {
|
||||
<div class="layout-row-wrap">
|
||||
<div class="flex-50 mat-body-strong">
|
||||
{{ 'labels.inputs.Principal' | translate }}
|
||||
</div>
|
||||
<div class="flex-50 r-amount right-label">
|
||||
{{ dataObject.principalPortion | formatNumber }}
|
||||
</div>
|
||||
<div class="flex-50 mat-body-strong">
|
||||
{{ 'labels.inputs.Interest' | translate }}
|
||||
</div>
|
||||
<div class="flex-50 r-amount right-label">
|
||||
{{ dataObject.interestPortion | formatNumber }}
|
||||
</div>
|
||||
<div class="flex-50 mat-body-strong">
|
||||
{{ 'labels.inputs.Fees' | translate }}
|
||||
</div>
|
||||
<div class="flex-50 r-amount right-label">
|
||||
{{ dataObject.feeChargesPortion | formatNumber }}
|
||||
</div>
|
||||
<div class="flex-50 mat-body-strong">
|
||||
{{ 'labels.inputs.Penalties' | translate }}
|
||||
</div>
|
||||
<div class="flex-50 r-amount right-label">
|
||||
{{ dataObject.penaltyChargesPortion | formatNumber }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-50 r-amount right-label">
|
||||
{{ dataObject.principalPortion | formatNumber }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 mat-body-strong">
|
||||
{{ 'labels.inputs.Interest' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 r-amount right-label">
|
||||
{{ dataObject.interestPortion | formatNumber }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 mat-body-strong">
|
||||
{{ 'labels.inputs.Fees' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 r-amount right-label">
|
||||
{{ dataObject.feeChargesPortion | formatNumber }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 mat-body-strong">
|
||||
{{ 'labels.inputs.Penalties' | translate }}
|
||||
</div>
|
||||
|
||||
<div class="flex-50 r-amount right-label">
|
||||
{{ dataObject.penaltyChargesPortion | formatNumber }}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<mifosx-input-amount
|
||||
[currency]="currency"
|
||||
@@ -68,21 +65,27 @@
|
||||
<input matInput formControlName="externalId" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="isCapitalizedIncome() || isBuyDownFee()">
|
||||
<mat-label>{{ 'labels.inputs.Classification' | translate }}</mat-label>
|
||||
<mat-select formControlName="classificationId">
|
||||
<mat-option *ngFor="let classificationOption of classificationOptions" [value]="classificationOption.id">
|
||||
{{ classificationOption.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@if (isCapitalizedIncome() || isBuyDownFee()) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Classification' | translate }}</mat-label>
|
||||
<mat-select formControlName="classificationId">
|
||||
@for (classificationOption of classificationOptions; track classificationOption) {
|
||||
<mat-option [value]="classificationOption.id">
|
||||
{{ classificationOption.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Payment Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="paymentTypeId">
|
||||
<mat-option *ngFor="let paymentType of paymentTypes" [value]="paymentType.id">
|
||||
{{ paymentType.name }}
|
||||
</mat-option>
|
||||
@for (paymentType of paymentTypes; track paymentType) {
|
||||
<mat-option [value]="paymentType.id">
|
||||
{{ paymentType.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -96,41 +99,39 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="showPaymentDetails">
|
||||
@if (showPaymentDetails) {
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Account' | translate }} #</mat-label>
|
||||
<input matInput formControlName="accountNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Cheque' | translate }} #</mat-label>
|
||||
<input matInput formControlName="checkNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Routing Code' | translate }}</mat-label>
|
||||
<input matInput formControlName="routingCode" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Reciept' | translate }} #</mat-label>
|
||||
<input matInput formControlName="receiptNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Bank' | translate }} #</mat-label>
|
||||
<input matInput formControlName="bankNumber" />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Note' | translate }}</mat-label>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox formControlName="skipInterestRefund" *ngIf="showInterestRefundCheckbox()">
|
||||
{{ 'labels.inputs.Skip Interest Refund Transaction Posting' | translate }}
|
||||
</mat-checkbox>
|
||||
@if (showInterestRefundCheckbox()) {
|
||||
<mat-checkbox formControlName="skipInterestRefund">
|
||||
{{ 'labels.inputs.Skip Interest Refund Transaction Posting' | translate }}
|
||||
</mat-checkbox>
|
||||
}
|
||||
</div>
|
||||
|
||||
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
|
||||
|
||||
+13
-11
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@@ -30,6 +30,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class MakeRepaymentComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -56,14 +63,7 @@ export class MakeRepaymentComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
@@ -102,14 +102,16 @@ export class MakeRepaymentComponent implements OnInit {
|
||||
new UntypedFormControl('', [
|
||||
Validators.required,
|
||||
Validators.min(0.001),
|
||||
Validators.max(this.dataObject.amount)])
|
||||
Validators.max(this.dataObject.amount)
|
||||
])
|
||||
);
|
||||
} else {
|
||||
this.repaymentLoanForm.addControl(
|
||||
'transactionAmount',
|
||||
new UntypedFormControl('', [
|
||||
Validators.required,
|
||||
Validators.min(0.001)])
|
||||
Validators.min(0.001)
|
||||
])
|
||||
);
|
||||
}
|
||||
if (this.isCapitalizedIncome() || this.isBuyDownFee()) {
|
||||
|
||||
+55
-48
@@ -3,23 +3,27 @@
|
||||
<form [formGroup]="prepayLoanForm" (ngSubmit)="submit()">
|
||||
<mat-card-content>
|
||||
<div class="layout-column">
|
||||
<mat-form-field (click)="transactionDatePicker.open()" *ngIf="!contractTermination">
|
||||
<mat-label>{{ 'labels.inputs.Transaction 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="prepayLoanForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@if (!contractTermination) {
|
||||
<mat-form-field (click)="transactionDatePicker.open()">
|
||||
<mat-label>{{ 'labels.inputs.Transaction 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 (prepayLoanForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<div class="layout-row-wrap">
|
||||
<div class="flex-50 mat-body-strong">
|
||||
@@ -55,65 +59,68 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mifosx-input-amount
|
||||
*ngIf="!contractTermination"
|
||||
[currency]="currency"
|
||||
[isRequired]="true"
|
||||
[inputFormControl]="prepayLoanForm.controls.transactionAmount"
|
||||
[inputLabel]="'Transaction Amount'"
|
||||
>
|
||||
</mifosx-input-amount>
|
||||
@if (!contractTermination) {
|
||||
<mifosx-input-amount
|
||||
[currency]="currency"
|
||||
[isRequired]="true"
|
||||
[inputFormControl]="prepayLoanForm.controls.transactionAmount"
|
||||
[inputLabel]="'Transaction Amount'"
|
||||
>
|
||||
</mifosx-input-amount>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.External Id' | translate }}</mat-label>
|
||||
<input matInput formControlName="externalId" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="!contractTermination">
|
||||
<mat-label>{{ 'labels.inputs.Payment Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="paymentTypeId">
|
||||
<mat-option *ngFor="let paymentType of paymentTypes" [value]="paymentType.id">
|
||||
{{ paymentType.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@if (!contractTermination) {
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Payment Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="paymentTypeId">
|
||||
@for (paymentType of paymentTypes; track paymentType) {
|
||||
<mat-option [value]="paymentType.id">
|
||||
{{ paymentType.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
}
|
||||
|
||||
<div class="flex-fill" *ngIf="!contractTermination">
|
||||
<span class="expandcollapsebutton m-l-10 m-t-40 flex-75" (click)="addPaymentDetails()">
|
||||
<mat-slide-toggle>
|
||||
<div [className]="showPaymentDetails ? 'enabled' : 'disabled'">
|
||||
<span class="m-l-10">{{ 'labels.inputs.Show Payment Details' | translate }}</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
</div>
|
||||
@if (!contractTermination) {
|
||||
<div class="flex-fill">
|
||||
<span class="expandcollapsebutton m-l-10 m-t-40 flex-75" (click)="addPaymentDetails()">
|
||||
<mat-slide-toggle>
|
||||
<div [className]="showPaymentDetails ? 'enabled' : 'disabled'">
|
||||
<span class="m-l-10">{{ 'labels.inputs.Show Payment Details' | translate }}</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<ng-container *ngIf="showPaymentDetails">
|
||||
@if (showPaymentDetails) {
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Account' | translate }} #</mat-label>
|
||||
<input matInput formControlName="accountNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Cheque' | translate }} #</mat-label>
|
||||
<input matInput formControlName="checkNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Routing Code' | translate }}</mat-label>
|
||||
<input matInput formControlName="routingCode" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reciept' | translate }} #</mat-label>
|
||||
<input matInput formControlName="receiptNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Bank' | translate }} #</mat-label>
|
||||
<input matInput formControlName="bankNumber" />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Note' | translate }}</mat-label>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import {
|
||||
UntypedFormGroup,
|
||||
UntypedFormBuilder,
|
||||
@@ -36,6 +36,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class PrepayLoanComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -65,14 +72,7 @@ export class PrepayLoanComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+13
-13
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #transactionDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="recoveryRepaymentLoanForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (recoveryRepaymentLoanForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Transaction Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mifosx-input-amount
|
||||
@@ -37,9 +39,11 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Payment Type' | translate }}</mat-label>
|
||||
<mat-select formControlName="paymentTypeId">
|
||||
<mat-option *ngFor="let paymentType of paymentTypes" [value]="paymentType.id">
|
||||
{{ paymentType.name }}
|
||||
</mat-option>
|
||||
@for (paymentType of paymentTypes; track paymentType) {
|
||||
<mat-option [value]="paymentType.id">
|
||||
{{ paymentType.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -53,32 +57,28 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="showPaymentDetails">
|
||||
@if (showPaymentDetails) {
|
||||
<mat-form-field>
|
||||
<mat-label> {{ 'labels.inputs.Account' | translate }} #</mat-label>
|
||||
<input matInput formControlName="accountNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Cheque' | translate }} #</mat-label>
|
||||
<input matInput formControlName="checkNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Routing Code' | translate }}</mat-label>
|
||||
<input matInput formControlName="routingCode" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reciept' | translate }} #</mat-label>
|
||||
<input matInput formControlName="receiptNumber" />
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Bank' | translate }} #</mat-label>
|
||||
<input matInput formControlName="bankNumber" />
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
}
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Note' | translate }}</mat-label>
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import {
|
||||
UntypedFormGroup,
|
||||
UntypedFormBuilder,
|
||||
@@ -34,6 +34,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class RecoveryRepaymentComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -56,14 +63,7 @@ export class RecoveryRepaymentComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+6
-4
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="rejectedDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #rejectedDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="rejectLoanForm.controls.rejectedOnDate.hasError('required')">
|
||||
{{ 'labels.inputs.Rejected Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (rejectLoanForm.controls.rejectedOnDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Rejected Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports. */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class RejectLoanComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private router = inject(Router);
|
||||
private route = inject(ActivatedRoute);
|
||||
private loanService = inject(LoansService);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
/** Loan Id. */
|
||||
loanId: any;
|
||||
/** Reject Loan form. */
|
||||
@@ -39,14 +46,7 @@ export class RejectLoanComponent implements OnInit {
|
||||
* @param route Activated Route.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private loanService: LoansService,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+6
-13
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports. */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormControl, UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -18,21 +18,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UndoApprovalComponent implements OnInit {
|
||||
private loanService = inject(LoansService);
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
/** Form Controller. */
|
||||
note: UntypedFormControl;
|
||||
|
||||
/**
|
||||
* @param loanService Loan Service.
|
||||
* @param route Activated Route.
|
||||
* @param router Router.
|
||||
*/
|
||||
constructor(
|
||||
private loanService: LoansService,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.note = this.formBuilder.control('');
|
||||
}
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, inject } from '@angular/core';
|
||||
import { UntypedFormControl, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -21,6 +21,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UndoDisbursalComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loansService = inject(LoansService);
|
||||
private router = inject(Router);
|
||||
private route = inject(ActivatedRoute);
|
||||
|
||||
@Input() actionName: string;
|
||||
|
||||
/** Loan ID. */
|
||||
@@ -34,12 +39,7 @@ export class UndoDisbursalComponent implements OnInit {
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
* @param {Router} router Router for navigation.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loansService: LoansService,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@@ -24,6 +24,14 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class UndoWriteOffComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
private alertService = inject(AlertService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -41,15 +49,7 @@ export class UndoWriteOffComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService,
|
||||
private alertService: AlertService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+148
-130
@@ -7,10 +7,10 @@
|
||||
<tr>
|
||||
<td>{{ 'labels.inputs.Disbursement Date' | translate }}</td>
|
||||
<td>
|
||||
{{ dataObject.timeline.actualDisbursementDate
|
||||
}}<span *ngIf="!dataObject.timeline.actualDisbursementDate">{{
|
||||
'labels.inputs.Not Available' | translate
|
||||
}}</span>
|
||||
{{ dataObject.timeline.actualDisbursementDate }}
|
||||
@if (!dataObject.timeline.actualDisbursementDate) {
|
||||
<span>{{ 'labels.inputs.Not Available' | translate }}</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -21,10 +21,14 @@
|
||||
<td>{{ 'labels.inputs.Loan Officer' | translate }}</td>
|
||||
<td>
|
||||
{{ dataObject.loanOfficerName }}
|
||||
<span *ngIf="!dataObject.loanOfficerName">{{ 'labels.inputs.Unassigned' | translate }}</span>
|
||||
<span *ngIf="dataObject.loanOfficerName">
|
||||
<fa-icon icon="times"></fa-icon>
|
||||
</span>
|
||||
@if (!dataObject.loanOfficerName) {
|
||||
<span>{{ 'labels.inputs.Unassigned' | translate }}</span>
|
||||
}
|
||||
@if (dataObject.loanOfficerName) {
|
||||
<span>
|
||||
<fa-icon icon="times"></fa-icon>
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -44,7 +48,9 @@
|
||||
<td>{{ 'labels.inputs.Loan Purpose' | translate }}</td>
|
||||
<td>
|
||||
{{ dataObject.loanPurposeName }}
|
||||
<span *ngIf="!dataObject.loanPurposeName"> {{ 'labels.inputs.Not Provided' | translate }} </span>
|
||||
@if (!dataObject.loanPurposeName) {
|
||||
<span> {{ 'labels.inputs.Not Provided' | translate }} </span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -63,7 +69,9 @@
|
||||
<td>{{ 'labels.inputs.Arrears By' | translate }}</td>
|
||||
<td>
|
||||
{{ dataObject.summary?.totalOverdue | formatNumber }}
|
||||
<span *ngIf="dataObject.summary?.totalOverdue < 0">{{ 'labels.inputs.Not Provided' | translate }}</span>
|
||||
@if (dataObject.summary?.totalOverdue < 0) {
|
||||
<span>{{ 'labels.inputs.Not Provided' | translate }}</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -71,129 +79,139 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="guarantorDetails" class="layout-row-wrap responsive-column flex-fill">
|
||||
<!-- guarantors details table -->
|
||||
<div class="heading-content">
|
||||
<div class="layout-column flex-50">
|
||||
<div class="heading-name">
|
||||
<h3>{{ 'labels.heading.Guarantors Details' | translate }}</h3>
|
||||
@if (guarantorDetails) {
|
||||
<div class="layout-row-wrap responsive-column flex-fill">
|
||||
<!-- guarantors details table -->
|
||||
<div class="heading-content">
|
||||
<div class="layout-column flex-50">
|
||||
<div class="heading-name">
|
||||
<h3>{{ 'labels.heading.Guarantors Details' | translate }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout-column flex-50">
|
||||
<div class="layout-row align-flex-end">
|
||||
<button mat-raised-button class="f-right" color="primary" (click)="toggleGuarantorsDetailsOverview()">
|
||||
{{ showDeletedGuarantorsAccounts ? 'Hide Deleted Guarantors' : 'Show Deleted Guarantors' }}
|
||||
</button>
|
||||
<div class="layout-column flex-50">
|
||||
<div class="layout-row align-flex-end">
|
||||
<button mat-raised-button class="f-right" color="primary" (click)="toggleGuarantorsDetailsOverview()">
|
||||
{{ showDeletedGuarantorsAccounts ? 'Hide Deleted Guarantors' : 'Show Deleted Guarantors' }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table
|
||||
class="flex-fill"
|
||||
mat-table
|
||||
[dataSource]="guarantorDetails | accountsFilter: 'guarantor' : showDeletedGuarantorsAccounts"
|
||||
>
|
||||
<ng-container matColumnDef="fullname">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
@if (!guarantor.guarantorFundingDetails) {
|
||||
<span> {{ guarantor.firstname }} {{ guarantor.lastname }} </span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="relationship">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Relationship' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
@if (!guarantor.guarantorFundingDetails) {
|
||||
<span>
|
||||
{{ guarantor.clientRelationshipType?.name }}
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="guarantortype">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Guarantor Type' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
@if (!guarantor.guarantorFundingDetails) {
|
||||
<span>
|
||||
{{ guarantor.guarantorType.value }}
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="depositAccount">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Deposit Account' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
@if (!guarantor.guarantorFundingDetails) {
|
||||
<span> </span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
@if (!guarantor.guarantorFundingDetails) {
|
||||
<span> </span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="remainingAmount">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Remaining Amount' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
@if (!guarantor.guarantorFundingDetails) {
|
||||
<span> </span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Status' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
@if (!guarantor.guarantorFundingDetails) {
|
||||
<span>
|
||||
@if (guarantor.status) {
|
||||
<span>
|
||||
{{ 'labels.inputs.Active' | translate }}
|
||||
</span>
|
||||
}
|
||||
@if (!guarantor.status) {
|
||||
<span>
|
||||
{{ 'labels.inputs.Deleted' | translate }}
|
||||
</span>
|
||||
}
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="action">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Action' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor; let id = index">
|
||||
@if (!guarantor.guarantorFundingDetails) {
|
||||
<span>
|
||||
<button
|
||||
mat-raised-button
|
||||
class="account-action-button"
|
||||
color="primary"
|
||||
*mifosxHasPermission="'READ_SAVINGSACCOUNT'"
|
||||
(click)="viewGuarantorDetails(guarantor)"
|
||||
>
|
||||
<fa-icon icon="eye" class="m-r-10"></fa-icon>
|
||||
</button>
|
||||
@if (guarantor.status && guarantor.guarantorType.id === 3 && guarantor.id) {
|
||||
<button mat-raised-button class="account-action-button" color="primary">
|
||||
<fa-icon icon="edit" class="m-r-10"></fa-icon>
|
||||
</button>
|
||||
}
|
||||
@if (guarantor.status) {
|
||||
<span>
|
||||
<button
|
||||
mat-raised-button
|
||||
class="account-action-button"
|
||||
color="warn"
|
||||
*mifosxHasPermission="'DELETE_GUARANTOR'"
|
||||
(click)="deleteGuarantor(guarantor.id)"
|
||||
>
|
||||
<fa-icon icon="trash" class="m-r-10"></fa-icon>
|
||||
</button>
|
||||
</span>
|
||||
}
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="guarantorsDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: guarantorsDisplayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table
|
||||
class="flex-fill"
|
||||
mat-table
|
||||
[dataSource]="guarantorDetails | accountsFilter: 'guarantor' : showDeletedGuarantorsAccounts"
|
||||
>
|
||||
<ng-container matColumnDef="fullname">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
<span *ngIf="!guarantor.guarantorFundingDetails">
|
||||
{{ guarantor.firstname }} {{ guarantor.lastname }}
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="relationship">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Relationship' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
<span *ngIf="!guarantor.guarantorFundingDetails">
|
||||
{{ guarantor.clientRelationshipType?.name }}
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="guarantortype">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Guarantor Type' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
<span *ngIf="!guarantor.guarantorFundingDetails">
|
||||
{{ guarantor.guarantorType.value }}
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="depositAccount">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Deposit Account' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
<span *ngIf="!guarantor.guarantorFundingDetails"> </span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
<span *ngIf="!guarantor.guarantorFundingDetails"> </span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="remainingAmount">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Remaining Amount' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
<span *ngIf="!guarantor.guarantorFundingDetails"> </span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Status' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor">
|
||||
<span *ngIf="!guarantor.guarantorFundingDetails">
|
||||
<span *ngIf="guarantor.status">
|
||||
{{ 'labels.inputs.Active' | translate }}
|
||||
</span>
|
||||
<span *ngIf="!guarantor.status">
|
||||
{{ 'labels.inputs.Deleted' | translate }}
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="action">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Action' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let guarantor; let id = index">
|
||||
<span *ngIf="!guarantor.guarantorFundingDetails">
|
||||
<button
|
||||
mat-raised-button
|
||||
class="account-action-button"
|
||||
color="primary"
|
||||
*mifosxHasPermission="'READ_SAVINGSACCOUNT'"
|
||||
(click)="viewGuarantorDetails(guarantor)"
|
||||
>
|
||||
<fa-icon icon="eye" class="m-r-10"></fa-icon>
|
||||
</button>
|
||||
<button
|
||||
mat-raised-button
|
||||
class="account-action-button"
|
||||
color="primary"
|
||||
*ngIf="guarantor.status && guarantor.guarantorType.id === 3 && guarantor.id"
|
||||
>
|
||||
<fa-icon icon="edit" class="m-r-10"></fa-icon>
|
||||
</button>
|
||||
<span *ngIf="guarantor.status">
|
||||
<button
|
||||
mat-raised-button
|
||||
class="account-action-button"
|
||||
color="warn"
|
||||
*mifosxHasPermission="'DELETE_GUARANTOR'"
|
||||
(click)="deleteGuarantor(guarantor.id)"
|
||||
>
|
||||
<fa-icon icon="trash" class="m-r-10"></fa-icon>
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="guarantorsDisplayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: guarantorsDisplayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
@@ -54,6 +54,11 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class ViewGuarantorsComponent implements OnInit {
|
||||
dialog = inject(MatDialog);
|
||||
loansService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
|
||||
@Input() dataObject: any;
|
||||
guarantorDetails: any;
|
||||
showDeletedGuarantorsAccounts = false;
|
||||
@@ -75,12 +80,7 @@ export class ViewGuarantorsComponent implements OnInit {
|
||||
* @param {route} Route Route
|
||||
* @param {router} Router Router
|
||||
*/
|
||||
constructor(
|
||||
public dialog: MatDialog,
|
||||
public loansService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+6
-4
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="interestDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #interestDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="loanInterestForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Interest Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (loanInterestForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Interest Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mifosx-input-amount
|
||||
|
||||
+8
-17
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports. */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { Router, ActivatedRoute, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -26,6 +26,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class WaiveInterestComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
private dateUtils = inject(Dates);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
|
||||
@Input() dataObject: any;
|
||||
|
||||
/** Loan Interest form. */
|
||||
@@ -36,22 +43,6 @@ export class WaiveInterestComponent implements OnInit {
|
||||
maxDate = new Date();
|
||||
currency: Currency;
|
||||
|
||||
/**
|
||||
* Get data from `Resolver`.
|
||||
* @param {FormBuilder} formBuilder Form Builder.
|
||||
* @param {Router} router Router.
|
||||
* @param {LoansService} loanService Loan Service.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService,
|
||||
private dateUtils: Dates,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.setLoanInterestForm();
|
||||
|
||||
+6
-4
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="withdrawnOnDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #withdrawnOnDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="withdrawnByClientLoanForm.controls.withdrawnOnDate.hasError('required')">
|
||||
{{ 'labels.inputs.Withdrawn On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (withdrawnByClientLoanForm.controls.withdrawnOnDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Withdrawn On Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, FormControl, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
|
||||
@@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class WithdrawnByClientComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private loanService = inject(LoansService);
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private dateUtils = inject(Dates);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -40,14 +47,7 @@ export class WithdrawnByClientComponent implements OnInit {
|
||||
* @param {Router} router Router for navigation.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private loanService: LoansService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
+11
-7
@@ -15,10 +15,12 @@
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="writeOffDatePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #writeOffDatePicker></mat-datepicker>
|
||||
<mat-error *ngIf="writeOffForm.controls.transactionDate.hasError('required')">
|
||||
{{ 'labels.inputs.Write Off Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
@if (writeOffForm.controls.transactionDate.hasError('required')) {
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Write Off Date' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
}
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
@@ -29,9 +31,11 @@
|
||||
<mat-form-field>
|
||||
<mat-label>{{ 'labels.inputs.Reason for Write-Off' | translate }}</mat-label>
|
||||
<mat-select formControlName="writeoffReasonId">
|
||||
<mat-option *ngFor="let writeOffReason of writeOffReasonOptions" [value]="writeOffReason.id">
|
||||
{{ writeOffReason.name }}
|
||||
</mat-option>
|
||||
@for (writeOffReason of writeOffReasonOptions; track writeOffReason) {
|
||||
<mat-option [value]="writeOffReason.id">
|
||||
{{ writeOffReason.name }}
|
||||
</mat-option>
|
||||
}
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
+9
-9
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports. */
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Component, OnInit, Input, inject } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
@@ -23,6 +23,13 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||
]
|
||||
})
|
||||
export class WriteOffPageComponent implements OnInit {
|
||||
private formBuilder = inject(UntypedFormBuilder);
|
||||
private route = inject(ActivatedRoute);
|
||||
private loanService = inject(LoansService);
|
||||
private dateUtils = inject(Dates);
|
||||
private router = inject(Router);
|
||||
private settingsService = inject(SettingsService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
/** Loan Id */
|
||||
loanId: string;
|
||||
@@ -44,14 +51,7 @@ export class WriteOffPageComponent implements OnInit {
|
||||
* @param {Router} router Router.
|
||||
* @param {SettingsService} settingsService Settings Service
|
||||
*/
|
||||
constructor(
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private loanService: LoansService,
|
||||
private dateUtils: Dates,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService
|
||||
) {
|
||||
constructor() {
|
||||
this.loanId = this.route.snapshot.params['loanId'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user