mirror of
https://github.com/valitydev/fraudbusters-ui.git
synced 2024-11-06 08:35:18 +00:00
commit
9edb13611c
@ -1,11 +1,11 @@
|
||||
<mat-card fxLayoutAlign="center">
|
||||
<mat-card-content>
|
||||
<h4 fxLayoutAlign="center">{{ headerText }}</h4>
|
||||
<div *ngIf="inProgress | async" fxLayout fxLayoutAlign="center" style="height: 33px; width: 140px">
|
||||
<div *ngIf="inProgress | async" fxLayout fxLayoutAlign="center" style="height: 33px; width: 135px">
|
||||
<mat-progress-spinner color="primary" mode="indeterminate" diameter="33"></mat-progress-spinner>
|
||||
</div>
|
||||
<h1 *ngIf="!(inProgress | async)" [class]="type" fxLayoutAlign="center">
|
||||
{{ numberFormat(valueNumber | number: '.1-4') }} {{ units }}
|
||||
{{ numberFormat(valueNumber) | number: '.1-4' }} {{ units }}
|
||||
</h1>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
@ -13,13 +13,13 @@ export class FbInfoCardComponent implements OnInit {
|
||||
@Input() type: string;
|
||||
@Input() inProgress: Observable<boolean>;
|
||||
|
||||
valueNumber = 0;
|
||||
valueNumber = 0.0;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.value.subscribe((value) => (this.valueNumber = value ? value : 0));
|
||||
}
|
||||
|
||||
numberFormat(num) {
|
||||
return num === 'NaN' ? 0 : num;
|
||||
return num === 'NaN' ? 0.0 : num;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user