а

I get the data but it is not shown


#1

I get this data and collection:

{
“data”: [
{
“id”: “43”,
“start_date”: “2019-07-17”,
“end_date”: “2019-07-19”,
“text”: “Nueva Reserva”,
“room”: “14”,
“status”: “1”,
“is_paid”: “true”,
“usuario”: “PRUEBA”,
“cedula”: “0106978117”,
“nombre”: “admin”,
“apellido”: “admin”,
“direccion”: “alguna”,
“telefono”: “1234567”,
“mail”: "admin@admin.com",
“desayunos”: “0”,
“obspago”: “”
}
],
“collections”: {
“roomType”: [
{
“id”: “11”,
“value”: “11”,
“label”: “Piso 1”,
“habitaciones”: “4”
},
{
“id”: “15”,
“value”: “15”,
“label”: “Piso 2”,
“habitaciones”: “3”
},
{
“id”: “14”,
“value”: “14”,
“label”: “Piso 3”,
“habitaciones”: “1”
}
],
“roomStatus”: [
{
“id”: “0”,
“value”: “0”,
“label”: “Por Limpiar”
},
{
“id”: “1”,
“value”: “1”,
“label”: “Revision Polvos”
},
{
“id”: “2”,
“value”: “2”,
“label”: “Hospedados por Limpiar”
},
{
“id”: “3”,
“value”: “3”,
“label”: “Hoy Arriban”
},
{
“id”: “4”,
“value”: “4”,
“label”: “Ocupado”
},
{
“id”: “5”,
“value”: “5”,
“label”: “Hospedado No Limpieza”
},
{
“id”: “6”,
“value”: “6”,
“label”: “En Mantenimiento”
}
],
“bookingStatus”: [
{
“id”: “1”,
“value”: “1”,
“label”: “telefono”
},
{
“id”: “2”,
“value”: “2”,
“label”: “correo”
},
{
“id”: “3”,
“value”: “3”,
“label”: “whatsapp”
}
],
“room”: [
{
“id”: “14”,
“value”: “14”,
“label”: “1”,
“type”: “11”,
“status”: “1”
},
{
“id”: “19”,
“value”: “19”,
“label”: “2”,
“type”: “15”,
“status”: “0”
},
{
“id”: “18”,
“value”: “18”,
“label”: “3”,
“type”: “14”,
“status”: “0”
}
]
}
}

charge with this line

scheduler.load("./data.php", “json”);

This is data.php file

$pisos = new JSONOptionsConnector($res, $dbtype);
$pisos->render_complex_sql(
“SELECT id as value,nombre as label, habitaciones FROM piso where eliminado=0 order by nombre asc;”,
“value”,
“value,label,habitaciones”
);
$estadoHabitacion = new JSONOptionsConnector($res, $dbtype);
$estadoHabitacion->render_table(“estadohabitacion”, “id”, “id(value),descripcion(label)”);
$tipoReserva = new JSONOptionsConnector($res, $dbtype);
$tipoReserva-Arender_table(“tipoReserva”, “id”, “id(value),descripcion(label)”);
$habitaciones = new JSONOptionsConnector($res, $dbtype);
$habitaciones->render_complex_sql(
“SELECT id,id as value,numero as label,idPiso as type,idEstadoHabitacion as status,idPiso,tipo,camas_num,pax,desayunos,precio FROM habitacion where eliminado=0 order by numero asc;”,
“id”,
“id(id),value(value),label,type,status”);
$scheduler = new JSONSchedulerConnector($res, $dbtype);
$scheduler->set_options(“roomType”, $pisos);
$scheduler->set_options(“roomStatus”, $estadoHabitacion);
$scheduler->set_options(“bookingStatus”, $tipoReserva);
$scheduler->set_options(“room”, $habitaciones);
$scheduler->render_table(“bookings”, “id”, “start_date,end_date,text,room,status,is_paid,usuario,cedula,nombre,apellido,direccion,telefono,mail,desayunos,obspago”);

This is the result and not show the data

Thanks for the help


#2

Hello,

Please send the demo that I can run locally. That should make it more obvious what goes wrong.