feat: add loan action (guarantors) (#1059)
- add view guarantor - add create guarantor - add view guarantor details - add delete guarantor - add recover from guarantor - add delete loan action Fixes: #832, #246
This commit is contained in:
+44
@@ -0,0 +1,44 @@
|
||||
<h1 mat-dialog-title>Guarantor Detail</h1>
|
||||
|
||||
<div mat-dialog-content fxLayout="column">
|
||||
|
||||
<div fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="50%">First Name:</span>
|
||||
<span fxFlex="50%">{{ data.guarantorData.firstname }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="50%">Last Name:</span>
|
||||
<span fxFlex="50%">{{ data.guarantorData.lastname }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="50%">Relationship:</span>
|
||||
<span fxFlex="50%">{{ data.guarantorData.clientRelationshipType.name }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="50%">Guarantor Type:</span>
|
||||
<span fxFlex="50%">{{ data.guarantorData.guarantorType.value }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="50%">Status:</span>
|
||||
<span fxFlex="50%">
|
||||
<span *ngIf="data.guarantorData.status">
|
||||
Active
|
||||
</span>
|
||||
<span *ngIf="!data.guarantorData.status">
|
||||
Deleted
|
||||
</span></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<mat-dialog-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
<button mat-raised-button mat-dialog-close> Cancel </button>
|
||||
</mat-dialog-actions>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LoansAccountViewGuarantorDetailsDialogComponent } from './loans-account-view-guarantor-details-dialog.component';
|
||||
|
||||
describe('LoansAccountViewGuarantorDetailsDialogComponent', () => {
|
||||
let component: LoansAccountViewGuarantorDetailsDialogComponent;
|
||||
let fixture: ComponentFixture<LoansAccountViewGuarantorDetailsDialogComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ LoansAccountViewGuarantorDetailsDialogComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LoansAccountViewGuarantorDetailsDialogComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import { Component, OnInit, Inject } from '@angular/core';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-loans-account-view-guarantor-details-dialog',
|
||||
templateUrl: './loans-account-view-guarantor-details-dialog.component.html',
|
||||
styleUrls: ['./loans-account-view-guarantor-details-dialog.component.scss']
|
||||
})
|
||||
export class LoansAccountViewGuarantorDetailsDialogComponent implements OnInit {
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<LoansAccountViewGuarantorDetailsDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.dialogRef.updateSize('400px');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user