From f39b8b4cb393bb79a8b0ad4b6ba9acc92889ca98 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 23 Nov 2022 12:18:19 +0100 Subject: [PATCH] refs #3971 Issue 067214 fixed --- debian/changelog | 2 +- forms/ecomerce/catalog/index.js | 19 +++++++++++++++---- package.json | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index ab4ee7c6..c5cf8b13 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (22.46.13) stable; urgency=low +hedera-web (22.46.14) stable; urgency=low * Initial Release. diff --git a/forms/ecomerce/catalog/index.js b/forms/ecomerce/catalog/index.js index ca342372..5a4f93b5 100644 --- a/forms/ecomerce/catalog/index.js +++ b/forms/ecomerce/catalog/index.js @@ -43,8 +43,8 @@ const Catalog = new Class({ } ,getFilter(params, tags, currentTag) { - if (params.search == null && params.type == null) - return null; + if (params.search == null && params.realm == null) + return; const $ = this.$; @@ -65,7 +65,7 @@ const Catalog = new Class({ } if (!idSearch) { - if (params.realm != null) + if (params.realm != null && currentTag) filter.push($.realmOp); if (params.type != null) filter.push($.typeOp); @@ -98,7 +98,18 @@ const Catalog = new Class({ 'producer' ]; - const lot = this.getFilter(params, tags); + let hasTagFilter = false; + for (const tag of tags) + if (params[tag] != null) { + hasTagFilter = true; + break; + } + + const refreshItems = hasTagFilter + || params.search != null + || params.type != null; + + const lot = refreshItems && this.getFilter(params, tags); if (lot) { $.items.lot = lot; $.items.refresh(); diff --git a/package.json b/package.json index c42d4366..924ad16e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "22.46.13", + "version": "22.46.14", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": {