From 14826188053c2a4e8bfbf7bbe67bb0d85e2dbb67 Mon Sep 17 00:00:00 2001 From: Sitnikov Ivan Date: Mon, 11 Sep 2023 10:45:24 +0500 Subject: [PATCH] chore(condo): DOMA-7004 rid of Bigjs at property dataloader --- .../domains/analytics/utils/services/dataLoaders/property.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/condo/domains/analytics/utils/services/dataLoaders/property.js b/apps/condo/domains/analytics/utils/services/dataLoaders/property.js index d6534bac7b9..bd2f8f02949 100644 --- a/apps/condo/domains/analytics/utils/services/dataLoaders/property.js +++ b/apps/condo/domains/analytics/utils/services/dataLoaders/property.js @@ -1,5 +1,3 @@ -const Big = require('big.js') - const { AbstractDataLoader } = require('@condo/domains/analytics/utils/services/dataLoaders/AbstractDataLoader') const { GqlWithKnexLoadList } = require('@condo/domains/common/utils/serverSchema') @@ -17,7 +15,7 @@ class PropertyDataLoader extends AbstractDataLoader { const propertyIds = await propertyUnitDataLoader.load() const result = await propertyUnitDataLoader.loadAggregate('SUM("unitsCount")', propertyIds.map(({ id }) => id)) - return { sum: new Big(result.sum || 0).toFixed(0) } + return { sum: result.sum || 0 } } }