Browse Source

Fixing typo in ActivateInstitutionCode and enabling it back

master
GabrielTrettel 3 years ago
parent
commit
3cfb8815c4
  1. 2
      src/app/screens/AccountScreen.js
  2. 11
      src/app/screens/ActivateInstitutionCode.js

2
src/app/screens/AccountScreen.js

@ -124,7 +124,7 @@ function AccountScreen(props) {
{ {
icon: "bank", icon: "bank",
show: showActivation(), show: showActivation(),
show: false,
// show: true,
IconProvider: MaterialCommunityIcons, IconProvider: MaterialCommunityIcons,
title: "ATIVAR INSTITUIÇÃO", title: "ATIVAR INSTITUIÇÃO",
onPress: () => { onPress: () => {

11
src/app/screens/ActivateInstitutionCode.js

@ -56,11 +56,11 @@ function Institution({ user, institutionRole }) {
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}>Tipo 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}> <Text style={styles.subText}>
{institutionMap[user.institutiontype]}
{user.institutiontype ? institutionMap[user.institutiontype] : "Não informado"}
</Text> </Text>
</View> </View>
@ -69,7 +69,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.institution}</Text>
<Text style={styles.subText}>{user.institution ? user.institution : "Não informado"}</Text>
</View> </View>
<Text style={[styles.label, { marginTop: 24 }]}> <Text style={[styles.label, { marginTop: 24 }]}>
@ -87,9 +87,6 @@ function Institution({ user, institutionRole }) {
); );
} }
// 950ebd56-7acc-4b45-9366-23a0f814f3f2
// 1199990987
function ValidateCode({ user }) { function ValidateCode({ user }) {
return ( return (
@ -149,7 +146,7 @@ async function processOnSubmit(navigation, form, instRole, setShowLog) {
export default function ActivateInstitutionCode({ navigation }) { export default function ActivateInstitutionCode({ navigation }) {
const { user, _ } = useContext(AuthContext); const { user, _ } = useContext(AuthContext);
// FIXME: wpdAuth has errors while giving /me data for ROLE_INSTITUTION // FIXME: wpdAuth has errors while giving /me data for ROLE_INSTITUTION
user.role = "ROLE_CLIENT"
// user.role = "ROLE_CLIENT"
// console.log(user) // console.log(user)
const initialState = { show: false, message: true }; const initialState = { show: false, message: true };

Loading…
Cancel
Save