fix fetch lista de invitados
This commit is contained in:
parent
c0adddd2ce
commit
8ef998a771
|
@ -56,7 +56,7 @@ function HomeTabGuarda({ route }) {
|
||||||
backgroundColor: "#D7A86E"
|
backgroundColor: "#D7A86E"
|
||||||
}, tabBarIcon: () => (<Icon mb="2" as={<MaterialCommunityIcons name={selected === 0 ? 'home' : 'home-outline'} />} color="#D7A86E" size="md" />)}} onclick={() => setSelected(0)}
|
}, tabBarIcon: () => (<Icon mb="2" as={<MaterialCommunityIcons name={selected === 0 ? 'home' : 'home-outline'} />} color="#D7A86E" size="md" />)}} onclick={() => setSelected(0)}
|
||||||
/>
|
/>
|
||||||
<Tab.Screen name="Mis Invitados" component={Invitados} initialParams={user} options={{headerStyle: {
|
<Tab.Screen name="Lista De Invitados" component={Invitados} initialParams={user} options={{headerStyle: {
|
||||||
backgroundColor: "#D7A86E"
|
backgroundColor: "#D7A86E"
|
||||||
}, tabBarIcon: () => (<Icon mb="2" as={<MaterialCommunityIcons name={selected === 1 ? 'contacts' : 'contacts-outline'} />} color="#D7A86E" size="md" />)} } onclick={() => setSelected(1)} />
|
}, tabBarIcon: () => (<Icon mb="2" as={<MaterialCommunityIcons name={selected === 1 ? 'contacts' : 'contacts-outline'} />} color="#D7A86E" size="md" />)} } onclick={() => setSelected(1)} />
|
||||||
<Tab.Screen name="Mi Perfil" component={Profile} initialParams={user} options={{headerStyle: {
|
<Tab.Screen name="Mi Perfil" component={Profile} initialParams={user} options={{headerStyle: {
|
||||||
|
|
|
@ -149,7 +149,7 @@ export default function AreaComun({navigation}){
|
||||||
<FormControl isRequired>
|
<FormControl isRequired>
|
||||||
<FormControl.Label>Hora de inicio</FormControl.Label>
|
<FormControl.Label>Hora de inicio</FormControl.Label>
|
||||||
<View >
|
<View >
|
||||||
<DateTimePicker minimumDate={date} mode="datetime" is24Hour value={time} onChange={onChangeStart}/>
|
<DateTimePicker minimumDate={date} mode="datetime" is24Hour={true} value={time} onChange={onChangeStart}/>
|
||||||
</View>
|
</View>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default function Invitados({navigation}) {
|
||||||
setIsRequesting(true);
|
setIsRequesting(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(user_type=="4"){
|
if(user_type=="3"){
|
||||||
const jsonResponse = await fetch(`${API.BASE_URL}/guest/findGuestCommunity/`+`${community_id}`, {
|
const jsonResponse = await fetch(`${API.BASE_URL}/guest/findGuestCommunity/`+`${community_id}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -37,7 +37,7 @@ export default function Invitados({navigation}) {
|
||||||
|
|
||||||
const response = await jsonResponse.json();
|
const response = await jsonResponse.json();
|
||||||
setInvitados(response.message);
|
setInvitados(response.message);
|
||||||
}else{
|
}else if(user_type=="4"){
|
||||||
const jsonResponse = await fetch(`${API.BASE_URL}/guest/findGuestUser/`+`${id}`, {
|
const jsonResponse = await fetch(`${API.BASE_URL}/guest/findGuestUser/`+`${id}`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Reference in New Issue