diff --git a/src/app/screens/RegisterScreen.js b/src/app/screens/RegisterScreen.js
index 32002ff..9367143 100644
--- a/src/app/screens/RegisterScreen.js
+++ b/src/app/screens/RegisterScreen.js
@@ -8,10 +8,18 @@ import React, { useState } from "react";
import { StyleSheet, View, Text, TouchableNativeFeedback } from "react-native";
import Screen from "../components/Screen";
import { dimensions } from "../config/dimensions";
+import {
+ FontAwesome5,
+ FontAwesome,
+ MaterialCommunityIcons,
+} from "@expo/vector-icons";
import colors from "../config/colors";
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
-import assets from "../config/assets";
import * as Yup from "yup";
+import FormDatePicker from "../components/forms/FormDatePicker";
+import moment from "moment";
+import { Shadow } from "react-native-shadow-2";
+import SearchablePicker from "../components/SearchablePicker";
const phoneRegex = RegExp(
/^\(?[\(]?([0-9]{2})?\)?[)\b]?([0-9]{4,5})[-. ]?([0-9]{4})$/
@@ -32,9 +40,96 @@ const validationSchema = Yup.object().shape({
.required("A senha é obrigatória")
.min(8, "Senha muito curta, minimo 8 caracteres")
.matches(/[a-zA-Z]/, "A senha só pode conter letras"),
+ state: Yup.string().required("O estado é obrigatório"),
});
+function LocalDatePicker({ date, setDate, _moment }) {
+ const formatDate = () => date.format("DD/MM/YYYY");
+
+ return (
+
+ setDate(value)}
+ minimumDate={new Date(moment().subtract(110, "year"))}
+ date={date}
+ >
+
+
+
+
+ {date != _moment
+ ? formatDate()
+ : "Selecione a data de nascimento"}
+
+
+
+
+
+
+ );
+}
+
+function GenderPicker({ value, setValue }) {
+ const [items, setItems] = useState([
+ { value: "Feminino", label: "Feminino" },
+ { value: "Masculino", label: "Masculino" },
+ { value: "Prefiro não dizer", label: "Prefiro não dizer" },
+ ]);
+ return (
+
+ );
+}
+
+function StatePicker({ value, setValue }) {
+ const [items, setItems] = useState([{value: "a", label: "a"}]);
+ return (
+
+ );
+}
+
export default function RegisterScreen(props) {
+ const [gender, setGender] = useState("");
+ const [state, setState] = useState("")
+
+ const _moment = moment();
+ const [date, setDate] = useState(_moment);
const [singUpFailed, setSingUpFailed] = useState(false);
const comparePassword = (password, confirmPassword) => {
@@ -53,6 +148,8 @@ export default function RegisterScreen(props) {
number: "",
password: "",
confirmPassword: "",
+ state: "",
+ gender: "",
}}
onSubmit={({ name, number, password, confirmPassword }) => {
comparePassword(password, confirmPassword);
@@ -61,78 +158,133 @@ export default function RegisterScreen(props) {
validationSchema={validationSchema}
>
-
-
+ Apelido de usuário*
+
+
+
+
+
+
+ Número do telefone:*
+
+
+
+
+
+ Senha:*
+
+
+
+
+
+ Confirmar senha:*
+
+
+
+
+
-
-
-
-
- Nome Completo:
-
-
-
- Número do telefone:
-
-
-
- Senha:
-
-
-
- Confirmar senha:
-
-
- Data de nascimento
+
+
+
+
- Gênero:
+
+
+
+
- {
- props.navigation.goBack();
- }}
- >
-
- Já tem uma conta?
- Faça Login
-
-
-
-
+ Estado*:
+
+
+
+
+
+
+
+
+
+ {
+ props.navigation.goBack();
+ }}
+ >
+
+ Já tem uma conta?
+ Faça Login
+
+
+
@@ -144,13 +296,26 @@ const styles = StyleSheet.create({
flex: 1,
justifyContent: "center",
textAlign: "center",
- padding: 10,
+ paddingHorizontal: 10,
},
labelStyle: {
fontSize: dimensions.text.secondary,
fontWeight: "bold",
textAlign: "left",
- color: colors.lightBlue,
+ color: colors.secondary,
marginTop: 10,
},
+ iconField: {
+ width: "100%",
+ flex: 1,
+ alignItems: "center",
+ flexDirection: "row",
+ marginTop: 12,
+ marginBottom: 24,
+ },
+ dateInput: {
+ paddingLeft: 12,
+ // flexDirection: "column",
+ // justifyContent: "center",
+ },
});