@zeniai/client-epic-state 4.11.65 → 4.11.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -153,6 +153,8 @@ function getYearToDateSumBalance(firstMonthOfFY, allBalancesOrderedAsc, thisPeri
153
153
  return result;
154
154
  });
155
155
  const sumAmount = ytdBalances.reduce((sum, value) => sum + value.balance.amount, 0);
156
+ const forecastSumAmount = ytdBalances.reduce((sum, value) => { var _a, _b; return sum + ((_b = (_a = value.forecast) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0); }, 0);
157
+ const forecastTotalSumAmount = ytdBalances.reduce((sum, value) => { var _a, _b; return sum + ((_b = (_a = value.totalForecast) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0); }, 0);
156
158
  const totalSumAmount = ytdBalances.reduce((sum, value) => { var _a, _b; return sum + ((_b = (_a = value.totalBalance) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0); }, 0);
157
159
  const firstMonthBalance = allBalancesOrderedAsc[0];
158
160
  const resultBalance = Object.assign({}, firstMonthBalance, {
@@ -162,6 +164,12 @@ function getYearToDateSumBalance(firstMonthOfFY, allBalancesOrderedAsc, thisPeri
162
164
  totalBalance: Object.assign({}, firstMonthBalance.balance, {
163
165
  amount: totalSumAmount,
164
166
  }),
167
+ forecast: Object.assign({}, firstMonthBalance.forecast, {
168
+ amount: forecastSumAmount,
169
+ }),
170
+ totalForecast: Object.assign({}, firstMonthBalance.totalForecast, {
171
+ amount: forecastTotalSumAmount,
172
+ }),
165
173
  label: '',
166
174
  });
167
175
  if (ytdBalances.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.11.65",
3
+ "version": "4.11.66",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",