|
@ -7,25 +7,16 @@ import FormImagePicker from "../components/forms/FormImagePicker"; |
|
|
import useLocation from "../hooks/useLocation"; |
|
|
import useLocation from "../hooks/useLocation"; |
|
|
import colors from "../config/colors"; |
|
|
import colors from "../config/colors"; |
|
|
import { scaleDimsFromWidth, dimensions } from "../config/dimensions"; |
|
|
import { scaleDimsFromWidth, dimensions } from "../config/dimensions"; |
|
|
import { |
|
|
|
|
|
TouchableNativeFeedback, |
|
|
|
|
|
TouchableOpacity, |
|
|
|
|
|
} from "react-native-gesture-handler"; |
|
|
|
|
|
|
|
|
import { TouchableNativeFeedback } from "react-native-gesture-handler"; |
|
|
import { insertFloodZone } from "../database/databaseLoader"; |
|
|
import { insertFloodZone } from "../database/databaseLoader"; |
|
|
import { showMessage } from "react-native-flash-message"; |
|
|
import { showMessage } from "react-native-flash-message"; |
|
|
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view"; |
|
|
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view"; |
|
|
import Screen from "../components/Screen"; |
|
|
import Screen from "../components/Screen"; |
|
|
import assets from "../config/assets"; |
|
|
import assets from "../config/assets"; |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
import FormDatePicker from "../components/forms/FormDatePicker"; |
|
|
|
|
|
import FormLocationPicker from "../components/forms/FormLocationPicker"; |
|
|
|
|
|
import { EventLocationContext } from "../context/EventLocationContext"; |
|
|
import { EventLocationContext } from "../context/EventLocationContext"; |
|
|
import PickEventDateLocation from "../components/PickEventDateLocation"; |
|
|
import PickEventDateLocation from "../components/PickEventDateLocation"; |
|
|
|
|
|
|
|
|
/*function submitForm(props) { |
|
|
|
|
|
console.log(props); |
|
|
|
|
|
insertFloodZone(props); |
|
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
import SvgLabeledButton from "../components/SvgLabeledButton"; |
|
|
|
|
|
|
|
|
const validationSchema = Yup.object().shape({ |
|
|
const validationSchema = Yup.object().shape({ |
|
|
images: Yup.array(), |
|
|
images: Yup.array(), |
|
@ -81,35 +72,20 @@ function SharingFloodZonesScreen(props) { |
|
|
validationSchema={validationSchema} |
|
|
validationSchema={validationSchema} |
|
|
> |
|
|
> |
|
|
<View style={styles.imgs_container}> |
|
|
<View style={styles.imgs_container}> |
|
|
<TouchableNativeFeedback onPress={() => setPassable(1)}> |
|
|
|
|
|
<View style={{paddingRight: 17}}> |
|
|
|
|
|
{passable == 1 ? ( |
|
|
|
|
|
<Image |
|
|
|
|
|
source={assets.floodZones.passable_toggle} |
|
|
|
|
|
style={styles.image} |
|
|
|
|
|
/> |
|
|
|
|
|
) : ( |
|
|
|
|
|
<Image |
|
|
|
|
|
style={styles.image} |
|
|
|
|
|
source={assets.floodZones.passable_2} |
|
|
|
|
|
|
|
|
<SvgLabeledButton |
|
|
|
|
|
style={{marginRight: 17}} |
|
|
|
|
|
label={"TRANSITÁVEL"} |
|
|
|
|
|
isToggle={passable == 1} |
|
|
|
|
|
SvgImage={assets.floodZones.passable} |
|
|
|
|
|
onPress={() => setPassable(1)} |
|
|
/> |
|
|
/> |
|
|
)} |
|
|
|
|
|
</View> |
|
|
|
|
|
</TouchableNativeFeedback> |
|
|
|
|
|
|
|
|
|
|
|
<TouchableNativeFeedback onPress={() => setPassable(0)}> |
|
|
|
|
|
{passable == 0 ? ( |
|
|
|
|
|
<Image |
|
|
|
|
|
source={assets.floodZones.notPassable_toggle} |
|
|
|
|
|
style={styles.image} |
|
|
|
|
|
/> |
|
|
|
|
|
) : ( |
|
|
|
|
|
<Image |
|
|
|
|
|
style={styles.image} |
|
|
|
|
|
source={assets.floodZones.notPassable2} |
|
|
|
|
|
|
|
|
<SvgLabeledButton |
|
|
|
|
|
onPress={() => setPassable(0)} |
|
|
|
|
|
label={"INTRANSITÁVEL"} |
|
|
|
|
|
isToggle={passable == 0} |
|
|
|
|
|
SvgImage={assets.floodZones.notPassable} |
|
|
/> |
|
|
/> |
|
|
)} |
|
|
|
|
|
</TouchableNativeFeedback> |
|
|
|
|
|
</View> |
|
|
</View> |
|
|
|
|
|
|
|
|
{error && passable == -1 && ( |
|
|
{error && passable == -1 && ( |
|
|