Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cronograma funcionando #18

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
MUITAS MUDANÇAS
annacarolinaf committed Oct 6, 2024
commit 6c141fa70a2e39765b63a79109d341b378209b7e
Binary file removed assets/credential-bg.png
Binary file not shown.
Binary file removed assets/credential-bg2.png
Binary file not shown.
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -32,13 +32,15 @@
"react-dom": "18.2.0",
"react-native": "0.74.1",
"react-native-camera": "^4.2.1",
"react-native-linear-gradient": "^2.8.3",
"react-native-permissions": "^4.1.5",
"react-native-qrcode-scanner": "^1.5.5",
"react-native-safe-area-context": "^4.10.3",
"react-native-screens": "^3.31.1",
"react-native-snap-carousel": "^3.9.1",
"react-native-web": "~0.19.6",
"react-responsive-carousel": "^3.2.23"
"react-responsive-carousel": "^3.2.23",
"expo-linear-gradient": "~13.0.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
4 changes: 2 additions & 2 deletions src/components/button.tsx
Original file line number Diff line number Diff line change
@@ -10,12 +10,12 @@ export function Button({ title, isLoading = false, ...rest }: Props) {
<TouchableOpacity
disabled={isLoading}
activeOpacity={0.7}
className="w-full h-14 bg-white items-center justify-center rounded-lg"
className="w-full h-14 bg-white items-center justify-center rounded-lg outline-none"
{...rest}
>

{isLoading ? (<ActivityIndicator className="text-blue" />) : (
<Text className="text-blue text-base font-bold uppercase">
<Text className="text-blue text-base font-bold uppercase outline-none">
{title}
</Text>)
}
2 changes: 1 addition & 1 deletion src/components/buttonHome.tsx
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ export function ButtonHome ({title, isLoading = false, ...rest}: Props){
<TouchableOpacity
disabled={isLoading}
activeOpacity={0.7}
className="w-5/6 h-14 bg-blue items-center justify-center rounded-lg"
className="w-5/6 h-14 bg-blue items-center justify-center rounded-lg outline-none"
{...rest}
>

33 changes: 16 additions & 17 deletions src/components/myEvent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import { View, Text, TouchableOpacity, SafeAreaView } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { Platform, StyleSheet } from "react-native";

@@ -17,25 +17,24 @@ export default function MyEvent({ scheduleItem, onClick }: ScheduleItemComponent
const eventTime = scheduleItem.data ? scheduleItem.data.substring(11, 16) : 'Horário não disponível';

return (
<TouchableOpacity onPress={onClick}>
<View className='flex flex-col justify-start bg-white rounded-2xl' style={isIos ? [styles.shadowProp] : [styles.elevation]}>
<View className="p-4">
<View className='pb-2'>
<Text className='text-blue text-xl font-bold'>{eventDate}</Text>
</View>
<View className=''>
<View className='flex-row items-center pb-1'>
<Ionicons name="calendar-clear-outline" size={24} color="#445BE6" />
<Text className='pl-2'>{scheduleItem.nome}</Text>
</View>
<View className='flex-row items-center pb-1'>
<Ionicons name="time-outline" size={24} color="#445BE6" />
<Text className='pl-2'>{eventTime}</Text>
<SafeAreaView>
<TouchableOpacity onPress={onClick}>
<View className='flex flex-col justify-start bg-white rounded-2xl' style={isIos ? [styles.shadowProp] : [styles.elevation]}>
<View className="p-4">
<View className=''>
<View className='flex-row items-center pb-1'>
<Ionicons name="calendar-clear-outline" size={24} color="#445BE6" />
<Text className='pl-2 mr-2'>{scheduleItem.nome}</Text>
</View>
<View className='flex-row items-center pb-1'>
<Ionicons name="time-outline" size={24} color="#445BE6" />
<Text className='pl-2'>{eventTime}</Text>
</View>
</View>
</View>
</View>
</View>
</TouchableOpacity>
</TouchableOpacity>
</SafeAreaView>
)
}

30 changes: 17 additions & 13 deletions src/components/scheduleItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {View, Text, Button, TouchableHighlight, TouchableOpacity} from 'react-native';
import { View, Text, Button, SafeAreaView, TouchableOpacity } from 'react-native';
import { ScheduleItemProps } from '../entities/schedule-item';

type ScheduleItemComponentProps = {
@@ -8,19 +8,23 @@ type ScheduleItemComponentProps = {
}

// Componente de ítens do cronogramam, pode ser mudado depois para aceitar mais informações
export default function ScheduleItemComponent({scheduleItem, onClick}: ScheduleItemComponentProps) {
export default function ScheduleItemComponent({ scheduleItem, onClick }: ScheduleItemComponentProps) {
return (
<TouchableOpacity onPress={onClick}>
<View className='flex flex-row justify-start min-w-full items-center p-4 rounded-md bg-blue'>
<View className='pl-8 pr-4'>
<Text className='text-white font-bold'>{scheduleItem.data.substring(11, 16)}</Text>
<SafeAreaView>
<TouchableOpacity onPress={onClick} >
<View className='flex flex-row justify-start min-w-full items-center p-4 rounded-md bg-neutral-200/50'>
<View className='pl-8 pr-4'>
<Text className='text-blue font-bold'>{scheduleItem.data.substring(11, 16)}</Text>
</View>
<View className='pl-4 pr-8 max-w-[70%]'>
<Text className='text-blue font-bold min-w-full'>{scheduleItem.nome}</Text>
<Text className='text-black'>{scheduleItem.palestranteNome}</Text>
{/* <Text className='text-white'>{scheduleItem.detalhes}</Text> */}
</View>
</View>
<View className='pl-4 pr-8 max-w-[80%]'>
<Text className='text-white font-bold'>{scheduleItem.nome}</Text>
<Text className='text-white'>{scheduleItem.palestranteNome}</Text>
{/* <Text className='text-white'>{scheduleItem.detalhes}</Text> */}
</View>
</View>
</TouchableOpacity>
</TouchableOpacity>
</SafeAreaView>

)

}
23 changes: 14 additions & 9 deletions src/routes/tab.routes.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Entypo, MaterialIcons, Ionicons, FontAwesome6, Feather } from '@expo/vector-icons';

import {Schedule, UserHome, AdminHome } from '../screens';
import { MaterialCommunityIcons, Ionicons } from '@expo/vector-icons';
import { View, Text } from "react-native"
import { Schedule, UserHome, AdminHome } from '../screens';

import { colors } from "../styles/colors"
import { useAuth } from "../hooks/AuthContext";
@@ -23,16 +23,20 @@ export default function TabRoutes() {
borderTopWidth: 0,
height: 60,
},
tabBarShowLabel: false
tabBarShowLabel: false,
title: "SECOMP UFSCar 2024"
}}>

{
{
user.tipo == 'USER' ? <Tab.Screen
name="HOME"
component={UserHome}
options={{
tabBarIcon: ({ focused }) => (
<Ionicons name={focused ? "home" : "home-outline"} size={28} color={colors.white} />
<View className={`flex justify-center items-center ${focused ? "font-bold" : "font-normal"}`}>
<Ionicons name={focused ? "home" : "home-outline"} size={28} color={colors.white} />
<Text className='text-center text-white'>Home</Text>
</View>
),
}}
/> : <Tab.Screen
@@ -51,7 +55,10 @@ export default function TabRoutes() {
component={Schedule}
options={{
tabBarIcon: ({ focused }) => (
<Ionicons name={focused ? "list" : "list-outline"} size={28} color={colors.white} />
<View className={`flex justify-center items-center ${focused ? "font-bold" : "font-normal"}`}>
<Ionicons name={focused ? "calendar-clear" : "calendar-clear-outline"} size={28} color={colors.white} />
<Text className='text-center text-white'>Cronograma</Text>
</View>
),

}}
@@ -60,5 +67,3 @@ export default function TabRoutes() {
</Tab.Navigator>
);
}


13 changes: 7 additions & 6 deletions src/screens/credentialScreen.tsx
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@ import { SafeAreaView, Text, Image, TouchableOpacity, View, ImageBackground, Mod
import { ParamListBase, useNavigation } from "@react-navigation/native"
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useAuth } from "../hooks/AuthContext";
import { LinearGradient } from 'expo-linear-gradient';


export default function Credential() {
const [modalVisible, setModalVisible] = useState(false);
@@ -21,7 +23,7 @@ export default function Credential() {

<View className='w-full h-[68%] items-center flex-col rounded-3xl relative overflow-hidden'>
<View className='w-full h-[100%]'>
<ImageBackground source={require("../../assets/credential.png")} resizeMode='cover' className='w-full h-full object-center max-w-full max-h-full'>
<View className='w-full h-full bg-blue'>
<View className='w-full h-20 px-10 py-7 flex-row'>
<View className='w-1/2 h-full items-start'>
<Text className='text-xs text-white font-extrabold'> SECOMP XII</Text>
@@ -33,16 +35,14 @@ export default function Credential() {
</View>

<View className='w-40 h-40 mx-10 mt-1 self-end'>

<Image
source={{ uri: user.qrCode }}
resizeMode="cover"
className='w-full h-full max-w-full max-h-full object-cover' />
</View>


<View className='w-full h-[53%] flex-col py-20 space-y-1'>
<Text className='text-5xl font-bold text-white' allowFontScaling={false}> {user.nome} </Text>
<Text className='text-5xl font-bold text-white text-center' allowFontScaling={false}> {user.nome} </Text>
</View>

<View className='w-full h-[20%] items-center px-1 self-center absolute bottom-10 z-10'>
@@ -52,7 +52,8 @@ export default function Credential() {
className='w-45 h-full object-cover'
/>
</View>
</ImageBackground>
</View>

</View>

<View className='w-24 h-10 absolute top-0 bg-black' />
@@ -80,7 +81,7 @@ export default function Credential() {
</Modal>
</View>



<View className='w-screen h-28 px-5 pt-8 items-center flex-row bg-neutral-700/40 absolute top-0 border-b border-neutral-300/20'>
<View className='w-[15%] h-full items-center justify-center'>
Loading