|
@ -28,8 +28,8 @@ function Institution({ user }) { |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<View style={{ marginBottom: 24 }}> |
|
|
|
|
|
<Text style={styles.label}>Tipo de instituição: </Text> |
|
|
|
|
|
|
|
|
<View style={{ marginBottom: 24, flex: 1 }}> |
|
|
|
|
|
<Text style={styles.labelTipoInst}>Tipo de instituição: </Text> |
|
|
<View style={{ flexDirection: "row", marginTop: 16 }}> |
|
|
<View style={{ flexDirection: "row", marginTop: 16 }}> |
|
|
<FontAwesome5 name="university" size={30} color={colors.primary} /> |
|
|
<FontAwesome5 name="university" size={30} color={colors.primary} /> |
|
|
<Text style={styles.subText}> |
|
|
<Text style={styles.subText}> |
|
@ -74,7 +74,9 @@ function LocationPicker({ |
|
|
{pluviometer && ( |
|
|
{pluviometer && ( |
|
|
<View style={{ flexDirection: "row", marginTop: 16 }}> |
|
|
<View style={{ flexDirection: "row", marginTop: 16 }}> |
|
|
<Text style={styles.subText}> |
|
|
<Text style={styles.subText}> |
|
|
{pluviometer?.address ? pluviometer.address : "Erro ao carregar endereço"} |
|
|
|
|
|
|
|
|
{pluviometer.address |
|
|
|
|
|
? pluviometer.address |
|
|
|
|
|
: "Erro ao carregar endereço"} |
|
|
</Text> |
|
|
</Text> |
|
|
</View> |
|
|
</View> |
|
|
)} |
|
|
)} |
|
@ -141,11 +143,13 @@ function PluvDateTimePicker({ |
|
|
formTypeFace={formTypeFace} |
|
|
formTypeFace={formTypeFace} |
|
|
/> |
|
|
/> |
|
|
)} |
|
|
)} |
|
|
|
|
|
|
|
|
{pluviometer && ( |
|
|
{pluviometer && ( |
|
|
<View |
|
|
<View |
|
|
style={{ |
|
|
style={{ |
|
|
flexDirection: "row", |
|
|
flexDirection: "row", |
|
|
alignItems: "center", |
|
|
alignItems: "center", |
|
|
|
|
|
alignContent: "center", |
|
|
}} |
|
|
}} |
|
|
> |
|
|
> |
|
|
<MaterialCommunityIcons |
|
|
<MaterialCommunityIcons |
|
@ -153,9 +157,11 @@ function PluvDateTimePicker({ |
|
|
size={30} |
|
|
size={30} |
|
|
color={colors.primary} |
|
|
color={colors.primary} |
|
|
/> |
|
|
/> |
|
|
<View style={{ flexDirection: "row", marginTop: 16 }}> |
|
|
|
|
|
<Text style={styles.subText}> |
|
|
|
|
|
{pluviometer.regiterDate ? pluviometer.regiterDate : "Erro ao carregar a data"} |
|
|
|
|
|
|
|
|
<View style={styles.date}> |
|
|
|
|
|
<Text style={styles.subTextDate}> |
|
|
|
|
|
{pluviometer.regiterDate |
|
|
|
|
|
? pluviometer.regiterDate |
|
|
|
|
|
: "Erro ao carregar a data"} |
|
|
</Text> |
|
|
</Text> |
|
|
</View> |
|
|
</View> |
|
|
</View> |
|
|
</View> |
|
@ -209,9 +215,19 @@ function PluviometerRegisterScreen(props) { |
|
|
}); |
|
|
}); |
|
|
}} |
|
|
}} |
|
|
> |
|
|
> |
|
|
<View style={{ padding: 6, flex: 1, flexDirection:"column" }}> |
|
|
|
|
|
|
|
|
<View |
|
|
|
|
|
style={{ |
|
|
|
|
|
padding: 6, |
|
|
|
|
|
flex: 1, |
|
|
|
|
|
flexDirection: "column", |
|
|
|
|
|
justifyContent: "space-evenly", |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
|
|
|
<View style={{ flex: 0.05 }}> |
|
|
<Text style={styles.title}>Cadastro do Pluviômetro</Text> |
|
|
<Text style={styles.title}>Cadastro do Pluviômetro</Text> |
|
|
<View style={{flex: 0.25}}> |
|
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
<View style={{ flex: 0.95, justifyContent: "space-between" }}> |
|
|
|
|
|
<View style={{ flex: 0.19 }}> |
|
|
<Text |
|
|
<Text |
|
|
style={{ |
|
|
style={{ |
|
|
marginTop: 24, |
|
|
marginTop: 24, |
|
@ -234,7 +250,7 @@ function PluviometerRegisterScreen(props) { |
|
|
pluviometer={user.pluviometer} |
|
|
pluviometer={user.pluviometer} |
|
|
/> |
|
|
/> |
|
|
</View> |
|
|
</View> |
|
|
<View style={{flex: 0.25}}> |
|
|
|
|
|
|
|
|
<View style={{ flex: 0.19 }}> |
|
|
<Text style={styles.label}>Endereço do pluviômetro*: </Text> |
|
|
<Text style={styles.label}>Endereço do pluviômetro*: </Text> |
|
|
|
|
|
|
|
|
<View marginBottom={24}> |
|
|
<View marginBottom={24}> |
|
@ -247,15 +263,20 @@ function PluviometerRegisterScreen(props) { |
|
|
/> |
|
|
/> |
|
|
</View> |
|
|
</View> |
|
|
</View> |
|
|
</View> |
|
|
<View style={{flex: 0.25}}> |
|
|
|
|
|
|
|
|
<View style={{ flex: 0.38 }}> |
|
|
<Institution user={user} /> |
|
|
<Institution user={user} /> |
|
|
</View> |
|
|
</View> |
|
|
<View style={{flex: 0.25}}> |
|
|
|
|
|
|
|
|
<View style={{ flex: 0.19 }}> |
|
|
{!user.pluviometer && ( |
|
|
{!user.pluviometer && ( |
|
|
<SubmitButton title="Cadastrar" paddingHorizontal={0} /> |
|
|
|
|
|
|
|
|
<SubmitButton |
|
|
|
|
|
style={{ alignSelf: "" }} |
|
|
|
|
|
title="Cadastrar" |
|
|
|
|
|
paddingHorizontal={0} |
|
|
|
|
|
/> |
|
|
)} |
|
|
)} |
|
|
</View> |
|
|
</View> |
|
|
</View> |
|
|
</View> |
|
|
|
|
|
</View> |
|
|
</Form> |
|
|
</Form> |
|
|
</View> |
|
|
</View> |
|
|
); |
|
|
); |
|
@ -275,6 +296,12 @@ const styles = StyleSheet.create({ |
|
|
textAlign: "left", |
|
|
textAlign: "left", |
|
|
color: colors.secondary, |
|
|
color: colors.secondary, |
|
|
}, |
|
|
}, |
|
|
|
|
|
labelTipoInst: { |
|
|
|
|
|
fontSize: dimensions.text.secondary, |
|
|
|
|
|
fontWeight: "bold", |
|
|
|
|
|
textAlign: "left", |
|
|
|
|
|
color: colors.secondary, |
|
|
|
|
|
}, |
|
|
subText: { |
|
|
subText: { |
|
|
color: colors.subText, |
|
|
color: colors.subText, |
|
|
fontSize: 16, |
|
|
fontSize: 16, |
|
@ -282,8 +309,14 @@ const styles = StyleSheet.create({ |
|
|
fontWeight: "500", |
|
|
fontWeight: "500", |
|
|
paddingLeft: 16, |
|
|
paddingLeft: 16, |
|
|
}, |
|
|
}, |
|
|
|
|
|
subTextDate: { |
|
|
|
|
|
color: colors.subText, |
|
|
|
|
|
fontSize: 16, |
|
|
|
|
|
alignSelf: "center", |
|
|
|
|
|
fontWeight: "500", |
|
|
|
|
|
}, |
|
|
title: { |
|
|
title: { |
|
|
marginVertical: 24, |
|
|
|
|
|
|
|
|
// marginVertical: 24,
|
|
|
fontSize: 18, |
|
|
fontSize: 18, |
|
|
fontWeight: "bold", |
|
|
fontWeight: "bold", |
|
|
textAlign: "center", |
|
|
textAlign: "center", |
|
|