@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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.3.2](https://github.com/alma/widgets/compare/v2.3.1...v2.3.2) (2022-05-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **eligibility:** filter plans that have no payment_plan and a reason ([#32](https://github.com/alma/widgets/issues/32)) ([7f8e3ac](https://github.com/alma/widgets/commit/7f8e3ac95f8c38f7a79d2058e2d072f7b5598fe7))
7
+
1
8
  ## [2.3.1](https://github.com/alma/widgets/compare/v2.3.0...v2.3.1) (2022-05-02)
2
9
 
3
10
 
@@ -1738,6 +1738,12 @@ var filterELigibility = function filterELigibility(eligibilities, configPlans) {
1738
1738
  // Remove p1x
1739
1739
  var filteredEligibilityPlans = eligibilities.filter(function (plan) {
1740
1740
  return !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0);
1741
+ }) // Keeps the plans that have a payment_plan property
1742
+ .filter(function (plan) {
1743
+ return plan.payment_plan;
1744
+ }) // Remove plans that have a reasons property
1745
+ .filter(function (plan) {
1746
+ return !plan.reasons;
1741
1747
  }); // If no configPlans was provided, return eligibility response
1742
1748
 
1743
1749
  if (!configPlans) {