Browse Source

Merge branch 'main' of github.com:IGSD-UoW/WPD-MobileApp

master
GabrielTrettel 3 years ago
parent
commit
2caae4c620
  1. 2
      src/App.js
  2. 6
      src/app/components/AssembleModalObject.js
  3. 1
      src/app/config/colors.js
  4. 10
      src/app/screens/MapFeedScreen.js

2
src/App.js

@ -33,7 +33,7 @@ export default function App() {
const storageUser = await authStorage.getUser(); const storageUser = await authStorage.getUser();
if (storageUser) setUser(storageUser); 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) { if (!isReady && netInfo.isInternetReachable) {

6
src/app/components/AssembleModalObject.js

@ -75,10 +75,11 @@ const AssembleModalObject = (response, name) => {
labels: [], labels: [],
}; };
if (JSON.parse(response)) {
if (JSON.parse(response).array_to_json) {
const r = 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") { if (name == "automaticPluviometer") {
(situation = "PLUVIÔMETRO"), (situation = "PLUVIÔMETRO"),
@ -101,6 +102,7 @@ const AssembleModalObject = (response, name) => {
}); });
} else { } else {
if (r[0].array_to_json) { if (r[0].array_to_json) {
user = r[0].formsanswersuserinformer;
r[0].array_to_json.forEach(function (f) { r[0].array_to_json.forEach(function (f) {
if (f.fieldname == "situation") { if (f.fieldname == "situation") {
situation = f.fieldsanswersvalue; situation = f.fieldsanswersvalue;

1
src/app/config/colors.js

@ -19,5 +19,4 @@ export default {
gold: "#ffd700", gold: "#ffd700",
toggle: "#e5eff4", toggle: "#e5eff4",
grayBG: "#EEECEC", grayBG: "#EEECEC",
}; };

10
src/app/screens/MapFeedScreen.js

@ -17,11 +17,11 @@ export default function MapFeedScreen(props) {
susceptibilityAreas: false, susceptibilityAreas: false,
}, },
citzen: { citzen: {
floodRisk: true,
pluviometer: true,
rain: true,
floodZones: true,
riverFlood: true,
floodRisk: false,
pluviometer: false,
rain: false,
floodZones: false,
riverFlood: false,
}, },
}); });

Loading…
Cancel
Save