@zeniai/client-epic-state 4.9.82 → 4.9.83
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.
|
@@ -4,11 +4,11 @@ import { RootState } from '../../../../reducer';
|
|
|
4
4
|
import { fetchUserDetails, resetVendorDetailLocalData, saveVendor, saveVendorSuccessOrFailure, updateVendorDetailLocalData } from '../vendorViewReducer';
|
|
5
5
|
import { updateVendors } from '../../../../entity/vendor/vendorReducer';
|
|
6
6
|
import { updateAddresses } from '../../../../entity/address/addressReducer';
|
|
7
|
-
import { convertAmountToHomeCurrency, saveBillUpdatesToLocalStore
|
|
7
|
+
import { convertAmountToHomeCurrency, saveBillUpdatesToLocalStore } from '../../../spendManagement/billPay/editBillView/editBillViewReducer';
|
|
8
8
|
import { fetchPreviousBills } from '../../../spendManagement/billPay/previousBills/previousBillsReducer';
|
|
9
9
|
import { updateContacts } from '../../../../entity/billPay/contact/contactReducer';
|
|
10
10
|
import { updateBankAccounts } from '../../../../entity/bankAccount/bankAccountReducer';
|
|
11
11
|
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
12
12
|
import { updatePaymentInstruments } from '../../../../entity/paymentInstrument/paymentInstrumentReducer';
|
|
13
|
-
export declare type ActionType = ReturnType<typeof saveVendor> | ReturnType<typeof updateVendors> | ReturnType<typeof updateContacts> | ReturnType<typeof updateBankAccounts> | ReturnType<typeof
|
|
13
|
+
export declare type ActionType = ReturnType<typeof saveVendor> | ReturnType<typeof updateVendors> | ReturnType<typeof updateContacts> | ReturnType<typeof updateBankAccounts> | ReturnType<typeof saveBillUpdatesToLocalStore> | ReturnType<typeof fetchPreviousBills> | ReturnType<typeof openSnackbar> | ReturnType<typeof saveVendorSuccessOrFailure> | ReturnType<typeof resetVendorDetailLocalData> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateVendorDetailLocalData> | ReturnType<typeof fetchUserDetails> | ReturnType<typeof updatePaymentInstruments> | ReturnType<typeof convertAmountToHomeCurrency>;
|
|
14
14
|
export declare const saveVendorEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
|
|
@@ -148,7 +148,7 @@ const saveVendorEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
148
148
|
isRecurring: false,
|
|
149
149
|
},
|
|
150
150
|
billId: action.payload.billId,
|
|
151
|
-
})
|
|
151
|
+
}));
|
|
152
152
|
if ((updatedVendor === null || updatedVendor === void 0 ? void 0 : updatedVendor.qboId) != null) {
|
|
153
153
|
actions.push((0, previousBillsReducer_1.fetchPreviousBills)(updatedVendor.qboId, false));
|
|
154
154
|
}
|
package/lib/view/spendManagement/billPay/editBillView/epics/fetchVendorAndUpdateBillLocalDataEpic.js
CHANGED
|
@@ -72,11 +72,14 @@ const waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic = (actions$, state$) =
|
|
|
72
72
|
state.editBillDetailViewState.editBillStateById[billDetailKey];
|
|
73
73
|
}
|
|
74
74
|
if (vendor != null) {
|
|
75
|
-
(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
if (vendor.vendorCurrencyCode != null &&
|
|
76
|
+
!(0, currencyHelper_1.isUsdCurrency)(vendor.vendorCurrencyCode)) {
|
|
77
|
+
fetchActions.push((0, editBillViewReducer_1.convertAmountToHomeCurrency)(true, {
|
|
78
|
+
amount: (_b = (_a = billInLocalStore.billDetailLocalData.totalAmount) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0,
|
|
79
|
+
currencyCode: (_c = vendor.vendorCurrencyCode) !== null && _c !== void 0 ? _c : 'USD',
|
|
80
|
+
currencySymbol: (_d = vendor.vendorCurrencySymbol) !== null && _d !== void 0 ? _d : '$',
|
|
81
|
+
}, 'USD', action.payload.billId));
|
|
82
|
+
}
|
|
80
83
|
fetchActions.push((0, editBillViewReducer_1.saveBillUpdatesToLocalStore)({
|
|
81
84
|
billDetailLocalData: prepareBillLocalData(state, billInLocalStore, vendor),
|
|
82
85
|
billId: action.payload.billId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.83",
|
|
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",
|