Skip to content

Commit

Permalink
alteração nos estilos das telas
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroSorriso committed Nov 18, 2024
1 parent c650e14 commit e301ca7
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 43 deletions.
35 changes: 21 additions & 14 deletions frontend/app/(agenda)/agendamento.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ export default function Agendamento() {
rules={{ required: 'Serviço é um campo obrigatório' }}
defaultValue={async () => {
if (parsedIdServico) {
return await ServicoService.getServic oById().then((response)=>{
return await ServicoService.getServicoById().then((response)=>{
setValue('servico',response.descricao)
setServicos(response)
})
})
}
return ''
}}
Expand All @@ -164,21 +164,24 @@ export default function Agendamento() {
/>
{errors.servico && <Text style={styles.errorText}>{errors.servico.message?.toString()}</Text>}

<View style={styles.dataTempo}>
<DateInput
control={control}
name="data"
label="Data de Agendamento"
/>


<DateInput
control={control}
name="data"
label="Data de Agendamento"
/>
{errors.data && <Text style={styles.errorText}>{errors.data.message}</Text>}

{errors.data && <Text style={styles.errorText}>{errors.data.message}</Text>}
<TimeInput
control={control}
name="hora"
label="Escolha um horário para atendimento"
/>
{errors.hora && <Text style={styles.errorText}>{errors.hora.message}</Text>}

<TimeInput
control={control}
name="hora"
label="Escolha um horário para atendimento"
/>
{errors.hora && <Text style={styles.errorText}>{errors.hora.message}</Text>}
</View>

<Controller
control={control}
Expand Down Expand Up @@ -267,4 +270,8 @@ const styles = StyleSheet.create({
backIcon: {
paddingRight: 15,
},
dataTempo:{
paddingRight:25,
paddingLeft:3
}
});
15 changes: 14 additions & 1 deletion frontend/app/(servico)/criaservico.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ import { Picker } from '@react-native-picker/picker';
import ServicoService from '../../service/ServicoService'
import { Setor } from '@/constants/SetorEnum';
import { router } from 'expo-router';
import { TouchableOpacity } from 'react-native-gesture-handler';


const usuarioLogado = { id: 1, nome: 'p' };
const usuarioLogado = { id: 1, nome: 'Usuário' };
const perfilClick =()=>{
router.navigate('/(tabs)/perfil');
};


type criarServicoForm = {
servico: string;
Expand Down Expand Up @@ -96,6 +101,11 @@ export default function criaServico() {
<SafeAreaView style={estilos.container}>
<View style={estilos.header}>
<View style={estilos.userText}>
<TouchableOpacity onPress={perfilClick}>
<Ionicons name="arrow-back-outline" size={30} style={estilos.backIcon}
color="white"
/>
</TouchableOpacity>
<Ionicons name="person-circle-outline" size={35} color="white" />
<Text style={estilos.userName}>{usuarioLogado.nome}</Text>
</View>
Expand Down Expand Up @@ -275,4 +285,7 @@ const estilos = StyleSheet.create({
left: 15,
top: 15,
},
backIcon: {
paddingRight: 15,
},
});
51 changes: 28 additions & 23 deletions frontend/app/(servico)/prestador.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import UsuarioService from '../../service/UsuarioService'

const Prestadores = () => {
const [prestadores, setPrestadores] = useState([]);
const [nomeUsuario, setNomeUsuario] = useState('Usuário');
const [setores, setSetor] = useState([]);
const navigation = useNavigation();

Expand Down Expand Up @@ -36,15 +37,20 @@ const Prestadores = () => {
};
return (
<View style={styles.container}>
<View style={styles.topoTela}>
<View style={styles.header}>
<View style={styles.userText}>
<TouchableOpacity onPress={inicioClick}>
<Ionicons name="arrow-back-outline" size={30} color="white" />
</TouchableOpacity>
<View style={styles.centralTitulo}>
<Ionicons name="bag-handle-outline" size={35} color="white" />
<Text style={styles.userName}>Prestadores</Text>
<Ionicons name="arrow-back-outline" size={30} style={styles.backIcon}
color="white"
/>
</TouchableOpacity>
<Ionicons name="person-circle-outline" size={35} color="white" />
<Text style={styles.userName}>{nomeUsuario}</Text>
</View>
</View>

<Text style={styles.title}>Prestador</Text>

<ScrollView>
{prestadores.map((prestador: any) => (
<View style={styles.header} key={prestador.id}>
Expand Down Expand Up @@ -72,16 +78,14 @@ const Prestadores = () => {
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
backgroundColor: '#f5f5f5',
},
topoTela: {
backgroundColor: '#FBCB1C',
backgroundColor: '#FFD700',
borderBottomLeftRadius: 20,
borderBottomRightRadius: 20,
padding: 25,
marginBottom: 20,
flexDirection: 'row',
justifyContent: 'center',
},
userText: {
flexDirection: 'row',
Expand All @@ -94,13 +98,11 @@ const styles = StyleSheet.create({
marginLeft: 15,
},
header: {
backgroundColor: '#D9D9D9',
flexDirection: 'column',
justifyContent: 'space-around',
padding: 19,
height: 120,
margin: 4,
borderRadius: 10,
backgroundColor: '#FBCB1C',
borderBottomLeftRadius: 20,
borderBottomRightRadius: 20,
padding: 25,
marginBottom: 20,
},
imagem: {
flexDirection: 'row',
Expand Down Expand Up @@ -136,11 +138,14 @@ const styles = StyleSheet.create({
borderWidth: 1,
alignItems: 'center'
},
centralTitulo: {
margin: 'auto',
flexDirection: 'row',
//alignItems:'center',
//justifyContent:'center'
}
backIcon: {
paddingRight: 15,
},
title: {
fontSize: 22,
fontWeight: 'bold',
alignSelf: 'center',
marginBottom: 20,
},
});
export default Prestadores;
6 changes: 3 additions & 3 deletions frontend/app/(tabs)/agenda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type AgendamentoForm = {
anotacao: string;
};

const prestadorClick = () => {
router.navigate('/(servico)/prestador')
const inicioClick = () => {
router.navigate('/(tabs)/inicio')

}

Expand Down Expand Up @@ -58,7 +58,7 @@ const AgendaScreen = () => {
<StatusBar hidden />
<View style={styles.header}>
<View style={styles.userText}>
<Pressable onPress={prestadorClick}>
<Pressable onPress={inicioClick}>
<Ionicons name="arrow-back-outline" size={30} style={styles.backIcon}
color="white"
/>
Expand Down
7 changes: 6 additions & 1 deletion frontend/app/(tabs)/perfil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import { Text, SafeAreaView, StyleSheet, View, Image, ScrollView, StatusBar, Pre
import Icon from 'react-native-vector-icons/MaterialIcons';

const Perfil = () => {

const loginClick = () => {
router.navigate ('/(auth)/login');
};

return (
<SafeAreaView style={styles.container}>
<StatusBar hidden />
Expand Down Expand Up @@ -65,7 +70,7 @@ const Perfil = () => {
<Ionicons name="chevron-forward" size={20} color="black" />
</Pressable>

<Pressable style={styles.menuItem}>
<Pressable style={styles.menuItem} onPress={loginClick}>
<Icon name="logout" size={24} color="black" />
<Text style={styles.menuText}>Sair</Text>
<Ionicons name="chevron-forward" size={20} color="black" />
Expand Down
6 changes: 5 additions & 1 deletion frontend/components/AutocompleteInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const AutocompleteInput: React.FC<AutocompleteInputProps> = ({
);

return (
<View>
<View style={styles.posicao}>
<TextInput
style={styles.input}
placeholder={placeholder}
Expand Down Expand Up @@ -82,4 +82,8 @@ const styles = StyleSheet.create({
borderColor: '#EEE',
backgroundColor: '#FFF',
},
posicao:{
paddingLeft:3,
paddingRight:5
}
});

0 comments on commit e301ca7

Please sign in to comment.