diff --git a/servicio-reservaciones/src/schemas/reservation.schema.ts b/servicio-reservaciones/src/schemas/reservation.schema.ts index a9ebd5b1..c51bf2d9 100644 --- a/servicio-reservaciones/src/schemas/reservation.schema.ts +++ b/servicio-reservaciones/src/schemas/reservation.schema.ts @@ -23,15 +23,12 @@ export class Reservation { @Prop() common_area_name: string; - - @Prop() - community_id: string; - @Prop() user_id: string; @Prop() community_id: string; + } export const ReservationSchema = SchemaFactory.createForClass(Reservation); diff --git a/web-ui/web-react/src/components/Reservaciones.js b/web-ui/web-react/src/components/Reservaciones.js index 06be073d..f14d9adf 100644 --- a/web-ui/web-react/src/components/Reservaciones.js +++ b/web-ui/web-react/src/components/Reservaciones.js @@ -88,7 +88,6 @@ const Reservations = () => { } else if (item.status == '0') { item.status_text = 'Inactivo'; } - tenants.find((item2) => item2._id == item.user_id); }) setReservations(data) @@ -104,8 +103,11 @@ const Reservations = () => { }, []) - tenants.map((item) => { - + reservations.map((item) => { + let tenant = tenants.find(item2 => item2._id == item.user_id); + if(tenant){ + item.user_name = tenant.name + ' ' + tenant.last_name; + } }); @@ -211,7 +213,7 @@ const Reservations = () => {
{' '}
{' '}