@mychoice/mychoice-sdk-store 2.1.46 → 2.1.51
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.
- package/dist/cjs/index.js +13 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +13 -6
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -5574,7 +5574,9 @@ const LifeQuoteDataHandler = () => {
|
|
|
5574
5574
|
const { appConfigState } = useStoreAppConfig();
|
|
5575
5575
|
const navigate = reactRouterDom.useNavigate();
|
|
5576
5576
|
const { checkIsExpired, checkIsExpiredWithModal } = ClearFormDataHandler();
|
|
5577
|
-
const [requestState, setRequestState] = react.useReducer(dataHandlerReducer, {
|
|
5577
|
+
const [requestState, setRequestState] = react.useReducer(dataHandlerReducer, {
|
|
5578
|
+
...initialHandlerRequestState,
|
|
5579
|
+
});
|
|
5578
5580
|
const { status, successMessage, responseData, errorMessage, isFirstRequest, responseError, } = requestState;
|
|
5579
5581
|
const { cancelToken } = useCancelToken();
|
|
5580
5582
|
const openLoader = (loaderDescription = '') => {
|
|
@@ -5612,7 +5614,7 @@ const LifeQuoteDataHandler = () => {
|
|
|
5612
5614
|
first_name: applicant.quoterInfo?.firstName,
|
|
5613
5615
|
last_name: applicant.quoterInfo?.lastName,
|
|
5614
5616
|
phone: Number(applicant.quoterInfo?.phone),
|
|
5615
|
-
recalculate:
|
|
5617
|
+
recalculate: quoteState?.items?.length > 0,
|
|
5616
5618
|
utm_source: applicant.quoterInfo?.utmSource,
|
|
5617
5619
|
utm_campaign: applicant.quoterInfo?.utmCampaign,
|
|
5618
5620
|
},
|
|
@@ -5645,6 +5647,7 @@ const LifeQuoteDataHandler = () => {
|
|
|
5645
5647
|
else {
|
|
5646
5648
|
openLoader('Please wait while we fetch your lowest rates from our insurance partners.');
|
|
5647
5649
|
}
|
|
5650
|
+
console.log('isRecalc', isRecalc, quoteState);
|
|
5648
5651
|
const requestBody = constructRequestBody(); // isRecalc is removed in life insurance
|
|
5649
5652
|
if (requestBody) {
|
|
5650
5653
|
try {
|
|
@@ -5672,7 +5675,9 @@ const LifeQuoteDataHandler = () => {
|
|
|
5672
5675
|
setRequestState({
|
|
5673
5676
|
type: DataHandlerActionTypes.SetSuccess,
|
|
5674
5677
|
});
|
|
5675
|
-
dispatchAppLoaderState({
|
|
5678
|
+
dispatchAppLoaderState({
|
|
5679
|
+
type: exports.StoreConfigAppLoaderActionTypes.AppLoaderClose,
|
|
5680
|
+
});
|
|
5676
5681
|
if (!isRecalc) {
|
|
5677
5682
|
navigate(`/${appConfigState.localIndex}/life/quotes`);
|
|
5678
5683
|
}
|
|
@@ -5682,12 +5687,14 @@ const LifeQuoteDataHandler = () => {
|
|
|
5682
5687
|
type: DataHandlerActionTypes.SetError,
|
|
5683
5688
|
payload: 'Axios request error',
|
|
5684
5689
|
});
|
|
5685
|
-
dispatchAppLoaderState({
|
|
5690
|
+
dispatchAppLoaderState({
|
|
5691
|
+
type: exports.StoreConfigAppLoaderActionTypes.AppLoaderClose,
|
|
5692
|
+
});
|
|
5686
5693
|
}
|
|
5687
5694
|
}
|
|
5688
5695
|
}
|
|
5689
5696
|
};
|
|
5690
|
-
return
|
|
5697
|
+
return {
|
|
5691
5698
|
status,
|
|
5692
5699
|
successMessage,
|
|
5693
5700
|
responseData,
|
|
@@ -5696,7 +5703,7 @@ const LifeQuoteDataHandler = () => {
|
|
|
5696
5703
|
responseError,
|
|
5697
5704
|
postRequestQuote,
|
|
5698
5705
|
postRequestQuoteOnliaUrl: () => { },
|
|
5699
|
-
}
|
|
5706
|
+
};
|
|
5700
5707
|
};
|
|
5701
5708
|
|
|
5702
5709
|
const useValidationVehicle = () => {
|