|
@ -5,6 +5,10 @@ import colors from "../config/colors"; |
|
|
import Button from "../components/Button"; |
|
|
import Button from "../components/Button"; |
|
|
import { MaterialCommunityIcons } from "@expo/vector-icons"; |
|
|
import { MaterialCommunityIcons } from "@expo/vector-icons"; |
|
|
import { AuthContext } from "../auth/context"; |
|
|
import { AuthContext } from "../auth/context"; |
|
|
|
|
|
import authStorage from "../auth/storage"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
Form, |
|
|
Form, |
|
|
SubmitButton, |
|
|
SubmitButton, |
|
@ -13,6 +17,7 @@ import { |
|
|
} from "../components/forms"; |
|
|
} from "../components/forms"; |
|
|
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view"; |
|
|
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view"; |
|
|
import ConfirmationModal from "../components/ConfirmationModal"; |
|
|
import ConfirmationModal from "../components/ConfirmationModal"; |
|
|
|
|
|
import {userPersonalData} from "../api/auth"; |
|
|
|
|
|
|
|
|
function Header() { |
|
|
function Header() { |
|
|
return ( |
|
|
return ( |
|
@ -38,12 +43,20 @@ function Header() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function Institution({ user, institutionRole }) { |
|
|
function Institution({ user, institutionRole }) { |
|
|
|
|
|
var institutionMap = { |
|
|
|
|
|
E: "Escola", |
|
|
|
|
|
D: "Defesa Civil", |
|
|
|
|
|
N: "Não governamental", |
|
|
|
|
|
O: "Outra", |
|
|
|
|
|
N: "Nenhuma" |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<View style={{ marginTop: 24, marginBottom: 24 }}> |
|
|
<View style={{ marginTop: 24, marginBottom: 24 }}> |
|
|
<Text style={styles.label}>Tippo de instituição: </Text> |
|
|
<Text style={styles.label}>Tippo de instituição: </Text> |
|
|
<View style={{ flexDirection: "row" }}> |
|
|
<View style={{ flexDirection: "row" }}> |
|
|
<MaterialCommunityIcons name="bank" size={30} color={colors.primary} /> |
|
|
<MaterialCommunityIcons name="bank" size={30} color={colors.primary} /> |
|
|
<Text style={styles.subText}>{user.institutionType}</Text> |
|
|
|
|
|
|
|
|
<Text style={styles.subText}>{institutionMap[user.institutiontype]}</Text> |
|
|
</View> |
|
|
</View> |
|
|
|
|
|
|
|
|
<Text style={[styles.label, { marginTop: 24 }]}> |
|
|
<Text style={[styles.label, { marginTop: 24 }]}> |
|
@ -51,7 +64,7 @@ function Institution({ user, institutionRole }) { |
|
|
</Text> |
|
|
</Text> |
|
|
<View style={{ flexDirection: "row" }}> |
|
|
<View style={{ flexDirection: "row" }}> |
|
|
<MaterialCommunityIcons name="bank" size={30} color={colors.primary} /> |
|
|
<MaterialCommunityIcons name="bank" size={30} color={colors.primary} /> |
|
|
<Text style={styles.subText}>{user.institutionName}</Text> |
|
|
|
|
|
|
|
|
<Text style={styles.subText}>{user.institution}</Text> |
|
|
</View> |
|
|
</View> |
|
|
|
|
|
|
|
|
<Text style={[styles.label, { marginTop: 24 }]}> |
|
|
<Text style={[styles.label, { marginTop: 24 }]}> |
|
|