From 6618bf8ab8204d08b57a7bd9a862569b724ec172 Mon Sep 17 00:00:00 2001 From: analuizaff Date: Thu, 28 Oct 2021 17:36:05 -0300 Subject: [PATCH] fixing issue when loading pluviometer data on the map modal --- src/App.js | 2 +- src/app/components/AssembleModalObject.js | 6 ++++-- src/app/config/colors.js | 1 - src/app/screens/MapFeedScreen.js | 10 +++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/App.js b/src/App.js index de19d9b..da6bcb3 100644 --- a/src/App.js +++ b/src/App.js @@ -33,7 +33,7 @@ export default function App() { const storageUser = await authStorage.getUser(); if (storageUser) setUser(storageUser); - global.location = { lat: -9.969802, long: -67.816956 }; // await getLocation(); + global.location = { lat: -9.9740, long: -67.8098 }; // await getLocation(); }; if (!isReady && netInfo.isInternetReachable) { diff --git a/src/app/components/AssembleModalObject.js b/src/app/components/AssembleModalObject.js index e854c5f..979286b 100644 --- a/src/app/components/AssembleModalObject.js +++ b/src/app/components/AssembleModalObject.js @@ -75,10 +75,11 @@ const AssembleModalObject = (response, name) => { labels: [], }; - if (JSON.parse(response)) { + if (JSON.parse(response).array_to_json) { const r = JSON.parse(response).array_to_json; + console.log(response); - user = r[0].formsanswersuserinformer; + //(waiting for issue #16) user = r[0].formsanswersuserinformer; if (name == "automaticPluviometer") { (situation = "PLUVIÔMETRO"), @@ -101,6 +102,7 @@ const AssembleModalObject = (response, name) => { }); } else { if (r[0].array_to_json) { + user = r[0].formsanswersuserinformer; r[0].array_to_json.forEach(function (f) { if (f.fieldname == "situation") { situation = f.fieldsanswersvalue; diff --git a/src/app/config/colors.js b/src/app/config/colors.js index 6e3ca18..41451f5 100644 --- a/src/app/config/colors.js +++ b/src/app/config/colors.js @@ -19,5 +19,4 @@ export default { gold: "#ffd700", toggle: "#e5eff4", grayBG: "#EEECEC", - }; diff --git a/src/app/screens/MapFeedScreen.js b/src/app/screens/MapFeedScreen.js index 6bfc665..553ebe0 100644 --- a/src/app/screens/MapFeedScreen.js +++ b/src/app/screens/MapFeedScreen.js @@ -17,11 +17,11 @@ export default function MapFeedScreen(props) { susceptibilityAreas: false, }, citzen: { - floodRisk: true, - pluviometer: true, - rain: true, - floodZones: true, - riverFlood: true, + floodRisk: false, + pluviometer: false, + rain: false, + floodZones: false, + riverFlood: false, }, });