Skip to content

Commit

Permalink
Merge pull request #166 from Uniandes-isis2603/Agarcia13
Browse files Browse the repository at this point in the history
Fin visitas
  • Loading branch information
a-garcia13 authored May 17, 2017
2 parents 499f125 + 174ee99 commit 338a2f2
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 8 deletions.
16 changes: 12 additions & 4 deletions paseos-01-web/src/main/webapp/src/modules/visitas/addVisita.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@

<h1 class="text-center"><span class="glyphicon glyphicon-tree-deciduous"></span>Agregar una visita:</h1>
<h1 class="text-center"><span class="glyphicon glyphicon-tree-deciduous"></span>Inscribir una Oferta:</h1>

<form class="form-horizontal">
<div class="form-group"></div>
<label class="control-label col-sm-3" >Oferta:</label>
<div class="col-sm-7">
<select class="form-control" ng-model="ofertaElegida">
<option ng-repeat="oferta in catalogo" value="{{oferta.id}}">{{oferta.fecha|date:'yyyy-MM-dd'}} - {{oferta.inscritos}}</option>
<select class="form-control" ng-model="visitaElegida">
<option ng-repeat="visita in catalogo" value="{{visita.id}}">{{visita.comentario}} - {{visita.calificacion}}</option>
</select>
</div>
<br>
<br>
<label class="control-label col-sm-3" >Usuario:</label>
<div class="col-sm-7">
<select class="form-control" ng-model="usuarioElegido">
<option ng-repeat="usuario in usuarios" value="{{usuario.id}}">{{usuario.login}} - {{usuario.nombre}}</option>
</select>
</div>
<br>
Expand Down
15 changes: 11 additions & 4 deletions paseos-01-web/src/main/webapp/src/modules/visitas/visitas.mod.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,21 @@
parent: 'visitas',
views: {
'listView': {
templateUrl: basePath + 'addOferta.html',
templateUrl: basePath + 'addVisita.html',
resolve: {
catalogo: ['$http', function ($http) {
return $http.get('api/ofertas');
}]},
controller: ['$scope','catalogo', function ($scope,catalogo) {
}],
usuarios: ['$http', function ($http){
return $http.get('api/usuarios?guias=1');
}]
},
controller: ['$scope','catalogo', 'usuarios', function ($scope,catalogo,usuarios) {
$scope.catalogo = catalogo.data;
}]
$scope.usuarios = usuarios.data;

}
]
}
}
}).state('deleteVisita', {
Expand Down
107 changes: 107 additions & 0 deletions paseos-01-web/src/test/resources/postmanTests/paseos-01-visitas
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"id": "85514051-84ee-4ddb-734a-3c9fa56652a0",
"name": "paseos-01-visitas",
"description": "",
"order": [
"b35a4cec-ca78-1e01-b550-e3bfd98e832f",
"bc9e685d-4e22-7adb-7897-b42f1c54d147",
"f6573d08-fae2-9cc5-9827-43d0fefd3780",
"137be607-1c61-17e0-b52a-f5562c948548",
"41676e5e-bade-ab44-d239-6770f96da75d"
],
"folders": [],
"timestamp": 0,
"owner": "1523763",
"public": false,
"requests": [
{
"id": "137be607-1c61-17e0-b52a-f5562c948548",
"headers": "Content-Type: application/json\n",
"url": "http://localhost:8080/paseos-01-web/api/visitas/109",
"preRequestScript": null,
"pathVariables": {},
"method": "PUT",
"data": [],
"dataMode": "raw",
"tests": "tests[\"status code is 200\"]= responseCode.code === 200;",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1495037203857,
"name": "http://localhost:8080/paseos-01-web/api/visitas/109",
"description": "",
"collectionId": "85514051-84ee-4ddb-734a-3c9fa56652a0",
"responses": [],
"rawModeData": " {\r\n \"id\":109,\r\n \"calificacion\": 6,\r\n \"comentario\": \"ramon es un vago que daña el repositorio\"\r\n}\r\n\r\n"
},
{
"id": "41676e5e-bade-ab44-d239-6770f96da75d",
"headers": "Content-Type: application/json\n",
"url": "http://localhost:8080/paseos-01-web/api/visitas/109",
"preRequestScript": null,
"pathVariables": {},
"method": "DELETE",
"data": [],
"dataMode": "raw",
"tests": "tests[\"status code is 200\"]= responseCode.code === 204;",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1495037230488,
"name": "http://localhost:8080/paseos-01-web/api/visitas/109",
"description": "",
"collectionId": "85514051-84ee-4ddb-734a-3c9fa56652a0",
"responses": [],
"rawModeData": ""
},
{
"id": "b35a4cec-ca78-1e01-b550-e3bfd98e832f",
"headers": "Content-Type: application/json\n",
"url": "http://localhost:8080/paseos-01-web/api/visitas",
"preRequestScript": null,
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "raw",
"tests": "tests[\"status code is 200\"]= responseCode.code === 200;",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1495037164617,
"name": "http://localhost:8080/paseos-01-web/api/visitas",
"description": "",
"collectionId": "85514051-84ee-4ddb-734a-3c9fa56652a0",
"responses": [],
"rawModeData": " {\r\n \"id\": 1,\r\n \"calificaion\": 0,\r\n \"comentario\": \"null\"\r\n}\r\n\r\n"
},
{
"id": "bc9e685d-4e22-7adb-7897-b42f1c54d147",
"headers": "Content-Type: application/json\n",
"url": "http://localhost:8080/paseos-01-web/api/visitas/1",
"preRequestScript": null,
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "raw",
"tests": "tests[\"status code is 200\"]= responseCode.code === 200;",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1495037167720,
"name": "http://localhost:8080/paseos-01-web/api/visitas/1",
"description": "",
"collectionId": "85514051-84ee-4ddb-734a-3c9fa56652a0",
"responses": [],
"rawModeData": " {\r\n \"id\": 1,\r\n \"calificaion\": 0,\r\n \"comentario\": \"null\"\r\n}\r\n\r\n"
},
{
"id": "f6573d08-fae2-9cc5-9827-43d0fefd3780",
"name": "http://localhost:8080/paseos-01-web/api/usuarios/1/ofertas/2",
"description": "",
"collectionId": "85514051-84ee-4ddb-734a-3c9fa56652a0",
"method": "POST",
"headers": "Content-Type: application/json",
"dataMode": "raw",
"data": [],
"rawModeData": " {\r\n \"calificacion\": 12,\r\n \"comentario\": \"null\"\r\n}\r\n\r\n",
"url": "http://localhost:8080/paseos-01-web/api/usuarios/1/ofertas/2",
"responses": []
}
]
}

0 comments on commit 338a2f2

Please sign in to comment.