From 6a1326ae7c11ccfe5c679145e4a1b751da6de260 Mon Sep 17 00:00:00 2001 From: Christophe Gerard Date: Tue, 15 Jun 2021 10:09:36 +0200 Subject: [PATCH 1/2] Filters missing on api call --- src/actions.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/actions.js b/src/actions.js index b8893cb..d08e8e5 100644 --- a/src/actions.js +++ b/src/actions.js @@ -5,10 +5,21 @@ import { import _ from "lodash"; import _uuid from "lodash-uuid"; -export function fetchPayers(mm, filters = []) { +export function fetchPayers(mm, hf, str, prev) { + var filters = []; + if (!!hf) { + filters.push(`healthFacility_Uuid: "${hf.uuid}"`) + } + if (!!str) { + filters.push(`str: "${str}"`) + } + if (_.isEqual(filters, prev)) { + return (dispatch) => { } + } + console.log('ICI') const payload = formatPageQuery( "payers", - null, + filters, mm.getRef("payer.PayerPicker.projection") ); return graphql(payload, 'PAYER_PAYERS', filters); From 742d4fa156c05b8d26b08ace6d805624c5d0e378 Mon Sep 17 00:00:00 2001 From: Eric Darchis Date: Tue, 31 Aug 2021 12:30:07 +0200 Subject: [PATCH 2/2] Remove debug console log --- src/actions.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/actions.js b/src/actions.js index d08e8e5..d1b413c 100644 --- a/src/actions.js +++ b/src/actions.js @@ -16,7 +16,6 @@ export function fetchPayers(mm, hf, str, prev) { if (_.isEqual(filters, prev)) { return (dispatch) => { } } - console.log('ICI') const payload = formatPageQuery( "payers", filters,