From b1e36399e31614609bdf4530db9a7b12bf667202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B4nio=20Agnolin?= Date: Fri, 15 Nov 2024 22:56:31 -0300 Subject: [PATCH] =?UTF-8?q?altera=C3=A7=C3=B5es=20do=20Pedro=20e=20outras?= =?UTF-8?q?=20corre=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/app/(servico)/prestador.tsx | 61 ++++---- frontend/app/(servico)/servicoprestador.tsx | 153 ++++++++++++-------- 2 files changed, 119 insertions(+), 95 deletions(-) diff --git a/frontend/app/(servico)/prestador.tsx b/frontend/app/(servico)/prestador.tsx index 3cce2d02..0a27ef4f 100644 --- a/frontend/app/(servico)/prestador.tsx +++ b/frontend/app/(servico)/prestador.tsx @@ -5,7 +5,6 @@ import { router, useNavigation } from 'expo-router'; import SetorService from '../../service/SetorService' import UsuarioService from '../../service/UsuarioService' - const Prestadores = () => { const [prestadores, setPrestadores] = useState([]); const [setores, setSetor] = useState([]); @@ -35,37 +34,36 @@ const Prestadores = () => { }; return( - - - - - - - Prestadores + + + + + + + Prestadores + + + + {prestadores.map(prestador => ( + + + + + Nome: {prestador.nome} + + {setores.find(setor => setor.id_prestador === prestador.id)?.titulo || 'Setor não disponível'} + + - - - {prestadores.map(prestador => ( - - - - - Nome: {prestador.nome} - - {/* Procurar o serviço correspondente e exibir o título */} - {setores.find(setor => setor.id_prestador === prestador.id)?.titulo || 'Setor não disponível'} - - - - - - Serviços - - + + + Serviços - ))} - - + + + ))} + + ); }; @@ -139,8 +137,7 @@ const styles = StyleSheet.create({ centralTitulo:{ margin:'auto', flexDirection:'row', - //alignItems:'center', - //justifyContent:'center' } }); + export default Prestadores; \ No newline at end of file diff --git a/frontend/app/(servico)/servicoprestador.tsx b/frontend/app/(servico)/servicoprestador.tsx index d37c8b41..ee40967d 100644 --- a/frontend/app/(servico)/servicoprestador.tsx +++ b/frontend/app/(servico)/servicoprestador.tsx @@ -1,80 +1,107 @@ import { Ionicons } from "@expo/vector-icons"; -import { View,Text, TouchableOpacity } from "react-native"; +import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from "react-native"; import React from "react"; -import { StyleSheet } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import { router } from 'expo-router'; -import { Pressable } from "react-native"; -const servicoPrestador = () => { +const ServicoPrestador = () => { -const prestadorClick = ()=>{ - router.navigate('/(servico)/prestador') -} - -const tiposServicos = [ - - { id: '1', servico: 'Manutenção Geral de Jardins' }, - { id: '2', servico: 'Paisagismo' }, - { id: '3', servico: 'Poda de Árvores e Arbustos' }, - { id: '4', servico: 'Instalação de Sistemas de Irrigação' }, - { id: '5', servico: 'Preparação do Solo' }, - { id: '6', servico: 'Instalação de Grama e Tapetes Verdes' }, + const prestadorClick = () => { + router.navigate('/(servico)/prestador'); + } -] - return( - - - - - - - - - - Serviços do Prestadores - - + const agendamentoClick = () => { + router.navigate('/(agenda)/agendamento'); + } + + const tiposServicos = [ + { id: '1', servico: 'Manutenção Geral de Jardins' }, + { id: '2', servico: 'Paisagismo' }, + { id: '3', servico: 'Poda de Árvores e Arbustos' }, + { id: '4', servico: 'Instalação de Sistemas de Irrigação' }, + { id: '5', servico: 'Preparação do Solo' }, + { id: '6', servico: 'Instalação de Grama e Tapetes Verdes' }, + ]; - + const nomePrestador = [ + { id: '1', nome: 'Pedro' }, + { id: '2', nome: 'Rafael' }, + ]; + + return ( + + + + + + + + Serviços do Prestador + - + {nomePrestador.map((nome) => ( + + {nome.nome} + + ))} + + {tiposServicos.map((tipos, index) => ( + + + + {index + 1} - Serviço {tipos.servico} + + + + ))} + + ); }; const styles = StyleSheet.create({ -container:{ - flex: 1, - // padding: 16, - backgroundColor:'white', - - -}, -topoTela:{ - backgroundColor: '#FBCB1C', - borderBottomLeftRadius: 20, - borderBottomRightRadius: 20, - padding: 25, - marginBottom: 20, - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'center', -}, -centralTitulo:{ - margin:'auto', - flexDirection:'row', - alignItems:'center', - justifyContent:'center' -}, -userName: { - color: 'white', - fontSize: 20, - fontWeight: 'bold', - marginLeft: 15, -}, - + container: { + flex: 1, + backgroundColor: 'white', + }, + topoTela: { + backgroundColor: '#FBCB1C', + borderBottomLeftRadius: 20, + borderBottomRightRadius: 20, + padding: 25, + marginBottom: 20, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + }, + centralTitulo: { + margin: 'auto', + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + }, + userName: { + color: 'white', + fontSize: 20, + fontWeight: 'bold', + marginLeft: 15, + }, + tipoServicos: { + backgroundColor: '#f0f0f0', + margin: 4, + padding: 19, + }, + textoServico: { + fontWeight: 'bold', + }, + titulo: { + fontWeight: 'bold', + alignItems: 'center', + fontSize: 20, + }, }); -export default servicoPrestador; \ No newline at end of file + +export default ServicoPrestador;