Commit b600492c authored by Bruno Meyer's avatar Bruno Meyer 😢

Bug fix

parent 940828f1
......@@ -36,7 +36,9 @@ var rooms = [
"can_use": "restrita",
"latitude": "latitude",
"longitude": "longitude",
"blocks_code": "blocoCod"
"blocks_code": "blocoCod",
"type": "tipo"
},function(x){
x.restrita = !x.restrita;
x.localizacao = {lat:x.latitude, lng: x.longitude};
......@@ -44,8 +46,23 @@ var rooms = [
delete x.longitude;
return x;
},
"*, blocks.code as blocks_code",
"rooms INNER JOIN blocks ON rooms.block_id = blocks.id",
" *,\
blocks.code as blocks_code,\
rooms.code as code,\
rooms.name as name,\
blocks.name as blocks_name,\
room_types.name as type\
",
" rooms\
INNER JOIN\
blocks ON rooms.block_id = blocks.id\
INNER JOIN\
room_types ON room_type_id=room_types.id\
",
"salas"
];
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -21,10 +21,11 @@
## Bloco
- Public: `True`
- Attributes `idInjection`=`false`
* nome : **string** `Required`
* nome : **string** `Required` `id`
* codigo : **string** `Required` `primaryKey`
* localizacao : **geopoint** `Required`
* tamanho : **number** `Required`, default=`0`
* _id : **number** `generated` `id`
- ACLs
* All permissions not specified is `DENY`
* **$everyone** ROLE have all READ operations
......
......@@ -5,7 +5,6 @@
"idInjection": false,
"options": {
"validateUpsert": true,
"idInjection": false,
"ensalemento": {
"schema": "strongloop",
"table": "bloco"
......@@ -29,6 +28,11 @@
"type": "number",
"required": true,
"default": 0
},
"_id":{
"type":"string",
"id":true,
"generated":true
}
},
"validations": [],
......
......@@ -56,7 +56,7 @@
"tipo": {
"type": "belongsTo",
"model": "Tipodesala",
"foreignKey": "tipodesalaId"
"foreignKey": "tipo"
}
},
"acls": [
......
{
"name": "Tipodesala",
"base": "PersistedModel",
"idInjection": true,
"idInjection": false,
"options": {
"validateUpsert": true
},
......@@ -9,7 +9,8 @@
"nome": {
"type": "string",
"required": true,
"default": "normal"
"default": "normal",
"id": true
}
},
"validations": [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment