Share Product and Share Account views updated
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
fafdd0dd20
commit
a41df49a3e
@@ -1,5 +1,8 @@
|
||||
<span (mouseenter)="mouseEnter()" (mouseleave)="mouseLeave()">
|
||||
<span class="m-l-5" *ngIf="displayL && iconVisible" (click)="copyValue()"><b><fa-icon icon="copy" size="sm" title="{{'labels.text.Copy Account Number' | translate }}"></fa-icon></b></span>
|
||||
<span class="m-l-5">{{ accountNo }}</span>
|
||||
<span class="m-l-5" *ngIf="accountType">
|
||||
<a href="{{getAccountLink()}}">{{ accountNo }}</a>
|
||||
</span>
|
||||
<span class="m-l-5" *ngIf="!accountType">{{ accountNo }}</span>
|
||||
<span class="m-l-3" *ngIf="displayR && iconVisible" (click)="copyValue()"><b><fa-icon icon="copy" size="sm" title="{{'labels.text.Copy Account Number' | translate }}"></fa-icon></b></span>
|
||||
</span>
|
||||
|
||||
@@ -9,6 +9,9 @@ import { Clipboard } from '@angular/cdk/clipboard';
|
||||
export class AccountNumberComponent implements OnInit {
|
||||
@Input() accountNo: string;
|
||||
@Input() display = 'right';
|
||||
@Input() clientId: number | null = null;
|
||||
@Input() accountId: number | null = null;
|
||||
@Input() accountType: string | null = null;
|
||||
|
||||
iconVisible = false;
|
||||
displayL = false;
|
||||
@@ -32,4 +35,19 @@ export class AccountNumberComponent implements OnInit {
|
||||
mouseLeave() {
|
||||
this.iconVisible = false;
|
||||
}
|
||||
|
||||
getAccountLink(): string {
|
||||
if (this.accountType) {
|
||||
return `/#/clients/${this.clientId}/${this.getAccountType()}/${this.accountId}`;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
private getAccountType(): string {
|
||||
if (this.accountType === '1') {
|
||||
return 'loan-accounts';
|
||||
} else if (this.accountType === '2') {
|
||||
return 'savings-accounts';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user