-
Notifications
You must be signed in to change notification settings - Fork 926
WEB-813: Working Capital loan delinquency actions #3460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
adamsaghy
merged 1 commit into
openMF:dev
from
alberto-art3ch:WEB-813/working-capital-loan-delinquency-actions
Apr 28, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,4 +12,5 @@ | |
| export interface Alert { | ||
| type: string; | ||
| message: string; | ||
| enabled?: boolean; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/app/loans/common-resolvers/working-capital/loan-delinquency-actions.resolver.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /** | ||
| * Copyright since 2025 Mifos Initiative | ||
| * | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
|
|
||
| import { Injectable, inject } from '@angular/core'; | ||
| import { ActivatedRouteSnapshot } from '@angular/router'; | ||
| import { Observable } from 'rxjs'; | ||
| import { LoanBaseResolver } from '../loan-base.resolver'; | ||
| import { LoansService } from 'app/loans/loans.service'; | ||
|
|
||
| @Injectable({ | ||
| providedIn: 'root' | ||
| }) | ||
| export class LoanDelinquencyRangeScheduleResolver extends LoanBaseResolver { | ||
| private loansService = inject(LoansService); | ||
|
|
||
| constructor() { | ||
| super(); | ||
| } | ||
|
|
||
| /** | ||
| * Returns the Loans with Association data. | ||
| * @returns {Observable<any>} | ||
| */ | ||
| resolve(route: ActivatedRouteSnapshot): Observable<any> { | ||
| this.initialize(route); | ||
| const loanId = route.paramMap.get('loanId') || route.parent.paramMap.get('loanId'); | ||
| if (!isNaN(+loanId)) { | ||
| if (this.isWorkingCapital) { | ||
| return this.loansService.getWorkingCapitalLoanDelinquencyRangeSchedule(loanId); | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...nquency-action-reschedule-dialog/loan-delinquency-action-reschedule-dialog.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| <!-- | ||
| Copyright since 2025 Mifos Initiative | ||
|
|
||
| This Source Code Form is subject to the terms of the Mozilla Public | ||
| License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| --> | ||
|
|
||
| <h2 mat-dialog-title>{{ 'labels.heading.Loan Delinquency Actions' | translate }}</h2> | ||
|
|
||
| <div mat-dialog-content [formGroup]="delinquencyActionForm"> | ||
| <div class="layout-column"> | ||
| <mat-form-field class="flex-98"> | ||
| <mat-label>{{ 'labels.inputs.Minimum Payment' | translate }}</mat-label> | ||
| <input type="number" matInput formControlName="minimumPayment" /> | ||
| </mat-form-field> | ||
|
|
||
| <mat-form-field class="flex-98"> | ||
| <mat-label>{{ 'labels.inputs.Minimum Payment Type' | translate }}</mat-label> | ||
| <mat-select formControlName="minimumPaymentType"> | ||
| @for (minimumPaymentType of minimumPaymentTypeOptions; track minimumPaymentType) { | ||
| <mat-option [value]="minimumPaymentType.id"> | ||
| {{ minimumPaymentType.value | translateKey: 'catalogs' }} | ||
| </mat-option> | ||
| } | ||
| </mat-select> | ||
| </mat-form-field> | ||
|
|
||
| <mat-form-field class="flex-98"> | ||
| <mat-label>{{ 'labels.inputs.Period Payment Frequency' | translate }}</mat-label> | ||
| <input | ||
| type="number" | ||
| matInput | ||
| formControlName="frequency" | ||
| matTooltip="{{ 'tooltips.Fields are input to calculating the repayment schedule' | translate }}" | ||
| /> | ||
| </mat-form-field> | ||
|
|
||
| <mat-form-field class="flex-98"> | ||
| <mat-label>{{ 'labels.inputs.Period Payment Frequency Type' | translate }}</mat-label> | ||
| <mat-select formControlName="frequencyType"> | ||
| @for (frequencyType of frequencyTypeOptions; track frequencyType) { | ||
| <mat-option [value]="frequencyType.id"> | ||
| {{ frequencyType.value | translateKey: 'catalogs' }} | ||
| </mat-option> | ||
| } | ||
| </mat-select> | ||
| </mat-form-field> | ||
| </div> | ||
| </div> | ||
|
|
||
| <mat-dialog-actions class="layout-row layout-xs-column layout-align-center gap-2percent"> | ||
| <button mat-raised-button mat-dialog-close>{{ 'labels.buttons.Cancel' | translate }}</button> | ||
| <button | ||
| mat-raised-button | ||
| color="primary" | ||
| [mat-dialog-close]="{ data: delinquencyActionForm }" | ||
| [disabled]="!delinquencyActionForm.valid || delinquencyActionForm.pristine" | ||
| > | ||
| {{ 'labels.buttons.Reschedule' | translate }} | ||
| </button> | ||
| </mat-dialog-actions> |
7 changes: 7 additions & 0 deletions
7
...nquency-action-reschedule-dialog/loan-delinquency-action-reschedule-dialog.component.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| /** | ||
| * Copyright since 2025 Mifos Initiative | ||
| * | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ |
70 changes: 70 additions & 0 deletions
70
...linquency-action-reschedule-dialog/loan-delinquency-action-reschedule-dialog.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| /** | ||
| * Copyright since 2025 Mifos Initiative | ||
| * | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
|
|
||
| import { Component, inject } from '@angular/core'; | ||
| import { UntypedFormBuilder, UntypedFormGroup, Validators, ReactiveFormsModule } from '@angular/forms'; | ||
| import { | ||
| MAT_DIALOG_DATA, | ||
| MatDialogRef, | ||
| MatDialogTitle, | ||
| MatDialogContent, | ||
| MatDialogActions, | ||
| MatDialogClose | ||
| } from '@angular/material/dialog'; | ||
| import { CdkScrollable } from '@angular/cdk/scrolling'; | ||
| import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; | ||
| import { MatTooltip } from '@angular/material/tooltip'; | ||
| import { StringEnumOptionData } from 'app/shared/models/option-data.model'; | ||
|
|
||
| @Component({ | ||
| selector: 'mifosx-loan-delinquency-action-reschedule-dialog', | ||
| templateUrl: './loan-delinquency-action-reschedule-dialog.component.html', | ||
| styleUrl: './loan-delinquency-action-reschedule-dialog.component.scss', | ||
| imports: [ | ||
| ...STANDALONE_SHARED_IMPORTS, | ||
| MatDialogTitle, | ||
| CdkScrollable, | ||
| MatDialogContent, | ||
| MatDialogActions, | ||
| MatDialogClose, | ||
| MatTooltip | ||
| ] | ||
| }) | ||
| export class LoanDelinquencyActionRescheduleDialogComponent { | ||
| dialogRef = inject<MatDialogRef<LoanDelinquencyActionRescheduleDialogComponent>>(MatDialogRef); | ||
| data = inject(MAT_DIALOG_DATA); | ||
| private formBuilder = inject(UntypedFormBuilder); | ||
|
|
||
| delinquencyActionForm: UntypedFormGroup; | ||
|
|
||
| frequencyTypeOptions: StringEnumOptionData[] = []; | ||
| minimumPaymentTypeOptions: StringEnumOptionData[] = []; | ||
|
|
||
| constructor() { | ||
| this.createDelinquencyActionForm(); | ||
| this.frequencyTypeOptions = this.data.frequencyTypeOptions; | ||
| this.minimumPaymentTypeOptions = this.data.minimumPaymentTypeOptions; | ||
| } | ||
|
|
||
| createDelinquencyActionForm() { | ||
| this.delinquencyActionForm = this.formBuilder.group({ | ||
| minimumPayment: [ | ||
| '' | ||
| ], | ||
| minimumPaymentType: [ | ||
| '' | ||
| ], | ||
| frequency: [ | ||
| '' | ||
| ], | ||
| frequencyType: [ | ||
| '' | ||
| ] | ||
| }); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.