refactor: Loans Module (#1150)

Fixes: #1149
This commit is contained in:
Muskan Khedia
2020-07-22 20:32:55 +05:30
committed by GitHub
parent f618bb3cda
commit 55280eae2a
65 changed files with 622 additions and 470 deletions
@@ -12,6 +12,7 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
})
export class ConfirmationDialogComponent implements OnInit {
color: string;
/**
* @param {MatDialogRef} dialogRef Component reference to dialog.
* @param {any} data Provides a deleteContext.
@@ -20,6 +21,24 @@ export class ConfirmationDialogComponent implements OnInit {
@Inject(MAT_DIALOG_DATA) public data: any) { }
ngOnInit() {
this.setColor();
}
setColor() {
switch (this.data.type) {
case 'Basic':
this.color = 'primary';
break;
case 'Mild':
this.color = 'accent';
break;
case 'Strong':
this.color = 'warn';
break;
default:
this.color = 'warn';
}
}
}