From c0ff6bea57f60e3a7102070bba8a407286871f54 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 7 Mar 2023 07:47:30 +0100 Subject: [PATCH 1/4] fix(smartTable): fixed filtering with an intermediate check Refs: #5177 --- front/core/components/check/index.js | 2 +- front/core/components/smart-table/index.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/front/core/components/check/index.js b/front/core/components/check/index.js index 78b1807a5..25ec506ad 100644 --- a/front/core/components/check/index.js +++ b/front/core/components/check/index.js @@ -40,7 +40,7 @@ export default class Check extends Toggle { set tripleState(value) { this._tripleState = value; - this.field = this.field; + this.field = value; } get tripleState() { diff --git a/front/core/components/smart-table/index.js b/front/core/components/smart-table/index.js index ad9883950..b2380a62f 100644 --- a/front/core/components/smart-table/index.js +++ b/front/core/components/smart-table/index.js @@ -436,6 +436,7 @@ export default class SmartTable extends Component { if (filters && filters.userFilter) this.model.userFilter = filters.userFilter; + this.addFilter(field, this.$inputsScope.searchProps[field]); } @@ -451,7 +452,7 @@ export default class SmartTable extends Component { } addFilter(field, value) { - if (value == '') value = null; + if (value === '') value = null; let stateFilter = {tableQ: {}}; if (this.$params.q) { @@ -462,7 +463,7 @@ export default class SmartTable extends Component { } const whereParams = {[field]: value}; - if (value) { + if (value !== '' && value !== null && value !== undefined) { let where = {[field]: value}; if (this.exprBuilder) { where = buildFilter(whereParams, (param, value) => From e8e8392e5da24a34d1c86edc9b5517ed7bea0b0c Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 7 Mar 2023 07:58:08 +0100 Subject: [PATCH 2/4] Updated changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bff0feed7..1cfc7e610 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - ### Fixed -- +- (Clientes -> Listado extendido) Resuelto error al filtrar por clientes inactivos desde la columna "Activo" ## [2308.01] - 2023-03-09 From 0d2339686cc13b39fd7b26c9f3fc67968568a482 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 7 Mar 2023 08:10:52 +0100 Subject: [PATCH 3/4] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cfc7e610..cf7d8465a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - (Clientes -> Listado extendido) Resuelto error al filtrar por clientes inactivos desde la columna "Activo" +- (General) Al pasar el ratón por encima del icono de "Borrar" en un campo, se hacía más grande afectando a la interfaz ## [2308.01] - 2023-03-09 From 14a5c7830398d609a1757d97e7b5aa3973f5416a Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 7 Mar 2023 08:13:07 +0100 Subject: [PATCH 4/4] Updated unit test --- front/core/components/check/index.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/core/components/check/index.spec.js b/front/core/components/check/index.spec.js index c9d50cab2..7ec0f12a0 100644 --- a/front/core/components/check/index.spec.js +++ b/front/core/components/check/index.spec.js @@ -45,8 +45,8 @@ describe('Component vnCheck', () => { }); it(`should set value to null and change to true when clicked`, () => { - controller.field = null; controller.tripleState = true; + controller.field = null; element.click(); expect(controller.field).toEqual(true);