diff --git a/src/app/assets/rio_alto.png b/src/app/assets/rio_alto.png new file mode 100644 index 0000000..3bab3be Binary files /dev/null and b/src/app/assets/rio_alto.png differ diff --git a/src/app/assets/rio_baixo.png b/src/app/assets/rio_baixo.png new file mode 100644 index 0000000..0236786 Binary files /dev/null and b/src/app/assets/rio_baixo.png differ diff --git a/src/app/assets/rio_normal.png b/src/app/assets/rio_normal.png new file mode 100644 index 0000000..97aff65 Binary files /dev/null and b/src/app/assets/rio_normal.png differ diff --git a/src/app/assets/rio_transbordando.png b/src/app/assets/rio_transbordando.png new file mode 100644 index 0000000..621619c Binary files /dev/null and b/src/app/assets/rio_transbordando.png differ diff --git a/src/app/screens/PluviometerSharingDataScreen.js b/src/app/screens/PluviometerSharingDataScreen.js index 3c5e595..05e5eb6 100644 --- a/src/app/screens/PluviometerSharingDataScreen.js +++ b/src/app/screens/PluviometerSharingDataScreen.js @@ -16,7 +16,7 @@ import FormImagePicker from "../components/forms/FormImagePicker"; const validationSchema = Yup.object().shape({ pluviometer: Yup.number().required().min(1).max(10000).label("pluviometer"), - images: Yup.array().min(1, "Please select at least one image."), + images: Yup.array().min(1, "Por favor, selecione uma imagem."), }); diff --git a/src/app/screens/RainSharingDataScreen.js b/src/app/screens/RainSharingDataScreen.js index 660d09b..7ab3386 100644 --- a/src/app/screens/RainSharingDataScreen.js +++ b/src/app/screens/RainSharingDataScreen.js @@ -30,6 +30,9 @@ function RainSharingDataScreen() { return ( + + Chuva +
- {/* - Enviar uma informação - */} - @@ -148,7 +141,7 @@ function RainSharingDataScreen() { const styles = StyleSheet.create({ container: { - padding: 10, + paddingHorizontal: 10, }, img_block: { borderRadius: 5, @@ -156,6 +149,7 @@ const styles = StyleSheet.create({ borderStyle: "dotted", borderColor: colors.primary, alignItems: "center", + width: 110, }, floodingLogo: { width: 85, diff --git a/src/app/screens/RiverFloodSharingDataScreen.js b/src/app/screens/RiverFloodSharingDataScreen.js new file mode 100644 index 0000000..c0205ba --- /dev/null +++ b/src/app/screens/RiverFloodSharingDataScreen.js @@ -0,0 +1,139 @@ +import React, { useState } from "react"; +import { Button, StyleSheet, View } from "react-native"; +import * as Yup from "yup"; + +import { + Form, + FormField, + FormPicker as Picker, + SubmitButton, +} from "../components/forms"; +import CategoryPickerItem from "../components/CategoryPickerItem"; +import Screen from "../components/Screen"; +import FormImagePicker from "../components/forms/FormImagePicker"; +import useLocation from "../hooks/useLocation"; +import { Image, Text, TouchableOpacity } from "react-native"; +import colors from "../config/colors"; +import { TouchableNativeFeedback } from "react-native-gesture-handler"; + +const validationSchema = Yup.object().shape({ + images: Yup.array().min(1, "Por favor, selecione ao menos uma imagem"), + description: Yup.string() + .label("Description") + .required("Por favor, forneça uma descrição"), +}); + +const borderWidth = 4; + +function RiverFloodSharingDataScreen() { + const [passable, setPassable] = useState(0); + + return ( + + + Nível da água do rio + + submitForm({ ...values, passable, location })} + validationSchema={validationSchema} + > + + + setPassable(0)}> + + + Baixo + + + + setPassable(1)}> + + + Rio normal + + + + + + setPassable(2)}> + + + Alto + + + + setPassable(3)}> + + + Transbordando + + + + + + + + + + ); +} + +const styles = StyleSheet.create({ + container: { + padding: 10, + }, + img_block: { + borderRadius: 5, + padding: 10, + borderStyle: "dotted", + borderColor: colors.primary, + alignItems: "center", + width:130, + }, + floodingLogo: { + width: 85, + height: 85, + }, + text: { + fontSize: 14, + textAlign: "center", + marginTop: 10, + }, +}); + +export default RiverFloodSharingDataScreen; diff --git a/src/app/screens/SharingDataScreen.js b/src/app/screens/SharingDataScreen.js index bdb5e5b..67516b7 100644 --- a/src/app/screens/SharingDataScreen.js +++ b/src/app/screens/SharingDataScreen.js @@ -6,6 +6,7 @@ import { createStackNavigator } from "@react-navigation/stack"; import RainSharingDataScreen from "../screens/RainSharingDataScreen"; import SharingFloodZonesScreen from "./SharingFloodZonesScreen"; import PluviometerSharingDataScreen from "./PluviometerSharingDataScreen"; +import RiverFloodSharingDataScreen from "./RiverFloodSharingDataScreen"; //1/3 @@ -55,7 +56,7 @@ function SharingDataScreen({ navigation }) { Diário do{"\n"}pluviômetro - + navigation.navigate('RiverFloodData')}> + - + + ); } diff --git a/src/app/screens/SharingFloodZonesScreen.js b/src/app/screens/SharingFloodZonesScreen.js index 516f9eb..241011b 100644 --- a/src/app/screens/SharingFloodZonesScreen.js +++ b/src/app/screens/SharingFloodZonesScreen.js @@ -1,6 +1,6 @@ import React, { useState } from "react"; import { Dimensions } from "react-native"; -import { StyleSheet, Text, Image, View } from "react-native"; +import { StyleSheet, Text, Image, View, KeyboardAvoidingView } from "react-native"; import * as Yup from "yup"; import { Form, SubmitButton, FormField } from "../components/forms"; @@ -31,7 +31,12 @@ function SharingFloodZonesScreen() { const location = useLocation(); return ( - + + + Pontos de alagamento +
- -
+ + ); } const styles = StyleSheet.create({ container: { - padding: 10, - justifyContent: "center", + paddingHorizontal: 10, }, header: {