@mychoice/mychoice-sdk-modules 2.1.45 → 2.1.47

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
@@ -2951,13 +2951,17 @@ const SectionCoverage = () => {
2951
2951
  });
2952
2952
  };
2953
2953
  const newLifeOptions = useMemo(() => {
2954
- // Use different options for Ontario
2955
- if (province === '9') {
2956
- return lifeInsuranceOntarioTypeOptions;
2954
+ // Use different set for Ontario
2955
+ if (isMychoice && province === '9') {
2956
+ return {
2957
+ groupOptions: lifeInsuranceOntarioTypeOptions,
2958
+ };
2957
2959
  }
2958
- return lifeInsuranceTypeOptions.filter((option) => option.name.includes('Year Level'));
2960
+ return {
2961
+ options: lifeInsuranceTypeOptions.filter((option) => option.name.includes('Year Level')),
2962
+ };
2959
2963
  }, [isMychoice, province]);
2960
- return (jsxs("div", { className: "form-section", children: [jsx("h2", { className: "section-title", style: { textAlign: 'center' }, children: "Get the coverage you need" }), jsx(SelectFormBox, { options: isMychoice ? lifeProvinceOptionsMC : lifeProvinceOptions, name: "province", onChange: handleProvinceChange, defaultValue: province, title: "Province", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !province && inValidation, errorMessage: getErrorMessage(type, inValidation) }), jsx(SelectFormBox, { options: newLifeOptions, name: "type", onChange: handleLifeInsuranceTypeChange, defaultValue: type, title: "Type of Insurance", description: jsx(Description, {}), placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !type && inValidation, errorMessage: getErrorMessage(type, inValidation) }), jsx(SelectFormBox, { options: lifeCoverageOptions, name: "coverage", onChange: handleCoverageChange, defaultValue: coverage, title: "Required coverage", description: "The extent of coverage you need is determined by several factors,\n including your expenditure patterns, anticipated future expenses, yearly earnings,\n and so forth. Generally, individuals opt for a coverage amount that equals five\n times their current annual income before taxes. On an average,\n it is observed that Canadians choose a coverage amount of around $500,000.", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !coverage && inValidation, errorMessage: getErrorMessage(coverage, inValidation) })] }));
2964
+ return (jsxs("div", { className: "form-section", children: [jsx("h2", { className: "section-title", style: { textAlign: 'center' }, children: "Get the coverage you need" }), jsx(SelectFormBox, { options: isMychoice ? lifeProvinceOptionsMC : lifeProvinceOptions, name: "province", onChange: handleProvinceChange, defaultValue: province, title: "Province", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !province && inValidation, errorMessage: getErrorMessage(type, inValidation) }), jsx(SelectFormBox, { ...newLifeOptions, name: "type", onChange: handleLifeInsuranceTypeChange, defaultValue: type, title: "Type of Insurance", description: jsx(Description, {}), placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !type && inValidation, errorMessage: getErrorMessage(type, inValidation) }), jsx(SelectFormBox, { options: lifeCoverageOptions, name: "coverage", onChange: handleCoverageChange, defaultValue: coverage, title: "Required coverage", description: "The extent of coverage you need is determined by several factors, including your expenditure patterns, anticipated future expenses, yearly earnings, and so forth. Generally, individuals opt for a coverage amount that equals five times their current annual income before taxes. On an average, it is observed that Canadians choose a coverage amount of around $500,000.", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !coverage && inValidation, errorMessage: getErrorMessage(coverage, inValidation) })] }));
2961
2965
  };
2962
2966
 
2963
2967
  const PageCoverage = () => {