|
|
@ -13,6 +13,7 @@ import { EventLocationContext } from "../context/EventLocationContext"; |
|
|
|
import SchoolPicker from "../components/SchoolPicker"; |
|
|
|
import { TouchableOpacity } from "react-native-gesture-handler"; |
|
|
|
import DatePicker from "../components/DatePicker"; |
|
|
|
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view"; |
|
|
|
|
|
|
|
const dims = scaleDimsFromWidth(85, 85, 25); |
|
|
|
|
|
|
@ -30,7 +31,11 @@ function PluviometerRegisterScreen(props) { |
|
|
|
const [school, setSchool] = useState(); |
|
|
|
|
|
|
|
return ( |
|
|
|
<View style={styles.container}> |
|
|
|
<View |
|
|
|
style={{ |
|
|
|
padding: 16, |
|
|
|
}} |
|
|
|
> |
|
|
|
<Form |
|
|
|
initialValues={{}} |
|
|
|
onSubmit={() => { |
|
|
@ -43,9 +48,12 @@ function PluviometerRegisterScreen(props) { |
|
|
|
}); |
|
|
|
}} |
|
|
|
> |
|
|
|
{/* <KeyboardAwareScrollView */} |
|
|
|
{/* keyboardShouldPersistTaps={"handled"} */} |
|
|
|
{/* > */} |
|
|
|
<View |
|
|
|
style={{ |
|
|
|
alignContent: "flex-start", |
|
|
|
height: "100%", |
|
|
|
}} |
|
|
|
> |
|
|
|
<Text style={styles.title}>Cadastro do Pluviômetro</Text> |
|
|
@ -54,38 +62,47 @@ function PluviometerRegisterScreen(props) { |
|
|
|
<Text |
|
|
|
style={{ |
|
|
|
marginTop: 24, |
|
|
|
marginBottom: 12, |
|
|
|
fontSize: dimensions.text.secondary, |
|
|
|
fontWeight: "bold", |
|
|
|
textAlign: "left", |
|
|
|
color: colors.primary, |
|
|
|
color: colors.secondary, |
|
|
|
}} |
|
|
|
> |
|
|
|
Data do cadastro:{" "} |
|
|
|
</Text> |
|
|
|
|
|
|
|
<View |
|
|
|
style={{ |
|
|
|
marginBottom: 24 |
|
|
|
}} |
|
|
|
> |
|
|
|
<FormDatePicker |
|
|
|
onDateChange={(value) => setDate(value)} |
|
|
|
onTimeChange={(value) => setTime(value)} |
|
|
|
date={date} |
|
|
|
time={time} |
|
|
|
formTypeFace={"pluviometerRegister"} |
|
|
|
/> |
|
|
|
</View> |
|
|
|
|
|
|
|
{/* <View style={{ marginTop: 5 }}> */} |
|
|
|
{/* <Text style={styles.label}>Escola: </Text> */} |
|
|
|
{/* <SchoolPicker itemSelected={(value) => setSchool(value)} /> */} |
|
|
|
{/* </View> */} |
|
|
|
<TouchableOpacity |
|
|
|
onPress={() => props.navigation.navigate("FormMap")} |
|
|
|
> |
|
|
|
<View> |
|
|
|
<Text style={styles.label}>Endereço do pluviômetro*: </Text> |
|
|
|
<FormLocationPicker subtitle="Defina o endereço do pluviômetro" /> |
|
|
|
</View> |
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
{/* <TouchableOpacity */} |
|
|
|
{/* onPress={() => props.navigation.navigate("FormMap")} */} |
|
|
|
{/* > */} |
|
|
|
{/* <View> */} |
|
|
|
{/* <Text style={styles.label}>Endereço do pluviômetro: </Text> */} |
|
|
|
{/* <FormLocationPicker subtitle="Defina o endereço do pluviômetro" /> */} |
|
|
|
{/* </View> */} |
|
|
|
{/* </TouchableOpacity> */} |
|
|
|
<View style={{ marginTop: 24, marginBottom: 12 }}> |
|
|
|
<Text style={styles.label}>Instituição: </Text> |
|
|
|
<SchoolPicker itemSelected={(value) => setSchool(value)} /> |
|
|
|
</View> |
|
|
|
|
|
|
|
<SubmitButton title="Cadastrar" alignContent="flex-end" /> |
|
|
|
<SubmitButton title="Cadastrar" paddingHorizontal={0} /> |
|
|
|
</View> |
|
|
|
{/* </KeyboardAwareScrollView> */} |
|
|
|
</View> |
|
|
|
</Form> |
|
|
|
</View> |
|
|
@ -93,9 +110,6 @@ function PluviometerRegisterScreen(props) { |
|
|
|
} |
|
|
|
|
|
|
|
const styles = StyleSheet.create({ |
|
|
|
container: { |
|
|
|
padding: 10, |
|
|
|
}, |
|
|
|
image: { |
|
|
|
width: dims.width * 0.8, |
|
|
|
height: dims.height * 0.8, |
|
|
@ -104,12 +118,13 @@ const styles = StyleSheet.create({ |
|
|
|
}, |
|
|
|
label: { |
|
|
|
fontSize: dimensions.text.secondary, |
|
|
|
marginBottom: 12, |
|
|
|
fontWeight: "bold", |
|
|
|
textAlign: "left", |
|
|
|
color: colors.lightBlue, |
|
|
|
color: colors.secondary, |
|
|
|
}, |
|
|
|
title: { |
|
|
|
fontSize: 16, |
|
|
|
fontSize: 18, |
|
|
|
fontWeight: "bold", |
|
|
|
textAlign: "center", |
|
|
|
color: colors.primary, |
|
|
|