From 57a2cd46ce789b71d07149c12c61675c7e15bde2 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Wed, 29 Jun 2022 12:55:11 +0200 Subject: [PATCH] ticket filter pending uses isNotValidated now --- modules/ticket/back/methods/ticket/filter.js | 17 +---------------- .../back/methods/ticket/specs/filter.spec.js | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/modules/ticket/back/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js index 467c88246..da8f65be2 100644 --- a/modules/ticket/back/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -200,22 +200,7 @@ module.exports = Self => { return {'t.routeFk': {neq: null}}; return {'t.routeFk': null}; case 'pending': - if (value) { - return {and: [ - {'st.alertLevel': 0}, - {'st.code': {nin: [ - 'OK', - 'BOARDING', - 'PRINTED', - 'PRINTED_AUTO', - 'PICKER_DESIGNED' - ]}} - ]}; - } else { - return {and: [ - {'st.alertLevel': {gt: 0}} - ]}; - } + return {'st.isNotValidated': value}; case 'id': case 'clientFk': case 'agencyModeFk': diff --git a/modules/ticket/back/methods/ticket/specs/filter.spec.js b/modules/ticket/back/methods/ticket/specs/filter.spec.js index 020bc5747..c3dc40092 100644 --- a/modules/ticket/back/methods/ticket/specs/filter.spec.js +++ b/modules/ticket/back/methods/ticket/specs/filter.spec.js @@ -153,7 +153,7 @@ describe('ticket filter()', () => { const secondRow = result[1]; const thirdRow = result[2]; - expect(result.length).toEqual(12); + expect(result.length).toEqual(17); expect(firstRow.state).toEqual('Entregado'); expect(secondRow.state).toEqual('Entregado'); expect(thirdRow.state).toEqual('Entregado');