@zeniai/client-epic-state 4.19.24-betaRR5 → 4.19.24-betaRR6
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.
|
@@ -14,11 +14,15 @@ const fetchChargeCardPaymentHistoryEpic = (actions$, _state$, zeniAPI) => action
|
|
|
14
14
|
.getJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cards/repayments?query=${queryString}`)
|
|
15
15
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
16
16
|
if ((0, responsePayload_1.isSuccessStatus)(response) && response.data != null) {
|
|
17
|
-
return (0, rxjs_1.of)(
|
|
17
|
+
return (0, rxjs_1.of)(
|
|
18
|
+
// Store repayments FIRST before marking as completed
|
|
19
|
+
(0, chargeCardRepaymentReducer_1.updateChargeCardRepayments)(response.data.repayment_history), (0, userReducer_1.updateAllUsers)({
|
|
18
20
|
users: response.data.repayment_history
|
|
19
21
|
.map((repayment) => repayment.paid_by_user)
|
|
20
22
|
.filter((user) => user != null),
|
|
21
|
-
}),
|
|
23
|
+
}),
|
|
24
|
+
// Mark as completed LAST, after all data is stored
|
|
25
|
+
(0, chargeCardPaymentHistoryReducer_1.updateChargeCardPaymentHistory)(response.data));
|
|
22
26
|
}
|
|
23
27
|
else {
|
|
24
28
|
return (0, rxjs_1.of)((0, chargeCardPaymentHistoryReducer_1.updateChargeCardPaymentHistoryFailure)(response.status));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.24-
|
|
3
|
+
"version": "4.19.24-betaRR6",
|
|
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",
|