diff --git a/src/app/screens/PluviometerRegisterScreen.js b/src/app/screens/PluviometerRegisterScreen.js index 864d8a8..6c5e98d 100644 --- a/src/app/screens/PluviometerRegisterScreen.js +++ b/src/app/screens/PluviometerRegisterScreen.js @@ -16,12 +16,24 @@ import { AssembleIngestionPluvRegistration } from "../components/forms/AssembleI const dims = scaleDimsFromWidth(85, 85, 25); function Institution({ user }) { + const institutionMap = { + E: "Escola", + D: "Defesa Civil", + N: "Não governamental", + O: "Outra", + N: "Nenhuma", + }; + return ( - - Tippo de instituição: + + Tipo de instituição: - {user.institutionType} + + {user.institutiontype + ? institutionMap[user.institutiontype] + : "Tipo de instituição não informado"} + @@ -29,7 +41,11 @@ function Institution({ user }) { - {user.institutionName} + + {user.institution + ? user.institution + : "Nome da instituição não informado"} + ); @@ -125,61 +141,54 @@ function PluviometerRegisterScreen(props) { type: "success", onPress: () => {}, }); - + props.navigation.navigate("Home"); - } - else{ + } else { showMessage({ - message: "Erro ao cadastrar pluviômetro. Por favor, tente mais tarde!", + message: + "Erro ao cadastrar pluviômetro. Por favor, tente mais tarde!", duration: 1950, icon: "danger", type: "danger", onPress: () => {}, }); - } }} > Cadastro do Pluviômetro - - - Data do cadastro:{" "} - + {/* */} + {/* Data do cadastro: */} + {/* */} - - setDate(value)} - onTimeChange={(value) => setTime(value)} - date={date} - time={time} - formTypeFace={"pluviometerRegister"} - /> - - + {/* setDate(value)} */} + {/* onTimeChange={(value) => setTime(value)} */} + {/* date={date} */} + {/* time={time} */} + {/* formTypeFace={"pluviometerRegister"} */} + {/* /> */} Endereço do pluviômetro*: - - {user.institutionType && } + + + + @@ -209,6 +218,7 @@ const styles = StyleSheet.create({ paddingLeft: 16, }, title: { + marginVertical: 24, fontSize: 18, fontWeight: "bold", textAlign: "center",