@zeniai/client-epic-state 4.12.10 → 4.12.11

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.
@@ -65,7 +65,8 @@ export declare const fetchEditBillDetailPage: import("@reduxjs/toolkit").ActionC
65
65
  amountPayload: AmountPayload;
66
66
  conversionRate: number;
67
67
  billId?: string | undefined;
68
- }, string>, fetchVendorAndUpdateBillLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[vendorId?: string | undefined, billId?: string | undefined], {
68
+ }, string>, fetchVendorAndUpdateBillLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: boolean, vendorId?: string | undefined, billId?: string | undefined], {
69
+ cacheOverride: boolean;
69
70
  vendorId: string | undefined;
70
71
  billId: string | undefined;
71
72
  }, string, never, never>, waitForVendorByIdThenSaveBillUpdatetoLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[vendorId: string, billId?: string | undefined], {
@@ -313,8 +313,8 @@ const editBillView = (0, toolkit_1.createSlice)({
313
313
  reducer() {
314
314
  // do nothing
315
315
  },
316
- prepare(vendorId, billId) {
317
- return { payload: { vendorId, billId } };
316
+ prepare(cacheOverride, vendorId, billId) {
317
+ return { payload: { cacheOverride, vendorId, billId } };
318
318
  },
319
319
  },
320
320
  waitForVendorByIdThenSaveBillUpdatetoLocalStore: {
@@ -18,7 +18,7 @@ const currencyHelper_1 = require("../../../../../commonStateTypes/currencyHelper
18
18
  const fetchVendorAndUpdateBillLocalDataEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editBillViewReducer_1.fetchVendorAndUpdateBillLocalData.match), (0, operators_1.mergeMap)((action) => {
19
19
  var _a, _b, _c, _d;
20
20
  const fetchActions = [];
21
- const { vendorId } = action.payload;
21
+ const { vendorId, cacheOverride } = action.payload;
22
22
  const state = state$.value;
23
23
  let billInLocalStore = state.editBillDetailViewState.newBillState;
24
24
  if (action.payload.billId != null) {
@@ -28,7 +28,7 @@ const fetchVendorAndUpdateBillLocalDataEpic = (actions$, state$) => actions$.pip
28
28
  }
29
29
  if (vendorId != null) {
30
30
  const vendor = (0, vendorSelector_1.getVendorByVendorId)(state.vendorState, vendorId);
31
- if (vendor != null) {
31
+ if (vendor != null && cacheOverride === false) {
32
32
  if (vendor.vendorCurrencyCode != null &&
33
33
  !(0, currencyHelper_1.isUsdCurrency)(vendor.vendorCurrencyCode)) {
34
34
  fetchActions.push((0, editBillViewReducer_1.convertAmountToHomeCurrency)(true, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.12.10",
3
+ "version": "4.12.11",
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",