@alma/widgets 2.3.1 → 2.3.2

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.
@@ -1703,7 +1703,9 @@ async function fetchFromApi(url = '', data, headers) {
1703
1703
 
1704
1704
  const filterELigibility = (eligibilities, configPlans) => {
1705
1705
  // Remove p1x
1706
- const filteredEligibilityPlans = eligibilities.filter(plan => !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0)); // If no configPlans was provided, return eligibility response
1706
+ const filteredEligibilityPlans = eligibilities.filter(plan => !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0)) // Keeps the plans that have a payment_plan property
1707
+ .filter(plan => plan.payment_plan) // Remove plans that have a reasons property
1708
+ .filter(plan => !plan.reasons); // If no configPlans was provided, return eligibility response
1707
1709
 
1708
1710
  if (!configPlans) {
1709
1711
  return filteredEligibilityPlans;