Browse Source

fix(lib): update checks on projected total amount

Method get projected total amount should not return 0.
pull/6490/head
KenTandrian 4 weeks ago
parent
commit
0aa2c84bbc
  1. 6
      libs/ui/src/lib/fire-calculator/fire-calculator.component.ts

6
libs/ui/src/lib/fire-calculator/fire-calculator.component.ts

@ -55,7 +55,7 @@ import {
startOfMonth, startOfMonth,
sub sub
} from 'date-fns'; } from 'date-fns';
import { isNil, isNumber } from 'lodash'; import { isNumber } from 'lodash';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { debounceTime } from 'rxjs'; import { debounceTime } from 'rxjs';
@ -303,7 +303,7 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy {
}).format(totalAmount)}`; }).format(totalAmount)}`;
}, },
label: (context) => { label: (context) => {
let label = context.dataset.label || ''; let label = context.dataset.label ?? '';
if (label) { if (label) {
label += ': '; label += ': ';
@ -473,7 +473,7 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy {
'projectedTotalAmount' 'projectedTotalAmount'
)?.value; )?.value;
if (!isNil(projectedTotalAmount)) { if (projectedTotalAmount) {
return projectedTotalAmount; return projectedTotalAmount;
} }

Loading…
Cancel
Save