mirror of
https://github.com/valitydev/fraudbusters-ui.git
synced 2024-11-06 08:35:18 +00:00
Fix number
This commit is contained in:
parent
fd721a6e07
commit
39bf703b6c
@ -29,6 +29,7 @@
|
||||
[inProgress]="inProgress$"
|
||||
[units]="'%'"
|
||||
[type]="errorStyle"
|
||||
[formatNumber]="true"
|
||||
></fb-info-card>
|
||||
<fb-info-card
|
||||
fxFlex="25"
|
||||
@ -36,6 +37,7 @@
|
||||
[value]="blockedSum$ | async"
|
||||
[inProgress]="inProgress$"
|
||||
[type]="errorStyle"
|
||||
[formatNumber]="true"
|
||||
></fb-info-card>
|
||||
</div>
|
||||
<div fxFlexFill fxLayout="column" fxLayoutAlign="space-between center" [fxLayoutGap]="layoutGapM">
|
||||
|
@ -35,22 +35,18 @@ export class BaseAnalyticsService {
|
||||
);
|
||||
this.attemptedPayments$ = this.searchParameters$.pipe(
|
||||
switchMap((value) => this.analyticsService.getAttemptedPaymentsCount(value)),
|
||||
filter((r) => !!r),
|
||||
shareReplay(1)
|
||||
);
|
||||
this.blockedPayments$ = this.searchParameters$.pipe(
|
||||
switchMap((value) => this.analyticsService.getBlockedPaymentsCount(value)),
|
||||
filter((r) => !!r),
|
||||
shareReplay(1)
|
||||
);
|
||||
this.ratioOfBlocked$ = this.searchParameters$.pipe(
|
||||
switchMap((value) => this.analyticsService.getBlockedPaymentsRatio(value)),
|
||||
filter((r) => !!r),
|
||||
shareReplay(1)
|
||||
);
|
||||
this.blockedSum$ = this.searchParameters$.pipe(
|
||||
switchMap((value) => this.analyticsService.getBlockedPaymentsSum(value)),
|
||||
filter((r) => !!r),
|
||||
shareReplay(1)
|
||||
);
|
||||
this.chartDataX$ = this.searchParameters$.pipe(
|
||||
|
@ -4,7 +4,10 @@
|
||||
<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">
|
||||
<h1 *ngIf="!(inProgress | async) && !formatNumber" [class]="type" fxLayoutAlign="center">
|
||||
{{ value | formatNumber }} {{ units }}
|
||||
</h1>
|
||||
<h1 *ngIf="!(inProgress | async) && formatNumber" [class]="type" fxLayoutAlign="center">
|
||||
{{ value | formatNumber | number: '.1-4' }} {{ units }}
|
||||
</h1>
|
||||
</mat-card-content>
|
||||
|
@ -12,6 +12,7 @@ export class FbInfoCardComponent {
|
||||
@Input() units = '';
|
||||
@Input() type: string;
|
||||
@Input() inProgress: Observable<boolean>;
|
||||
@Input() formatNumber = false;
|
||||
|
||||
numberFormat(num) {
|
||||
return num === 'NaN' || !num ? 0.0 : num;
|
||||
|
Loading…
Reference in New Issue
Block a user