|
@ -19,6 +19,9 @@ import { FontAwesome5 } from '@expo/vector-icons'; |
|
|
import { showMessage } from "react-native-flash-message"; |
|
|
import { showMessage } from "react-native-flash-message"; |
|
|
import moment from 'moment'; |
|
|
import moment from 'moment'; |
|
|
import colors from "../config/colors"; |
|
|
import colors from "../config/colors"; |
|
|
|
|
|
import { scaleDimsFromWidth } from "../config/dimensions"; |
|
|
|
|
|
|
|
|
|
|
|
const dims = scaleDimsFromWidth(85, 85, 25); |
|
|
|
|
|
|
|
|
const validationSchema = Yup.object().shape({ |
|
|
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).label("pluviometer"), |
|
|
pluviometer: Yup.number().required("Campo obrigatório").min(0, "O valor deve ser maior ou igual a 0.").max(10000).label("pluviometer"), |
|
@ -74,7 +77,7 @@ function PluviometerSharingDataScreen(props) { |
|
|
return ( |
|
|
return ( |
|
|
<Screen style={styles.container}> |
|
|
<Screen style={styles.container}> |
|
|
|
|
|
|
|
|
<View style={{ alignSelf: "center" }}> |
|
|
|
|
|
|
|
|
<View style={{ alignItems: "center" }}> |
|
|
<Image |
|
|
<Image |
|
|
style={styles.image} |
|
|
style={styles.image} |
|
|
source={require("../assets/pluviometro.png")} |
|
|
source={require("../assets/pluviometro.png")} |
|
@ -106,28 +109,31 @@ function PluviometerSharingDataScreen(props) { |
|
|
<Text style={styles.labelStyle}> |
|
|
<Text style={styles.labelStyle}> |
|
|
Quantidade de chuva: |
|
|
Quantidade de chuva: |
|
|
</Text> |
|
|
</Text> |
|
|
|
|
|
<View style={{ flex: 1, flexDirection: 'row' }}> |
|
|
<FormField |
|
|
<FormField |
|
|
keyboardType="number-pad" |
|
|
keyboardType="number-pad" |
|
|
maxLength={200} |
|
|
maxLength={200} |
|
|
name="pluviometer" |
|
|
name="pluviometer" |
|
|
placeholder="Digite a quantidade de chuva" |
|
|
placeholder="Digite a quantidade de chuva" |
|
|
flex= {1} |
|
|
|
|
|
/> |
|
|
/> |
|
|
</View> |
|
|
</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
|
<View style={{ marginTop: 10, width: 220, borderRadius: 25 }}> |
|
|
|
|
|
|
|
|
<View style={{ marginTop: 10, flex: 1, borderRadius: 25 }}> |
|
|
<Text style={styles.labelStyle}> |
|
|
<Text style={styles.labelStyle}> |
|
|
Data da coleta: |
|
|
Data da coleta: |
|
|
</Text> |
|
|
</Text> |
|
|
<View style={{flexDirection:"row"}}> |
|
|
|
|
|
|
|
|
<View style={{ flex: 1, flexDirection: 'row' }}> |
|
|
|
|
|
<View style={{ flex: 1 }}> |
|
|
<FormField |
|
|
<FormField |
|
|
keyboardType="numbers-and-punctuation" |
|
|
keyboardType="numbers-and-punctuation" |
|
|
maxLength={10} |
|
|
maxLength={10} |
|
|
name="data" |
|
|
name="data" |
|
|
placeholder="dd/mm/aaaa" |
|
|
placeholder="dd/mm/aaaa" |
|
|
width={240} |
|
|
|
|
|
values={dateTime} |
|
|
values={dateTime} |
|
|
|
|
|
flex={1} |
|
|
/> |
|
|
/> |
|
|
|
|
|
</View> |
|
|
<FontAwesome5 style={styles.dateIcon} name="calendar-day" size={24} color="grey" /> |
|
|
<FontAwesome5 style={styles.dateIcon} name="calendar-day" size={24} color="grey" /> |
|
|
</View> |
|
|
</View> |
|
|
{/* |
|
|
{/* |
|
@ -217,8 +223,8 @@ const styles = StyleSheet.create({ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
image: { |
|
|
image: { |
|
|
width: 85, |
|
|
|
|
|
height: 85, |
|
|
|
|
|
|
|
|
width: dims.width * 0.8, |
|
|
|
|
|
height: dims.height * 0.8, |
|
|
justifyContent: "center", |
|
|
justifyContent: "center", |
|
|
alignItems: "center", |
|
|
alignItems: "center", |
|
|
}, |
|
|
}, |
|
|