@mychoice/mychoice-sdk-store 2.1.85 → 2.2.0

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/esm/index.js CHANGED
@@ -5436,7 +5436,7 @@ const HomeQuoteDataHandler = () => {
5436
5436
  const navigate = useNavigate();
5437
5437
  const { checkIsExpired, checkIsExpiredWithModal } = ClearFormDataHandler();
5438
5438
  const [requestState, setRequestState] = useReducer(dataHandlerReducer, { ...initialHandlerRequestState });
5439
- const { status, successMessage, responseData, errorMessage, isFirstRequest, responseError, } = requestState;
5439
+ const { status, successMessage, responseData, errorMessage, isFirstRequest, responseError } = requestState;
5440
5440
  const { cancelToken } = useCancelToken();
5441
5441
  const openLoader = (loaderDescription = '') => {
5442
5442
  dispatchAppLoaderState({
@@ -5452,8 +5452,8 @@ const HomeQuoteDataHandler = () => {
5452
5452
  const dwelling = deepClone(dwellingState);
5453
5453
  const discount = deepClone(discountState);
5454
5454
  const { policyStartYear, policyStartMonth, policyStartDay } = discountState;
5455
- const { builtYear, roofReplacedYear, occupiedYear, } = dwellingState;
5456
- const { insured: { dateInsuredCurrent, dateInsuredSince, birthMonth, birthDay, birthYear, nonsmoker, }, insuranceClaimList, insuranceCancellationList, } = applicant;
5455
+ const { builtYear, roofReplacedYear, occupiedYear } = dwellingState;
5456
+ const { insured: { dateInsuredCurrent, dateInsuredSince, birthMonth, birthDay, birthYear, nonsmoker }, insuranceClaimList, insuranceCancellationList, } = applicant;
5457
5457
  const lists = {
5458
5458
  claims: insuranceClaimList?.map((item) => ({
5459
5459
  date: addDayToDate(`${item.claimYear}-${item.claimMonth}`, 1),
@@ -5486,7 +5486,7 @@ const HomeQuoteDataHandler = () => {
5486
5486
  dwelling.liability = Number(dwelling.liability);
5487
5487
  dwelling.fireHydrantDistance = Number(dwelling.fireHydrantDistance);
5488
5488
  dwelling.fireHallDistance = Number(dwelling.fireHallDistance);
5489
- if ((insuranceType !== InsuranceTypes.Home) && dwelling.pp) {
5489
+ if (insuranceType !== InsuranceTypes.Home && dwelling.pp) {
5490
5490
  dwelling.replacementCost = Number(dwelling.pp);
5491
5491
  }
5492
5492
  const heatingExpectedDate = subYearsFromDate('', 20);
@@ -5528,14 +5528,16 @@ const HomeQuoteDataHandler = () => {
5528
5528
  delete discount.policyStartDay;
5529
5529
  }
5530
5530
  const requestBody = {
5531
- dwellings: [{
5531
+ dwellings: [
5532
+ {
5532
5533
  ...dwelling,
5533
5534
  postalCode: postal.postalCode,
5534
5535
  locationIndex: postal.locationIndex,
5535
5536
  city: postal.city,
5536
5537
  streetAddress: postal.streetAddress,
5537
5538
  ...lists,
5538
- }],
5539
+ },
5540
+ ],
5539
5541
  ...discount,
5540
5542
  insured: {
5541
5543
  dateOfBirth: `${birthYear}-${birthMonth}-${birthDay}`,
@@ -5671,7 +5673,7 @@ const HomeQuoteDataHandler = () => {
5671
5673
  }
5672
5674
  }
5673
5675
  };
5674
- return ({
5676
+ return {
5675
5677
  status,
5676
5678
  successMessage,
5677
5679
  responseData,
@@ -5680,7 +5682,7 @@ const HomeQuoteDataHandler = () => {
5680
5682
  responseError,
5681
5683
  postRequestQuoteOnliaUrl,
5682
5684
  postRequestQuote,
5683
- });
5685
+ };
5684
5686
  };
5685
5687
 
5686
5688
  const LifeQuoteDataHandler = () => {