@mychoice/mychoice-sdk-modules 2.2.2 → 2.2.4
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 +17 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/shared/sections/quotes/interfaces.d.ts +1 -0
- package/dist/esm/index.js +17 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/shared/sections/quotes/interfaces.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -7,6 +7,7 @@ export type OfferSectionProps = {
|
|
|
7
7
|
brokerCompany?: OfferDetailTitleProps & OfferDetailInfoProps;
|
|
8
8
|
offerPrice?: PriceInterface;
|
|
9
9
|
isBestOffer?: boolean;
|
|
10
|
+
isFirstOffer?: boolean;
|
|
10
11
|
operationHours?: OperationHoursInfoProps;
|
|
11
12
|
redirectUrl?: string;
|
|
12
13
|
fulfillmentUrl?: string;
|
package/dist/esm/index.js
CHANGED
|
@@ -377,11 +377,12 @@ const VehicleOfferCoverages = ({ coverages, nonStandardCoverages, }) => {
|
|
|
377
377
|
return (jsxs(Fragment, { children: [jsx("div", { className: "offer-coverages-container", children: jsxs("table", { className: "offer-coverages-table", children: [jsxs("tr", { className: "table-header", children: [jsx("td", { children: vehicle_names.join(', ') }), jsx("td", { children: "Selection" }), jsx("td", { children: "Premium" })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) }), jsxs("tr", { children: [jsxs("td", { children: ["Third Party Liability Coverage", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: "Third-party liability coverage is mandatory in Ontario and protects you if you're found at fault for injuring or killing someone or damaging their property while driving. This includes people in other vehicles, pedestrians, cyclists, and even passengers in your own car, as well as property like fences, buildings, street signs, and light poles. If you’re sued, this coverage helps pay for legal defence, settlements, and any court-ordered payments. The minimum required coverage is $200,000, but that amount often isn’t enough—most drivers choose at least $2 million to avoid having to pay out-of-pocket if costs exceed the limit. This is a mandatory coverage in Ontario. Talk to your broker to ensure you have the right amount of protection." }) })] }), jsx("td", { children: jsx(SelectFormBox, { options: liabilityOptions, name: "liability-limit", onChange: handleLiabilityChange, defaultValue: getSelectedOption(liabilityOptions, liability.coverage ? liability.limit : 1000000), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: SizeTypes.Small, className: "coverages-select-input" }) }), jsx("td", { children: getTPBIandTPPD() })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) }), jsxs("tr", { children: [jsxs("td", { children: ["Direct Compensation - Property Damange Coverage", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: "Third - Party Liability Direct Compensation responds when you are determined to be not at-fault in an accident with another vehicle, and covers the cost of damage to your vehicle (or actual cash value payout), it's equipment, contents, loss of use, and other associated incidentals such as towing fees and lot fees. This is considered an optional coverage, and it is highly recommended that you do not remove it. If your vehicle is financed or leased, the lienholder/lessor must agree to allow you to remove it. Should you remove it, you must also remove collision or all perils coverage. You will be entirely out-of-pocket in a not-at-fault accident and are legally restricted from claiming reimbursement (suing) the other vehicle owner or their insurer. Chat to your broker for more details about this coverage." }) })] }), jsx("td", { children: "$0 Deductible" }), jsx("td", { children: getCoveragePremium('TPDC') })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) }), jsxs("tr", { children: [jsxs("td", { children: ["Accident Benefits Coverage", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: 'Accident Benefits is a mandatory coverage that responds when there is injury or death in an accident, regardless of fault, and for all affected individuals. It provides a core series of benefits with the capacity to increase coverage values, along with a menu of optional additional benefits that can be added on. The core and optional coverages must be thoroughly reviewed and evaluated, and decisions made based on your own personal circumstances and needs. Chat to your broker for more details about this coverage.' }) })] }), jsx("td", { children: "Included" }), jsx("td", { children: getCoveragePremium('AB') })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) }), jsxs("tr", { children: [jsxs("td", { children: ["Uninsured Automobile Coverage", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: 'Uninsured Motorist Coverage is a mandatory coverage which responds when you are not at-fault in an accident with an uninsured or unidentified (hit-and-run) vehicle, and have incurred bodily injuries, death, or damage to your property, and the offending vehicle owner cannot be found, of if identified, cannot adequately compensate you. Coverage is capped to match the province minimum liability limit of $200,000. Due to the low coverage value, it is highly recommended to ensure inclusion of the OPCF44 Family Protection Coverage endorsement for additional protection. Chat to your broker for more details about this coverage.' }) })] }), jsx("td", { children: "Included" }), jsx("td", { children: getCoveragePremium('UA') })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) }), jsxs("tr", { children: [jsxs("td", { children: ["Comprehensive Coverage", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: 'Comprehensive coverage responds to types of damages ( repair or actual cash value payout) incurred by your vehicle when it is not actively being driven. Examples would be fire, theft, vandalism, glass breakage, and weather-related losses. While considered an optional coverage, it is highly recommended. Should your vehicle be financed or leased, the lienholder/lessor will not allow you to leave this coverage out and will impose a satisfactory deductible to meet their requirements.' }) })] }), jsx("td", { children: jsx(SelectFormBox, { options: coverageOptions, name: "comprehensive-coverage", onChange: handleComprehensiveChange, defaultValue: getSelectedOption(coverageOptions, comprehensive.coverage ? comprehensive.deductible : 0), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: SizeTypes.Small, className: "coverages-select-input" }) }), jsx("td", { children: getCoveragePremium('CMP') })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) }), jsxs("tr", { children: [jsxs("td", { children: ["Collision Coverage", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: 'Collision coverage responds to your vehicle damages (repair or actual cash value payout) in the event you collide with another vehicle or object in the course of its use or operation, and is determined to be at-fault. While considered an optional coverage, it is highly recommended. Should your vehicle be financed or leased, the lienholder/lessor will not allow you to leave this coverage out and will impose a satisfactory deductible to meet their requirements. Chat to your broker for more details about this coverage.' }) })] }), jsx("td", { children: jsx(SelectFormBox, { options: coverageOptions, name: "collision-coverage", onChange: handleCollisionChange, defaultValue: getSelectedOption(coverageOptions, collision.coverage ? collision.deductible : 0), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: SizeTypes.Small, className: "coverages-select-input" }) }), jsx("td", { children: getCoveragePremium('COL') })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) }), doesCoverageExist('5') && (jsxs(Fragment, { children: [jsxs("tr", { children: [jsx("td", { children: "Permission to Rent or Lease (OPCF 5)" }), jsx("td", { children: "Included" }), jsx("td", { children: getCoveragePremium('5') })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) })] })), isNonStandardCoverageActive(20) && (jsx(Fragment, { children: jsxs("tr", { children: [jsxs("td", { children: ["Loss of Use (OPCF 20)", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: 'The OPCF20 Loss of Use / Transportation Replacement endorsement responds when you are determined to be at-fault for an accident, or have a comprehensive claim, and need replacement transportation while your vehicle is out-of-service being repaired, or until it is deemed to be a total loss and a settlement offer is made by your insurer. Most often used to pay for a temporary replacement vehicle rental, it can also be used to compensate for other acceptable forms of travel. Depending on the insurer, the coverage limits available may be a dollar amount or a time amount, and you must have collision and comprehensive, or all perils coverage to include this endorsement. While it is optional, it is highly recommended, and careful consideration must be given to the coverage amounts chosen, as repair delays can quickly exhaust your policy limits, leaving you out-of-pocket for transportation expenses. Chat to your broker for more details about this coverage.' }) })] }), jsx("td", { style: { paddingBottom: '7px' }, children: jsx(SelectFormBox, { options: lossOfUseOptions, name: "loss-of-use", onChange: handleLossOfUseChange, defaultValue: getSelectedOption(lossOfUseOptions, lossofuse.coverage ? lossofuse.limit : 0), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: SizeTypes.Small, className: "coverages-select-input" }) }), jsx("td", { rowSpan: doesCoverageExist('PAK6') ? 2 : 1, children: doesCoverageExist('PAK6') ? getCoveragePremium('PAK6') : getCoveragePremium('20') })] }) })), isNonStandardCoverageActive(27) && (jsxs(Fragment, { children: [jsxs("tr", { children: [jsxs("td", { children: ["Liability for Damage for Non-Owned Cars (OPCF 27)", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: 'The OPCF27 Liability for Damage to Non-Owned Automobile(s) endorsement responds when you rent or borrow a vehicle, and want to extend your coverages to that vehicle. Often used for special occasion rentals or vacation vehicle rentals. Full liability and physical damage coverages must be on your insured vehicle for this endorsement to apply, and a deductible is applicable. Careful consideration must be given in choosing a coverage amount that adequately covers the value of the vehicle you are expecting to rent or borrow. While considered optional, it is highly recommended, and often "packaged" with the OPCF20 Loss of Use / Transportation Replacement coverage by many insurers. Chat to your broker for more details about this coverage.' }) })] }), jsx("td", { children: jsx(SelectFormBox, { options: liabilityForDamageOptions, name: "liaiblity-for-damage", onChange: handleLiaiblityForDamageChange, defaultValue: getSelectedOption(liabilityForDamageOptions, liabilityfordamage.coverage ? liabilityfordamage.limit : 0), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: SizeTypes.Small, className: "coverages-select-input" }) }), !doesCoverageExist('PAK6') && jsx("td", { children: getCoveragePremium('27') })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) })] })), isNonStandardCoverageActive('aCCW') && (jsxs(Fragment, { children: [jsxs("tr", { children: [jsxs("td", { children: ["Accident Waiver or Forgiveness (OPCF 39)", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: "The OPCF39 Accident Waiver/Forgiveness endorsement responds by protecting your existing driving record from being negatively impacted by a single, partial at-fault or fully at-fault accident, and must be on the policy before the accident. The benefit of the coverage continues as long as you stay with the same insurer, as it's not transferable should you move to another insurance company. Subsequent at-fault or partial at-fault accidents will not have the protection and will be adversely rated accordingly. Eligibility, terms, conditions, and formulations used can vary significantly between insurers, so careful review and consideration are essential. While purchasing this endorsement is optional, it is highly recommended as the alternative of being accident-rated for several years will be significantly higher in premiums than the cost of the endorsement. Chat to your broker for more details about this coverage." }) })] }), jsx("td", { children: "Included" }), jsx("td", { children: getCoveragePremium('ACCW') })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) })] })), isNonStandardCoverageActive(43) && (jsxs(Fragment, { children: [jsxs("tr", { children: [jsxs("td", { children: ["Limited waiver of depreciation (OPCF ", isLeased ? '43A' : '43', ")", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: 'The OPCF43/43A Removing Depreciation Deduction / Limited Waiver of Depreciation endorsement responds by protecting your original purchase/lease price of a "new" vehicle (as evidenced by a bill of sale or lease agreement) from depreciation should the vehicle be a total loss from an insured peril. Only new vehicles, and in some cases "demo\'s" with limited mileage are eligible, and the endorsement must be added immediately upon the vehicle delivery. Coverage durations available vary between insurers, generally ranging from 24 months to 60 months from the possession date of the vehicle. While an optional coverage, it is highly recommended as, without it, a total loss settlement based on actual cash value could leave you contractually owing money to a lienholder or lessor. Chat to your broker for more details about this coverage.' }) })] }), jsx("td", { children: jsx(SelectFormBox, { options: limitedWaiverOfDepreciationOptions, name: "liaiblity-for-damage", onChange: handleLimitedWaiverOfDepreciationChange, defaultValue: getSelectedOption(limitedWaiverOfDepreciationOptions, limitedwaiverofdepreciation.coverage ? limitedwaiverofdepreciation.limit : 0), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: SizeTypes.Small, className: "coverages-select-input" }) }), jsx("td", { children: getCoveragePremium('43') })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) })] })), jsxs("tr", { children: [jsxs("td", { children: ["Family Protection (OPCF 44)", jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsx(TooltipForm, { id: "my-tooltip", description: 'The OPCF44 Family Protection Endorsement responds when you are determined to be not at-fault in a vehicle accident, and your claim / civil suit against the offending vehicle owner is not adequately satisfied as they are unidentified, uninsured, or underinsured. This endorsement bridges their coverages (if any) up to the full limits of the OPCF44 coverage on your policy. While considered an optional coverage, it is highly recommended as a form of self protection, and is extremely low in cost. Chat to your broker for more details about this coverage.' }) })] }), jsx("td", { children: "Included" }), jsx("td", { children: getCoveragePremium('44') })] }), jsx("tr", { children: jsx("td", { colSpan: 3, children: jsx("div", { className: "divider" }) }) }), jsxs("tr", { className: "premium-total", children: [jsx("td", { children: "Annual Premium" }), jsx("td", {}), jsx("td", { children: getSumOfPremiums() })] })] }) }), jsx("div", { style: { display: 'flex', flexDirection: 'column' }, children: jsx(BlockSubmit$2, { className: "mychoice recalculate", label: "Recalculate Quote", buttonSize: SizeTypes.Medium, isRecalc: true }) })] }));
|
|
378
378
|
};
|
|
379
379
|
|
|
380
|
-
const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, isBestOffer, operationHours = {}, redirectUrl, fulfillmentUrl, coverages, nonStandardCoverages, brokerIntegration, }) => {
|
|
380
|
+
const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, isBestOffer, isFirstOffer = true, operationHours = {}, redirectUrl, fulfillmentUrl, coverages, nonStandardCoverages, brokerIntegration, }) => {
|
|
381
381
|
const { appConfigState: { appType }, } = useStoreAppConfig();
|
|
382
382
|
const { postRequestQuoteOnliaUrl } = CarQuoteDataHandler();
|
|
383
383
|
const isTheBig = appType === AppTypes.TheBig;
|
|
384
384
|
const isMyChoice = isMyChoiceLike(appType);
|
|
385
|
+
const isBeginInsurance = appType === AppTypes.BeginInsurance;
|
|
385
386
|
const mychoiceCls = isMyChoiceLike(appType) ? 'mychoice' : '';
|
|
386
387
|
const { weekdayHours, saturdayHours, sundayHours } = operationHours;
|
|
387
388
|
const [detailsIsOpen, setDetailsIsOpenIsOpen] = useState(isBestOffer ?? false);
|
|
@@ -389,6 +390,8 @@ const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, is
|
|
|
389
390
|
setDetailsIsOpenIsOpen(!detailsIsOpen);
|
|
390
391
|
};
|
|
391
392
|
const offsiteUrl = redirectUrl || fulfillmentUrl;
|
|
393
|
+
// Only apply first offer restrictions for BeginInsurance
|
|
394
|
+
const shouldShowBrokerInfo = isBeginInsurance ? isFirstOffer : true;
|
|
392
395
|
const handleCTAClick = () => {
|
|
393
396
|
if (fulfillmentUrl) {
|
|
394
397
|
window.open(fulfillmentUrl, '_blank');
|
|
@@ -397,13 +400,13 @@ const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, is
|
|
|
397
400
|
postRequestQuoteOnliaUrl(true, redirectUrl);
|
|
398
401
|
};
|
|
399
402
|
const isHubIntegration = brokerIntegration?.type === 'hub';
|
|
400
|
-
return (jsxs("div", { className: `offer-section ${mychoiceCls}`, children: [isMyChoice && (isTheBig || !offsiteUrl) && (jsxs(Fragment, { children: [jsx(OfferDetail, { className: isTheBig ? 'thebig-bold' : '', logo: brokerCompany?.logo, name: brokerCompany?.title, companyType: CompanyRoleTypes.Broker, description: brokerCompany?.description, isBestOffer: isBestOffer, isMyChoice: isMyChoice }), jsx("hr", { style: {
|
|
403
|
+
return (jsxs("div", { className: `offer-section ${mychoiceCls}`, children: [shouldShowBrokerInfo && isMyChoice && (isTheBig || !offsiteUrl) && (jsxs(Fragment, { children: [jsx(OfferDetail, { className: isTheBig ? 'thebig-bold' : '', logo: brokerCompany?.logo, name: brokerCompany?.title, companyType: CompanyRoleTypes.Broker, description: brokerCompany?.description, isBestOffer: isBestOffer, isMyChoice: isMyChoice }), jsx("hr", { style: {
|
|
401
404
|
margin: '0',
|
|
402
405
|
padding: '0',
|
|
403
406
|
width: '100%',
|
|
404
407
|
height: '1px',
|
|
405
408
|
backgroundColor: '$color-background-header-primary',
|
|
406
|
-
} })] })), isMyChoice && (jsxs(Fragment, { children: [jsx(OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: "Hours of Operation", isMyChoice: isMyChoice, isBestOffer: Boolean(isBestOffer && offsiteUrl), children: jsx(OperationHoursInfo, { weekdayHours: weekdayHours, saturdayHours: saturdayHours, sundayHours: sundayHours }) }), jsx("hr", { style: {
|
|
409
|
+
} })] })), shouldShowBrokerInfo && isMyChoice && (jsxs(Fragment, { children: [jsx(OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: "Hours of Operation", isMyChoice: isMyChoice, isBestOffer: Boolean(isBestOffer && offsiteUrl), children: jsx(OperationHoursInfo, { weekdayHours: weekdayHours, saturdayHours: saturdayHours, sundayHours: sundayHours }) }), jsx("hr", { style: {
|
|
407
410
|
margin: '0',
|
|
408
411
|
padding: '0',
|
|
409
412
|
width: '100%',
|
|
@@ -507,7 +510,7 @@ const HeaderBeginInsurance = ({ className }) => {
|
|
|
507
510
|
const { appConfigState: { insuranceType }, } = useStoreAppConfig();
|
|
508
511
|
const insuranceTypeCls = insuranceType !== InsuranceTypes.Car && insuranceType !== InsuranceTypes.Life ? InsuranceTypes.Home : insuranceType;
|
|
509
512
|
const { externalPathGroup } = usePathGroups(insuranceTypeCls);
|
|
510
|
-
return (jsx("div", { className: `${className} primary-header`, children: jsxs("div", { className: "content", children: [jsx("div", { className: "logo", children: jsx("a", { href: "https://
|
|
513
|
+
return (jsx("div", { className: `${className} primary-header`, children: jsxs("div", { className: "content", children: [jsx("div", { className: "logo", children: jsx("a", { href: "https://begininsurance.ca/en", rel: "noreferrer", children: jsx("img", { src: logo, alt: "Begin Insurance" }) }) }), jsx("div", { className: "nav-links", children: jsx(HeaderNavGroup, { className: insuranceTypeCls, navItems: externalPathGroup, isExternal: true }) }), jsx("div", { className: "empty-box" })] }) }));
|
|
511
514
|
};
|
|
512
515
|
HeaderBeginInsurance.defaultProps = {
|
|
513
516
|
className: '',
|
|
@@ -533,7 +536,7 @@ const HeaderBeginInsuranceMobile = ({ className }) => {
|
|
|
533
536
|
const handleMenuClick = () => {
|
|
534
537
|
setIsMenuOpen(!isMenuOpen);
|
|
535
538
|
};
|
|
536
|
-
return (jsxs("div", { className: `${className} ${isMenuOpen ? 'open' : ''} primary-header-mobile`, children: [jsxs("div", { className: "content-mobile", children: [jsx("div", { className: "logo", children: jsx("a", { href: "https://
|
|
539
|
+
return (jsxs("div", { className: `${className} ${isMenuOpen ? 'open' : ''} primary-header-mobile`, children: [jsxs("div", { className: "content-mobile", children: [jsx("div", { className: "logo", children: jsx("a", { href: "https://begininsurance.ca/en", target: "_blank", rel: "noreferrer", children: jsx("img", { src: logo, alt: "Begin Insurance" }) }) }), jsx(ButtonMenu, { className: `${className} ${isMenuOpen ? 'is-active' : ''}`, onClick: handleMenuClick })] }), isMenuOpen && (jsx("div", { className: "menu-items", children: jsx("div", { className: "nav-links", children: jsx(HeaderNavGroup, { className: insuranceType, navItems: externalPathGroup, isExternal: true }) }) }))] }));
|
|
537
540
|
};
|
|
538
541
|
HeaderBeginInsuranceMobile.defaultProps = {
|
|
539
542
|
className: '',
|
|
@@ -2063,7 +2066,7 @@ const PageCarQuote = () => {
|
|
|
2063
2066
|
sundayHours: items[0]?.brokerProfile.hoursSunday,
|
|
2064
2067
|
weekdayHours: items[0]?.brokerProfile.hoursWorkdays,
|
|
2065
2068
|
}, phoneNumber: formatPhoneObject(items[0]?.brokerProfile.phone), redirectUrl: items[0]?.brokerProfile.redirectUrl || '', coverages: items[0]?.coverages, nonStandardCoverages: items[0]?.nonStandardCoverages, brokerIntegration: items[0]?.brokerIntegration }) })) : (jsx(SplashScreen$2, {})) })) : (jsx(NoQuotesMessage, { type: "car" })) })), (!hasConfirmStep || appDeviceType !== DeviceTypes.Mobile) && (jsxs(Fragment, { children: [jsx(SectionQuoteEdit$2, {}), (isTheBig || !items[0]?.coverages) && jsx(SectionQuoteRecalc$1, {})] }))] }), appDeviceType !== DeviceTypes.Mobile && quoteState.showCallMessage && jsx(SplashScreen$2, {}), !quoteState.showCallMessage && (jsx(Fragment, { children: jsxs("div", { style: { position: 'relative', width: '100%' }, children: [hasConfirmStep && (jsxs(Fragment, { children: [jsx("div", { className: "offer-container", children: jsx(SectionConfirm, {}) }), appDeviceType === DeviceTypes.Mobile && (jsxs(Fragment, { children: [jsx(SectionQuoteEdit$2, {}), (isTheBig || !items[0]?.coverages) && jsx(SectionQuoteRecalc$1, {})] }))] })), jsx("div", { className: `offer-container ${hasConfirmStep ? 'blur' : ''}`, children: !!items?.length ? (quoteItems.map(({ company, brokerProfile, priceMonthly, priceYearly, coverages, nonStandardCoverages, brokerIntegration, }, index) => (jsx("div", { children: (appDeviceType !== DeviceTypes.Mobile ||
|
|
2066
|
-
(appDeviceType === DeviceTypes.Mobile && index !== 0)) && (jsx(OfferSection, { isBestOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
2069
|
+
(appDeviceType === DeviceTypes.Mobile && index !== 0)) && (jsx(OfferSection, { isBestOffer: index === 0, isFirstOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
2067
2070
|
monthly: priceMonthly,
|
|
2068
2071
|
yearly: priceYearly,
|
|
2069
2072
|
}, operationHours: {
|
|
@@ -3113,8 +3116,8 @@ const PageHomeQuote = () => {
|
|
|
3113
3116
|
saturdayHours: items[0]?.brokerProfile.hoursSaturday,
|
|
3114
3117
|
sundayHours: items[0]?.brokerProfile.hoursSunday,
|
|
3115
3118
|
weekdayHours: items[0]?.brokerProfile.hoursWorkdays,
|
|
3116
|
-
}, phoneNumber: formatPhoneObject(items[0]?.brokerProfile.phone), redirectUrl: items[0]?.brokerProfile.redirectUrl || '', fulfillmentUrl: items[0]?.fulfillmentUrl || '', brokerIntegration: items[0]?.brokerIntegration }) })) : (jsx(SplashScreen$1, {})) })) : (jsx(NoQuotesMessage, { type: "home" })) })), jsx(SectionQuoteEdit$1, {}), jsx(SectionQuoteRecalc, {})] }), appDeviceType !== DeviceTypes.Mobile && quoteState.showCallMessage && jsx(SplashScreen$1, {}), !quoteState.showCallMessage && (jsx("div", { className: "offer-container", children: !!items?.length ? (items.map(({ company, brokerProfile, priceMonthly, priceYearly, fulfillmentUrl, brokerIntegration }, index) => (jsx("div", { children: (appDeviceType !== DeviceTypes.Mobile ||
|
|
3117
|
-
(appDeviceType === DeviceTypes.Mobile && index !== 0)) && (jsx(OfferSection, { isBestOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
3119
|
+
}, phoneNumber: formatPhoneObject(items[0]?.brokerProfile.phone), redirectUrl: items[0]?.brokerProfile.redirectUrl || '', fulfillmentUrl: items[0]?.fulfillmentUrl || '', brokerIntegration: items[0]?.brokerIntegration }) })) : (jsx(SplashScreen$1, {})) })) : (jsx(NoQuotesMessage, { type: "home" })) })), jsx(SectionQuoteEdit$1, {}), jsx(SectionQuoteRecalc, {})] }), appDeviceType !== DeviceTypes.Mobile && quoteState.showCallMessage && jsx(SplashScreen$1, {}), !quoteState.showCallMessage && (jsx("div", { className: "offer-container", children: !!items?.length ? (items.map(({ company, brokerProfile, priceMonthly, priceYearly, fulfillmentUrl, brokerIntegration, }, index) => (jsx("div", { children: (appDeviceType !== DeviceTypes.Mobile ||
|
|
3120
|
+
(appDeviceType === DeviceTypes.Mobile && index !== 0)) && (jsx(OfferSection, { isBestOffer: index === 0, isFirstOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
3118
3121
|
monthly: priceMonthly,
|
|
3119
3122
|
yearly: priceYearly,
|
|
3120
3123
|
}, operationHours: {
|
|
@@ -3405,7 +3408,7 @@ const PageLifeQuote = () => {
|
|
|
3405
3408
|
}
|
|
3406
3409
|
// Otherwise, show all quotes as before
|
|
3407
3410
|
return items.map(({ company, brokerProfile, priceMonthly, priceYearly, brokerIntegration }, index) => (jsx("div", { children: (appDeviceType !== DeviceTypes.Mobile ||
|
|
3408
|
-
(appDeviceType === DeviceTypes.Mobile && index !== 0)) && (jsx(OfferSection, { isBestOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
3411
|
+
(appDeviceType === DeviceTypes.Mobile && index !== 0)) && (jsx(OfferSection, { isBestOffer: index === 0, isFirstOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
3409
3412
|
monthly: priceMonthly,
|
|
3410
3413
|
yearly: priceYearly,
|
|
3411
3414
|
}, operationHours: {
|
|
@@ -4518,6 +4521,10 @@ const AppConfig = (props) => {
|
|
|
4518
4521
|
const localIndex = window.location.pathname.split('/')[1];
|
|
4519
4522
|
const authHandler = useHandlerAuth();
|
|
4520
4523
|
const partnerHandler = useHandlerPartner();
|
|
4524
|
+
// Check if localIndex is actually an insurance type (car, home, condo, tenant, life)
|
|
4525
|
+
// In that case, it should not be treated as a partner ID
|
|
4526
|
+
const insuranceTypeValues = Object.values(InsuranceTypes);
|
|
4527
|
+
const isInsuranceTypePath = insuranceTypeValues.includes(localIndex);
|
|
4521
4528
|
const windowResize = () => {
|
|
4522
4529
|
dispatchDeviceState({
|
|
4523
4530
|
type: StoreConfigAppDeviceActionTypes.AppDeviceSetSize,
|
|
@@ -4536,7 +4543,7 @@ const AppConfig = (props) => {
|
|
|
4536
4543
|
payload: appType,
|
|
4537
4544
|
});
|
|
4538
4545
|
}
|
|
4539
|
-
if (appType !== AppTypes.TheBig && localIndex !== defaultLocalIndex && localIndex !== '') {
|
|
4546
|
+
if (appType !== AppTypes.TheBig && localIndex !== defaultLocalIndex && localIndex !== '' && !isInsuranceTypePath) {
|
|
4540
4547
|
partnerHandler.getPartner(localIndex);
|
|
4541
4548
|
}
|
|
4542
4549
|
else {
|