Browse Source

Merge branch 'main' of https://github.com/IGSD-UoW/WPD-MobileApp into main

master
analuizaff 3 years ago
parent
commit
1689127681
  1. 47
      src/app/components/NoGPSError.js
  2. 2
      src/app/components/PickEventDateLocation.js
  3. 5
      src/app/screens/MapFeedScreen.js
  4. 13
      src/app/screens/PluviometerRegisterScreen.js
  5. 2
      src/app/screens/PluviometerSharingDataScreen.js
  6. 2
      src/app/screens/RainSharingDataScreen.js
  7. 3
      src/app/screens/RiverFloodSharingDataScreen.js
  8. 2
      src/app/screens/SharingFloodZonesScreen.js

47
src/app/components/NoGPSError.js

@ -0,0 +1,47 @@
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import { MaterialCommunityIcons } from "@expo/vector-icons";
import colors from "../config/colors";
import { dimensions } from "../config/dimensions";
export default function NoGPSError() {
return (
<View style={styles.containter}>
<View style={styles.icon}>
<MaterialCommunityIcons
name="map-marker-outline"
size={58}
color={colors.primary}
alignSelf="center"
/>
</View>
<Text style={styles.txtHeader}>Ops, algo deu errado...</Text>
<Text style={styles.txtStyle}>
Não foi possível definir a sua localização. Ative o GPS e tente novamente.
</Text>
</View>
);
}
const styles = StyleSheet.create({
containter: {
flex: 1,
justifyContent: "center",
padding: 10,
},
icon:{
alignSelf:"center",
},
txtHeader: {
color: colors.primary,
fontSize: dimensions.text.header,
fontWeight: "bold",
textAlign: "center",
paddingBottom: 20,
},
txtStyle: {
fontSize: dimensions.text.secondary,
fontWeight: "bold",
textAlign: "center",
},
});

2
src/app/components/PickEventDateLocation.js

@ -19,7 +19,7 @@ export default function PickEventDateLocation({
<View <View
style={{ style={{
flex: 1, flex: 1,
paddingTop: 24,
paddingTop: 36,
paddingHorizontal: 16, paddingHorizontal: 16,
paddingBottom:24 paddingBottom:24
}} }}

5
src/app/screens/MapFeedScreen.js

@ -5,6 +5,7 @@ import attachFocusToQuery from "../hooks/useFocus";
import HeaderBarMenu from "../components/HeaderBarMenu"; import HeaderBarMenu from "../components/HeaderBarMenu";
import useSocketMarkers from "../hooks/useSocketMarkers"; import useSocketMarkers from "../hooks/useSocketMarkers";
import LoadingMarkersModal from "../components/LoadingMarkersModal"; import LoadingMarkersModal from "../components/LoadingMarkersModal";
import NoGPSError from "../components/NoGPSError";
export default function MapFeedScreen(props) { export default function MapFeedScreen(props) {
HeaderBarMenu(props.navigation); HeaderBarMenu(props.navigation);
@ -40,9 +41,7 @@ export default function MapFeedScreen(props) {
show={markers.markers.size <= 0}/> show={markers.markers.size <= 0}/>
</View> </View>
):( ):(
<View>
<Text>Apresentar um erro no futuro</Text>
</View>
<NoGPSError/>
) )
); );
} }

13
src/app/screens/PluviometerRegisterScreen.js

