|
|
@ -13,6 +13,7 @@ import moment from "moment"; |
|
|
|
import FormLocationPicker from "../components/forms/FormLocationPicker"; |
|
|
|
import { EventLocationContext } from "../context/EventLocationContext"; |
|
|
|
import SchoolPicker from "../components/SchoolPicker"; |
|
|
|
import { TouchableOpacity } from "react-native-gesture-handler"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -59,48 +60,59 @@ function PluviometerRegisterScreen(props) { |
|
|
|
<View style={{ flex: 0.10 }}> |
|
|
|
<Text style={styles.title}>Cadastro do Pluviômetro</Text> |
|
|
|
</View> |
|
|
|
|
|
|
|
{/* Escola: */} |
|
|
|
<View style={{ flex: 0.30 }}> |
|
|
|
<View style={{ flex: 0.25, marginTop: 5}}> |
|
|
|
<Text style={styles.label}>Escola: </Text> |
|
|
|
<SchoolPicker |
|
|
|
itemSelected={(value) => setSchool(value)} /> |
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={{ |
|
|
|
flex: 0.60, flexDirection: "column", |
|
|
|
justifyContent: "space-between" |
|
|
|
flex: 0.60, flexDirection: "column" |
|
|
|
}}> |
|
|
|
<ScrollView contentContainerStyle={{ flexGrow: 1,flexDirection: "column", |
|
|
|
justifyContent: "space-between" }}> |
|
|
|
<ScrollView contentContainerStyle={{ |
|
|
|
flexGrow: 1 |
|
|
|
}}> |
|
|
|
<View style={{ |
|
|
|
flex: 1, |
|
|
|
flexDirection: "column", |
|
|
|
justifyContent: "space-between" |
|
|
|
}}> |
|
|
|
{/*Local do pluvioômetro:*/} |
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
<TouchableOpacity onPress={() => props.navigation.navigate("FormMap")}> |
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
<Text style={styles.label}>Endereço do pluviômetro: </Text> |
|
|
|
<FormLocationPicker subtitle="Defina o endereço do pluviômetro" /> |
|
|
|
</View> |
|
|
|
</TouchableOpacity> |
|
|
|
</View> |
|
|
|
|
|
|
|
{/*Local do pluvioômetro:*/} |
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
<Text style={styles.label}>Endereço do pluviômetro: </Text> |
|
|
|
<FormLocationPicker subtitle="Defina o endereço do pluviômetro" /> |
|
|
|
</View> |
|
|
|
|
|
|
|
{/*Data de cadastro:*/} |
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
<Text style={{ |
|
|
|
fontSize: dimensions.text.secondary, |
|
|
|
fontWeight: "bold", |
|
|
|
textAlign: "left", |
|
|
|
color: colors.lightBlue, marginBottom: 10 |
|
|
|
}}>Data do cadastro: </Text> |
|
|
|
<FormDatePicker |
|
|
|
disabled={true} |
|
|
|
textStyle={{ |
|
|
|
borderColor: colors.gray, |
|
|
|
borderWidth: 3, |
|
|
|
}} |
|
|
|
subtitle=" " |
|
|
|
defaultDate={new Date()} |
|
|
|
onDateChange={(value) => setDateTime(value)} |
|
|
|
onTimeChange={(value) => setTime(value)} |
|
|
|
/> |
|
|
|
</View> |
|
|
|
{/*Data de cadastro:*/} |
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
<Text style={{ |
|
|
|
fontSize: dimensions.text.secondary, |
|
|
|
fontWeight: "bold", |
|
|
|
textAlign: "left", |
|
|
|
color: colors.lightBlue, |
|
|
|
}}>Data do cadastro: </Text> |
|
|
|
<FormDatePicker |
|
|
|
disabled={true} |
|
|
|
textStyle={{ |
|
|
|
borderColor: colors.gray, |
|
|
|
borderWidth: 3, |
|
|
|
}} |
|
|
|
subtitle=" " |
|
|
|
defaultDate={new Date()} |
|
|
|
onDateChange={(value) => setDateTime(value)} |
|
|
|
onTimeChange={(value) => setTime(value)} |
|
|
|
/> |
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={{ flex: 0.10, marginTop:15 }}> |
|
|
|
<SubmitButton title="Cadastrar" alignContent="flex-end" /> |
|
|
|
<View style={{ flex: 0.05, marginTop: 15 }}> |
|
|
|
<SubmitButton title="Cadastrar" alignContent="flex-end" /> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</ScrollView> |
|
|
|
</View> |
|
|
|