@zeniai/client-epic-state 4.10.42 → 4.10.44

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, updateRecommendedVendorId } from '../../../spendManagement/billPay/editBillView/editBillViewReducer';
7
+ import { convertAmountToHomeCurrency, saveBillUpdatesToLocalStore, updateAddBillAutoFields, updateRecommendedVendorId } 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 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> | ReturnType<typeof updateRecommendedVendorId>;
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> | ReturnType<typeof updateRecommendedVendorId> | ReturnType<typeof updateAddBillAutoFields>;
14
14
  export declare const saveVendorEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
@@ -122,16 +122,19 @@ const saveVendorEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operator
122
122
  vendorId !== updatedVendor.id) {
123
123
  showVendorGptRecommendationText = false;
124
124
  }
125
- //updated vendor name is not same as tentativeVendorName in case of setup vendor
126
- else if (Boolean(tentativeVendorName) === true &&
127
- tentativeVendorName === (updatedVendor === null || updatedVendor === void 0 ? void 0 : updatedVendor.name)) {
128
- showVendorGptRecommendationText = true;
129
- actions.push((0, editBillViewReducer_1.updateRecommendedVendorId)(updatedVendor === null || updatedVendor === void 0 ? void 0 : updatedVendor.id));
130
- }
131
125
  else {
132
126
  showVendorGptRecommendationText =
133
127
  originalShowVendorGptRecommendationText;
134
128
  }
129
+ //updated vendor name is not same as tentativeVendorName in case of setup vendor
130
+ if (Boolean(tentativeVendorName) === true &&
131
+ tentativeVendorName === (updatedVendor === null || updatedVendor === void 0 ? void 0 : updatedVendor.name)) {
132
+ showVendorGptRecommendationText = true;
133
+ actions.push((0, editBillViewReducer_1.updateAddBillAutoFields)(Object.assign(Object.assign({}, billInLocalStore.addBillAutoFields), { tentativeVendorName: '' })));
134
+ if (recommendedVendorId == null) {
135
+ actions.push((0, editBillViewReducer_1.updateRecommendedVendorId)(updatedVendor === null || updatedVendor === void 0 ? void 0 : updatedVendor.id));
136
+ }
137
+ }
135
138
  actions.push((0, editBillViewReducer_1.saveBillUpdatesToLocalStore)({
136
139
  billDetailLocalData: {
137
140
  showVendorGptRecommendationText,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.10.42",
3
+ "version": "4.10.44",
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",