@mychoice/mychoice-sdk-store 2.1.2 → 2.1.7
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/handlers/dataHandlers/QuoteDataHandler/interfaces.d.ts +1 -1
- package/dist/cjs/index.js +6 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/states/reducers/states/formStates/FormCarState/DiscountState/interfaces.d.ts +1 -0
- package/dist/esm/handlers/dataHandlers/QuoteDataHandler/interfaces.d.ts +1 -1
- package/dist/esm/index.js +6 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/states/reducers/states/formStates/FormCarState/DiscountState/interfaces.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataHandlerRequestState } from '../shared';
|
|
2
2
|
export type UseHandlerQuoteInterface = DataHandlerRequestState & {
|
|
3
3
|
postRequestQuoteOnliaUrl: (isLoader: boolean, redirectUrl: string) => void;
|
|
4
|
-
postRequestQuote: (isRecalc: boolean) => void;
|
|
4
|
+
postRequestQuote: (isRecalc: boolean, hasToBeConfirmed?: boolean) => void;
|
|
5
5
|
postPerformLeadsAction?: () => void;
|
|
6
6
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -4876,7 +4876,7 @@ const CarQuoteDataHandler = () => {
|
|
|
4876
4876
|
// updateViewLoader({ type: viewLoaderActionTypes.UpdateLoader, payload: false });
|
|
4877
4877
|
// updateLocalState({ type: DataManagerActionTypes.RequestState, payload: requestStatusTypes.Error });
|
|
4878
4878
|
// }
|
|
4879
|
-
const constructRequestBody = (isRecalc) => {
|
|
4879
|
+
const constructRequestBody = (isRecalc, hasToBeConfirmed) => {
|
|
4880
4880
|
const vehicles = deepClone(vehicleState).items;
|
|
4881
4881
|
const drivers = deepClone(driverState).items;
|
|
4882
4882
|
const postal = deepClone(postalState).item;
|
|
@@ -4903,6 +4903,9 @@ const CarQuoteDataHandler = () => {
|
|
|
4903
4903
|
requestBody.quoterInfo.recalculate = isRecalc;
|
|
4904
4904
|
delete requestBody.isValid;
|
|
4905
4905
|
delete requestBody.inValidation;
|
|
4906
|
+
if (hasToBeConfirmed !== undefined) {
|
|
4907
|
+
requestBody.quoterInfo.hasToBeConfirmed = hasToBeConfirmed;
|
|
4908
|
+
}
|
|
4906
4909
|
if (requestBody.quoterInfo?.utmSource === '') {
|
|
4907
4910
|
if (partnerState.urlPath !== defaultLocalIndex && partnerState.urlPath !== '') {
|
|
4908
4911
|
requestBody.quoterInfo.utmSource = partnerState.urlPath;
|
|
@@ -5142,7 +5145,7 @@ const CarQuoteDataHandler = () => {
|
|
|
5142
5145
|
}
|
|
5143
5146
|
}
|
|
5144
5147
|
};
|
|
5145
|
-
const postRequestQuote = async (isRecalc = false) => {
|
|
5148
|
+
const postRequestQuote = async (isRecalc = false, hasConfirmStep) => {
|
|
5146
5149
|
const quoteLocalState = JSON.parse(localStorage.getItem('insurance_car_quotes') || '{}');
|
|
5147
5150
|
const { isRequested } = quoteLocalState;
|
|
5148
5151
|
// if (appConfigState.appType === AppTypes.TheBig) {
|
|
@@ -5168,7 +5171,7 @@ const CarQuoteDataHandler = () => {
|
|
|
5168
5171
|
else {
|
|
5169
5172
|
openLoader('Please wait while we fetch your lowest rates from our insurance partners.');
|
|
5170
5173
|
}
|
|
5171
|
-
const requestBody = constructRequestBody(quoteState.isRequested || isRecalc);
|
|
5174
|
+
const requestBody = constructRequestBody(quoteState.isRequested || isRecalc, hasConfirmStep);
|
|
5172
5175
|
if (requestBody) {
|
|
5173
5176
|
try {
|
|
5174
5177
|
const response = await httpRequest({
|