@zeniai/client-epic-state 4.11.65 → 4.11.67
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) {
|
|
@@ -14,12 +14,12 @@ const fetchPaymentSourcesEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0
|
|
|
14
14
|
return fetchPaymentSourcesApi$.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
15
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data) {
|
|
16
16
|
return (0, rxjs_1.from)([
|
|
17
|
+
(0, cardPaymentReducer_1.updateCardPayments)(response.data.payment_sources.cards),
|
|
18
|
+
(0, subscriptionPaymentAccountReducer_1.updateSubscriptionPaymentAccounts)(response.data.payment_sources.bank_accounts),
|
|
17
19
|
(0, cardPaymentViewReducer_1.updatePaymentSources)({
|
|
18
20
|
fetchState: 'Completed',
|
|
19
21
|
response: response.data,
|
|
20
22
|
}),
|
|
21
|
-
(0, cardPaymentReducer_1.updateCardPayments)(response.data.payment_sources.cards),
|
|
22
|
-
(0, subscriptionPaymentAccountReducer_1.updateSubscriptionPaymentAccounts)(response.data.payment_sources.bank_accounts),
|
|
23
23
|
]);
|
|
24
24
|
}
|
|
25
25
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.67",
|
|
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",
|