From be3870d87b91edb2350b029f9da764345774be5f Mon Sep 17 00:00:00 2001 From: analuizaff Date: Tue, 9 Feb 2021 13:55:46 -0300 Subject: [PATCH 1/2] limitating the maximum value of 'quantidade de chuva' input and adding unit of measurement --- src/app/screens/PluviometerSharingDataScreen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/screens/PluviometerSharingDataScreen.js b/src/app/screens/PluviometerSharingDataScreen.js index dc5e761..0de58a2 100644 --- a/src/app/screens/PluviometerSharingDataScreen.js +++ b/src/app/screens/PluviometerSharingDataScreen.js @@ -23,7 +23,7 @@ const validationSchema = Yup.object().shape({ pluviometer: Yup.number() .required("Campo obrigatório") .min(0, "O valor deve ser maior ou igual a 0.") - .max(10000) + .max(999) .label("pluviometer"), //data: Yup.string().required("Campo obrigatório. Por favor, selecione a data"), images: Yup.array(), @@ -70,7 +70,7 @@ function PluviometerSharingDataScreen(props) { validationSchema={validationSchema} > - Quantidade de chuva: + Quantidade de chuva (mm): Date: Tue, 9 Feb 2021 16:24:13 -0300 Subject: [PATCH 2/2] navigate to 'home' after form submission --- src/app/screens/PluviometerSharingDataScreen.js | 2 +- src/app/screens/RainSharingDataScreen.js | 2 +- src/app/screens/RiverFloodSharingDataScreen.js | 2 +- src/app/screens/SharingFloodZonesScreen.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/screens/PluviometerSharingDataScreen.js b/src/app/screens/PluviometerSharingDataScreen.js index 0de58a2..57d57dd 100644 --- a/src/app/screens/PluviometerSharingDataScreen.js +++ b/src/app/screens/PluviometerSharingDataScreen.js @@ -65,7 +65,7 @@ function PluviometerSharingDataScreen(props) { icon: "success", type: "success", }); - props.navigation.goBack(null); + props.navigation.navigate("Home"); }} validationSchema={validationSchema} > diff --git a/src/app/screens/RainSharingDataScreen.js b/src/app/screens/RainSharingDataScreen.js index fe5d4fe..cb72fe1 100644 --- a/src/app/screens/RainSharingDataScreen.js +++ b/src/app/screens/RainSharingDataScreen.js @@ -56,7 +56,7 @@ function RainSharingDataScreen(props) { type: "success", onPress: () => {}, }); - props.navigation.goBack(null); + props.navigation.navigate("Home"); }} validationSchema={validationSchema} > diff --git a/src/app/screens/RiverFloodSharingDataScreen.js b/src/app/screens/RiverFloodSharingDataScreen.js index 3aee8a2..4e3973e 100644 --- a/src/app/screens/RiverFloodSharingDataScreen.js +++ b/src/app/screens/RiverFloodSharingDataScreen.js @@ -59,7 +59,7 @@ function RiverFloodSharingDataScreen(props) { icon: "success", type: "success", }); - props.navigation.goBack(null); + props.navigation.navigate("Home"); }} validationSchema={validationSchema} > diff --git a/src/app/screens/SharingFloodZonesScreen.js b/src/app/screens/SharingFloodZonesScreen.js index dee226a..a771fc3 100644 --- a/src/app/screens/SharingFloodZonesScreen.js +++ b/src/app/screens/SharingFloodZonesScreen.js @@ -63,7 +63,7 @@ function SharingFloodZonesScreen(props) { icon: "success", type: "success", }); - props.navigation.goBack(null); + props.navigation.navigate("Home"); }} validationSchema={validationSchema} >