@ -36,7 +36,7 @@ function Institution({ user }) {
</Text> </Text>
</View> </View>
<Text style={[styles.label, { marginTop: 24 }]}>
<Text style={[styles.label, { marginTop: 24, marginBottom:16, }]}>
Nome da instituição: Nome da instituição:
</Text> </Text>
<View style={{ flexDirection: "row" }}> <View style={{ flexDirection: "row" }}>
@ -69,7 +69,7 @@ function LocationPicker({
<MaterialIcons name="location-on" size={30} color={colors.primary} /> <MaterialIcons name="location-on" size={30} color={colors.primary} />
{pluviometer && ( {pluviometer && (
<View style={{ flexDirection: "row", marginTop: 16 }}>
<View style={{ flexDirection: "row"}}>
<Text style={styles.subText}> <Text style={styles.subText}>
{pluviometer.address {pluviometer.address
? pluviometer.address ? pluviometer.address
@ -130,7 +130,7 @@ function PluvDateTimePicker({
pluviometer, pluviometer,
}) { }) {
return ( return (
<View style={{ height: 58 }}>
<View style={{ height: 48 }}>
{!pluviometer && ( {!pluviometer && (
<FormDatePicker <FormDatePicker
onDateChange={onDateChange} onDateChange={onDateChange}
@ -154,13 +154,11 @@ function PluvDateTimePicker({
size={30} size={30}
color={colors.primary} color={colors.primary}
/> />
<View style={styles.date}>
<Text style={styles.subTextDate}> <Text style={styles.subTextDate}>
{pluviometer.regiterDate {pluviometer.regiterDate
? pluviometer.regiterDate ? pluviometer.regiterDate
: "Erro ao carregar a data"} : "Erro ao carregar a data"}
</Text> </Text>
</View>
</View> </View>
)} )}
</View> </View>
@ -265,7 +263,7 @@ function PluviometerRegisterScreen(props) {
<Text style={styles.label}>Endereço do pluviômetro*: </Text> <Text style={styles.label}>Endereço do pluviômetro*: </Text>
<View marginBottom={24} marginTop={12}>
<View marginBottom={24} marginTop={16}>
<LocationPicker <LocationPicker
navigation={props.navigation} navigation={props.navigation}
location={location} location={location}
@ -289,7 +287,7 @@ function PluviometerRegisterScreen(props) {
const styles = StyleSheet.create({ const styles = StyleSheet.create({
label: { label: {
fontSize: dimensions.text.secondary, fontSize: dimensions.text.secondary,
marginBottom: 12,
// marginBottom: 12,
fontWeight: "bold", fontWeight: "bold",
textAlign: "left", textAlign: "left",
color: colors.secondary, color: colors.secondary,
@ -309,6 +307,7 @@ const styles = StyleSheet.create({
}, },
subTextDate: { subTextDate: {
color: colors.subText, color: colors.subText,
paddingLeft: 16,
fontSize: 16, fontSize: 16,
alignSelf: "center", alignSelf: "center",
fontWeight: "500", fontWeight: "500",

2
src/app/screens/PluviometerSharingDataScreen.js

@ -106,7 +106,7 @@ function PluviometerSharingDataScreen(props) {
increaseDecreaseButtons={true} increaseDecreaseButtons={true}
/> />
<FormImagePicker backgroundColor={colors.primary} name="images" />
{/* <FormImagePicker backgroundColor={colors.primary} name="images" /> */}
<PickEventDateLocation <PickEventDateLocation
date={date} date={date}

2
src/app/screens/RainSharingDataScreen.js

@ -175,7 +175,7 @@ function RainSharingDataScreen(props) {
<Text style={styles.error_txt}>Selecione o nível da chuva </Text> <Text style={styles.error_txt}>Selecione o nível da chuva </Text>
)} )}
<FormImagePicker backgroundColor={colors.primary} name="images" />
{/* <FormImagePicker backgroundColor={colors.primary} name="images" /> */}
<PickEventDateLocation <PickEventDateLocation
date={date} date={date}

3
src/app/screens/RiverFloodSharingDataScreen.js

@ -128,6 +128,7 @@ function RiverFloodSharingDataScreen(props) {
flexDirection="row" flexDirection="row"
justifyContent="center" justifyContent="center"
paddingBottom={16} paddingBottom={16}
> >
<View style={styles.imgs_row}> <View style={styles.imgs_row}>
<SvgLabeledButton <SvgLabeledButton
@ -181,7 +182,7 @@ function RiverFloodSharingDataScreen(props) {
<Text style={styles.error_txt}>Selecione o nível do rio</Text> <Text style={styles.error_txt}>Selecione o nível do rio</Text>
)} )}
<FormImagePicker backgroundColor={colors.primary} name="images" />
{/* <FormImagePicker backgroundColor={colors.primary} name="images" /> */}
<PickEventDateLocation <PickEventDateLocation
date={date} date={date}

2
src/app/screens/SharingFloodZonesScreen.js

@ -143,7 +143,7 @@ function SharingFloodZonesScreen(props) {
<Text style={styles.error_txt}>Selecione uma opção</Text> <Text style={styles.error_txt}>Selecione uma opção</Text>
)} )}
<FormImagePicker name="images" height={10} />
{/* <FormImagePicker name="images" height={10} /> */}
<PickEventDateLocation <PickEventDateLocation
date={date} date={date}

Loading…
Cancel
Save