From 96fc21ba0a6b501bd5b987b39399631753bb2622 Mon Sep 17 00:00:00 2001 From: analuizaff Date: Fri, 5 Nov 2021 11:24:59 -0300 Subject: [PATCH] adding 'admin@wpd.com' as user informer for all forms --- src/app/components/AssembleModalObject.js | 2 +- src/app/components/MapMarkerList.js | 2 +- .../components/forms/AssembleIngestionObject.js | 6 +++--- src/app/hooks/useFiltering.js | 14 +++++++------- src/app/screens/MapFeedScreen.js | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/app/components/AssembleModalObject.js b/src/app/components/AssembleModalObject.js index caadc28..d63dae1 100644 --- a/src/app/components/AssembleModalObject.js +++ b/src/app/components/AssembleModalObject.js @@ -134,7 +134,7 @@ const AssembleModalObject = (response, name) => { return { name: name, title: situation, - user: user, + user: null, institution: institution, address: address, date: date + " | " + time, diff --git a/src/app/components/MapMarkerList.js b/src/app/components/MapMarkerList.js index b96ea63..36b8cb3 100644 --- a/src/app/components/MapMarkerList.js +++ b/src/app/components/MapMarkerList.js @@ -7,7 +7,7 @@ function isRequestedValue(item, renderOptions) { renderOptions.oficial.automaticPluviometer) || (item.name == "rain" && renderOptions.citzen.rain) || (item.name == "riverFlood" && renderOptions.citzen.riverFlood) || - (item.name == "floodZones" && renderOptions.citzen.floodRisk) || + (item.name == "floodZones" && renderOptions.citzen.floodZones) || (item.name == "susceptibilityAreas" && renderOptions.oficial.susceptibilityAreas) ); } diff --git a/src/app/components/forms/AssembleIngestionObject.js b/src/app/components/forms/AssembleIngestionObject.js index 2dbec28..7b9b512 100644 --- a/src/app/components/forms/AssembleIngestionObject.js +++ b/src/app/components/forms/AssembleIngestionObject.js @@ -17,7 +17,7 @@ const AssembleIngestionObject = ( array_to_json: [ { formcode: code, - formsanswersuserinformer: user.id, + formsanswersuserinformer: "admin@wpd.com",//user.id, fieldsanswerslongitude: location["longitude"], fieldsanswerslatitude: location["latitude"], fields: [ @@ -49,7 +49,7 @@ const AssembleIngestionPluviometer = ({ array_to_json: [ { formcode: "PLUVIOMETERS_FORM", - formsanswersuserinformer: user.id, + formsanswersuserinformer: "admin@wpd.com",//user.id, fias: [ { fieldsanswersdate: moment(date).format("DD-MM-YYYY"), @@ -72,7 +72,7 @@ const AssembleIngestionPluvRegistration = ( date, time, user, address, coordinat array_to_json: [ { formcode: "PLUVIOMETER_REGISTRATION", - formsanswersuserinformer: user.id, + formsanswersuserinformer: "admin@wpd.com",//user.id, fieldsanswerslongitude: coordinates["longitude"], fieldsanswerslatitude: coordinates["latitude"], fields: [ diff --git a/src/app/hooks/useFiltering.js b/src/app/hooks/useFiltering.js index 72a5f52..0cc3bb2 100644 --- a/src/app/hooks/useFiltering.js +++ b/src/app/hooks/useFiltering.js @@ -6,49 +6,49 @@ function useFiltering(location) { const initialDate = moment().add(1, "days").format("YYYY-MM-DDTHH:mm:ss"); const finalDate = moment().subtract(2, "days").format("YYYY-MM-DDTHH:mm:ss"); - // console.log(initialDate+"/"+finalDate); + console.log(initialDate+"/"+finalDate); const filters = [ { name: "floodZones", socketUrl: new WebSocket( endpoint + - `type=FLOODZONES_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15` + `type=FLOODZONES_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=50` ), }, { name: "rain", socketUrl: new WebSocket( endpoint + - `type=RAIN_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15` + `type=RAIN_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=50` ), }, { name: "riverFlood", socketUrl: new WebSocket( endpoint + - `type=RIVERFLOOD_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15` + `type=RIVERFLOOD_FORM&time=${finalDate}/${initialDate}&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=50` ), }, { name: "pluviometer", socketUrl: new WebSocket( endpoint + - `type=PLUVIOMETER_REGISTRATION&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15` + `type=PLUVIOMETER_REGISTRATION&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=50` ), }, { name: "susceptibilityAreas", socketUrl: new WebSocket( endpoint + - `type=FLOODZONES_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=10` + `type=FLOODZONES_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=20` ), }, { name: "automaticPluviometer", socketUrl: new WebSocket( endpoint + - `type=PLUVIOMETERS_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=15` + `type=PLUVIOMETERS_OFFICIAL&lat=${location.lat}&lon=${location.long}&buffer=50000&limit=20` ), }, ]; diff --git a/src/app/screens/MapFeedScreen.js b/src/app/screens/MapFeedScreen.js index e17a64e..ff358c2 100644 --- a/src/app/screens/MapFeedScreen.js +++ b/src/app/screens/MapFeedScreen.js @@ -13,12 +13,12 @@ export default function MapFeedScreen(props) { const [dataOptionsToShow, setDataOptionsToShow] = useState({ oficial: { - automaticPluviometer: true, + automaticPluviometer: false, susceptibilityAreas: false, }, citzen: { floodRisk: true, - pluviometer: false, + pluviometer: true, rain: true, floodZones: true, riverFlood: true,