diff --git a/mobile-ui/components/AgregarInvitados.js b/mobile-ui/components/AgregarInvitados.js
index afe09210..e8c80b66 100644
--- a/mobile-ui/components/AgregarInvitados.js
+++ b/mobile-ui/components/AgregarInvitados.js
@@ -76,23 +76,23 @@ export default function AgregarInvitados({ navigation }) {
Registre el invitado que desee
-
+
Nombre
setName(value)}/>
-
+
Apellido
setApellido(value)}/>
-
+
Identificación
setDNI(value)}/>
-
+
Teléfono
setPhone(value)} />
-
diff --git a/mobile-ui/components/AreaComun.js b/mobile-ui/components/AreaComun.js
index ddd29bd2..c6b3a71c 100644
--- a/mobile-ui/components/AreaComun.js
+++ b/mobile-ui/components/AreaComun.js
@@ -1,4 +1,4 @@
-import React from "react";
+import React, {useContext, useEffect, useState} from "react";
import {
Box,
@@ -7,11 +7,54 @@ import {
FormControl,
Input,
Button,
- Center
+ Center,
+ Select, CheckIcon
} from "native-base";
+import { UserContext } from "../context/UserContext";
+import { API } from "../environment/api";
export default function AreaComun({navigation}){
+ const { user } = useContext(UserContext)
+ const [service, setService] = useState("");
+ const [areas, setAreas] = useState([])
+ const [isRequesting, setIsRequesting] = useState(false);
+
+ useEffect(() => {
+
+ const onRequestReservasData = async () => {
+ setIsRequesting(true);
+
+ try {
+ const jsonResponse = await fetch(`${API.BASE_URL}/commonArea/allCommonAreas`, {
+ method: "GET",
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ })
+
+ const response = await jsonResponse.json();
+ console.log(response.message);
+
+ setAreas(response.message);
+
+
+
+ } catch (error) {
+ console.log("ERROR:" + error);
+ }
+
+ setIsRequesting(false)
+ }
+
+ onRequestReservasData()
+
+
+ }, [user])
+
+
+
+
return (
@@ -26,20 +69,46 @@ export default function AreaComun({navigation}){
Reserve su área común
-
- Hora de inicio
-
-
-
- Hora de finalización
-
-
-
- Lugar
-
-
+
+ Área común
+
+ }} mt={1} onValueChange={itemValue => setService(itemValue)}>
+
+ {areas.map(item => (
+
+ ))}
+
-
+
+
+
+
+ Hora de inicio
+
+ }} mt={1} onValueChange={itemValue => setService(itemValue)}>
+
+
+
+
+
+
+ Hora de finalización
+
+ }} mt={1} onValueChange={itemValue => setService(itemValue)}>
+
+
+
+
+
+
+
+
Reservar
navigation.navigate('Comunicados')}>
diff --git a/mobile-ui/components/LogIn.js b/mobile-ui/components/LogIn.js
index 758166c3..fdb48f9f 100644
--- a/mobile-ui/components/LogIn.js
+++ b/mobile-ui/components/LogIn.js
@@ -52,7 +52,7 @@ export default function LogIn({ navigation }) {
})
.then( response => {
- // inqulino 4 y guarda 63
+ // inqulino 4 y guarda 3
const user = response.message
if(user.user_type == '4'){
addUser(user);
diff --git a/mobile-ui/components/ReservasCard/index.js b/mobile-ui/components/ReservasCard/index.js
index 083a84ca..43a67af2 100644
--- a/mobile-ui/components/ReservasCard/index.js
+++ b/mobile-ui/components/ReservasCard/index.js
@@ -4,7 +4,8 @@ import {
ScrollView,
Text,
Stack,
- Heading
+ Heading,
+ Badge
} from "native-base";
import PropTypes from 'prop-types';
@@ -36,6 +37,12 @@ export const ReservasCard = ({ date, startTime, endTime, status}) => {
}}>
+
+
+ {status === 1 ? 'LIBRE' : 'RESERVADO'}
+
Reserva #1