From 3372d80b3dd9581e94d5b33e4fd779e3fd086077 Mon Sep 17 00:00:00 2001 From: cbrianbet Date: Mon, 16 Sep 2024 16:56:18 +0300 Subject: [PATCH] check rr tabs errors --- src/views/RR/RR.js | 2 +- src/views/RR/RRCounty.js | 4 ++-- src/views/RR/RRPartner.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/RR/RR.js b/src/views/RR/RR.js index 98404b8d..dc9e0afd 100644 --- a/src/views/RR/RR.js +++ b/src/views/RR/RR.js @@ -104,7 +104,7 @@ const RR = () => { if (!active_tab) { history.push(`/reporting-rates/${DEFAULT_ACTIVE_TAB}`); } - }, []); + }, [DEFAULT_ACTIVE_TAB]); if(!active_tab){ history.push(`/reporting-rates/${rrTab}`); diff --git a/src/views/RR/RRCounty.js b/src/views/RR/RRCounty.js index 4986fa31..a4a57dea 100644 --- a/src/views/RR/RRCounty.js +++ b/src/views/RR/RRCounty.js @@ -107,14 +107,14 @@ const RRCounty = () => { consistency_values.sort(function(a, b) { return b.y - a.y; }); - const consistency_counties = consistency_values.map(obj => capitalize(obj.county)); + const consistency_counties = consistency_values?.map(obj => capitalize(obj.county)); const counties = overallReportingRateResult?.map(({ county }) => county); const emrResultSeries = overallReportingRateResult?.map(({ expected }) => parseInt(expected, 10)); setReportingByCounty({ title: { text: '' }, - xAxis: [{ categories: counties?.map(name=> name?name.toUpperCase(): name), title: { text: 'COUNTIES' }, crosshair: true }], + xAxis: [{ categories: counties?.map(name=> name ? name?.toUpperCase() : name), title: { text: 'COUNTIES' }, crosshair: true }], yAxis: [ { title: { text: 'NUMBER OF EMR SITES' } } ], diff --git a/src/views/RR/RRPartner.js b/src/views/RR/RRPartner.js index 4a3db309..11ecc6f0 100644 --- a/src/views/RR/RRPartner.js +++ b/src/views/RR/RRPartner.js @@ -115,7 +115,7 @@ const RRPartner = () => { setReportingByPartner({ title: { text: '' }, - xAxis: [{ categories: partners.map(name => name.toUpperCase()), title: { text: 'Partners'.toUpperCase() }, crosshair: true }], + xAxis: [{ categories: partners?.map(name => name?.toUpperCase()), title: { text: 'Partners'.toUpperCase() }, crosshair: true }], yAxis: [ { title: { text: 'Number of EMR Sites'.toUpperCase() } }, // { title: { text: 'Percentage (%) Reporting Rate'}, opposite: true, min: 0, max: 100 },