-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loan account with Term variations details tab
- Loading branch information
Jose Alberto Hernandez
committed
Nov 14, 2024
1 parent
9034ce2
commit 9567452
Showing
19 changed files
with
146 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
29 changes: 29 additions & 0 deletions
29
src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.html
This file contains 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,29 @@ | ||
<div class="container"> | ||
|
||
<h3>{{"labels.heading.Term Variations" | translate}}</h3> | ||
<table mat-table [dataSource]="loanTermVariationsData" *ngIf="loanTermVariationsData.length>0"> | ||
|
||
<ng-container matColumnDef="termType"> | ||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Type" | translate}} </th> | ||
<td mat-cell *matCellDef="let item">{{ item.termType.value | translate }}</td> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="applicableFrom"> | ||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Added On" | translate}} </th> | ||
<td mat-cell *matCellDef="let item">{{ item.termVariationApplicableFrom | dateFormat }}</td> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="value"> | ||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Value" | translate}} </th> | ||
<td mat-cell *matCellDef="let item">{{ item.decimalValue | formatNumber }}</td> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="specificToInstallment"> | ||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Specific to Installment" | translate}} </th> | ||
<td mat-cell *matCellDef="let item">{{ item.isSpecificToInstallment | yesNo }}</td> | ||
</ng-container> | ||
|
||
<tr mat-header-row *matHeaderRowDef="loanDTermVariationsColumns"></tr> | ||
<tr mat-row *matRowDef="let row; columns: loanDTermVariationsColumns;"></tr> | ||
</table> | ||
</div> |
12 changes: 12 additions & 0 deletions
12
src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.scss
This file contains 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,12 @@ | ||
table { | ||
width: 100%; | ||
} | ||
|
||
.container { | ||
padding-top: 1%; | ||
padding-bottom: 2%; | ||
|
||
.delete-button { | ||
margin-left: 1%; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.spec.ts
This file contains 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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { LoanTermVariationsTabComponent } from './loan-term-variations-tab.component'; | ||
|
||
describe('LoanTermVariationsTabComponent', () => { | ||
let component: LoanTermVariationsTabComponent; | ||
let fixture: ComponentFixture<LoanTermVariationsTabComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ LoanTermVariationsTabComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(LoanTermVariationsTabComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
28 changes: 28 additions & 0 deletions
28
src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts
This file contains 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,28 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { ActivatedRoute } from '@angular/router'; | ||
|
||
@Component({ | ||
selector: 'mifosx-loan-term-variations-tab', | ||
templateUrl: './loan-term-variations-tab.component.html', | ||
styleUrls: ['./loan-term-variations-tab.component.scss'] | ||
}) | ||
export class LoanTermVariationsTabComponent implements OnInit { | ||
|
||
/** Loan Details Data */ | ||
loanTermVariationsData: any[] = []; | ||
|
||
loanId: number; | ||
|
||
loanDTermVariationsColumns: string[] = ['termType', 'applicableFrom', 'value', 'specificToInstallment']; | ||
|
||
constructor(private route: ActivatedRoute) { | ||
this.route.parent.data.subscribe((data: { loanDetailsData: any, }) => { | ||
this.loanTermVariationsData = data.loanDetailsData.loanTermVariations; | ||
}); | ||
this.loanId = this.route.parent.parent.snapshot.params['loanId']; | ||
} | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
This file contains 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 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 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 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 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 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 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 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 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 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 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 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.