Commit 966e1be3 authored by D’jalmar Gutierrez Titirico's avatar D’jalmar Gutierrez Titirico 🚲

Merge branch 'release-0.2.0' into desarrollo

parents 69b2873b 3ee9ae26
......@@ -22,6 +22,10 @@ $masculino-color: #57b6ff;
.input-group {
margin-bottom: 10px;
}
.header-button{
margin-top: 20px;
margin-bottom: 10px;
}
// Component styles are injected through grunt
// injector
......
<div class="container">
<div class="row">
<h2 class="sub-header">Cargos</h2>
<div class="row">
<div class="container">
<div class="row">
<div class="col-sm-4 col-xs-6">
<h2>Cargos</h2>
</div>
<div class="col-sm-3 col-sm-offset-5">
<div class="pull-right">
<button class="btn btn-success header-button" ng-click="vm.crearCargos()">
<i class="fa fa-plus"></i> Crear Cargo
</button>
</div>
</div>
</div>
<uib-alert ng-repeat="alerta in vm.alertas" type="{{alerta.tipo}}" close="vm.alertas.splice($index,1)"
dismiss-on-timeout="3000">{{alerta.mensaje}}
</uib-alert>
<div class="pull-right">
<button class="btn btn-success" ng-click="vm.crearCargos()">
<i class="fa fa-plus"></i> Crear Cargo
</button>
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
......@@ -21,7 +28,8 @@
<tr ng-repeat="cargo in vm.cargos">
<td>{{cargo.nombre}}</td>
<td width="150">
<a class = "btn btn-info btn-xs" href = "#" role = "button" ng-click="vm.editar(cargo._id)"><i class="fa fa-edit"></i></a>
<a class="btn btn-info btn-xs" href="#" role="button" ng-click="vm.editar(cargo._id)"><i
class="fa fa-edit fa-lg"></i></a>
</td>
<!--Mostrar un dialogo de eliminar-->
<!--<td><a ng-click="vm.eliminar(cargo._id)">Eliminar</a></td>-->
......
tags-input .tags .tag-item {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
display: inline-block;
white-space: nowrap;
margin: -1px 5px 5px 0;
height: 22px;
vertical-align: top;
cursor: default;
color: #767676;
background-color: #fff;
border-color: #ccc;
}
.modal-header-success {
color:#fff;
padding:9px 15px;
......
......@@ -122,7 +122,7 @@
this.tagService.getTags()
.then(tags=> {
this.tags = tags;
return this.tags.rows.filter(x=>x.includes(query));
return this.tags.rows.filter(x=>x.nombre.includes(query));
})
}
else return this.tags.rows.filter(x=>x.nombre.includes(query));
......
......@@ -53,7 +53,7 @@
else {
this.service.getPostulantes({
pagina: this.paginaActual,
elementos: 15,
elementos: 10,
ordenarPor: this.ordenarPor,
orden: this.ordenDescendente
})
......@@ -78,7 +78,7 @@
this.tagService.getTags()
.then(tags=> {
this.tags = tags;
return this.tags.rows.filter(x=>x.includes(query));
return this.tags.rows.filter(x=>x.nombre.includes(query));
})
}
else return this.tags.rows.filter(x=>x.nombre.includes(query));
......@@ -91,7 +91,7 @@
});
this.service.getPostulantes({
pagina: this.paginaActual,
elementos: 15,
elementos: 10,
ordenarPor: this.ordenarPor,
orden: this.ordenDescendente,
incluye: [{entidad: 'Tags', buscar: palabras}]
......
<div class="row">
<div class="container">
<h2 class="sub-header">Postulantes
</h2>
<div class="row">
<div class="col-sm-4 col-xs-6">
<h2>Postulantes</h2>
</div>
<div class="col-sm-3 col-sm-offset-5">
<div class="pull-right">
<button class="btn btn-success header-button" ng-click="vm.crear()">
<i class="fa fa-plus"></i> Crear Postulante
</button>
</div>
</div>
</div>
<uib-alert ng-repeat="alerta in vm.alertas" type="{{alerta.tipo}}" close="vm.alertas.splice($index,1)"
dismiss-on-timeout="3000">{{alerta.mensaje}}
</uib-alert>
<div class="container">
<div class="pull-right">
<button class="btn btn-success" ng-click="vm.crear()"><i
class="fa fa-plus"></i> Crear Postulante
</button>
</div>
</div>
<hr>
<div class="form-group">
<div class="">
<div class="input-group">
......@@ -31,16 +34,22 @@
<tr>
<th><a href="" ng-click="vm.ordenar('nombres')">Nombres</a></th>
<th><a href="" ng-click="vm.ordenar('apellidos')">Apellidos</a></th>
<th colspan="2">Opciones</th>
<th colspan="2" class="text-center">Opciones</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="postulante in vm.postulantes">
<td>{{postulante.nombres}}</td>
<td>{{postulante.apellidos}}</td>
<td>
<a class = "btn btn-info btn-xs" href = "#" role = "button" ng-click="vm.editar(postulante._id)"><i class="fa fa-edit"></i></a>
<a class = "btn btn-danger btn-xs" href = "#" role = "button" ng-click="vm.eliminar(postulante)"><i class="fa fa-trash"></i></a>
<td class="text-center">
<div class="btn-group" role="group">
<a class="btn btn-info btn-xs" href="#" role="button" ng-click="vm.editar(postulante._id)">
<i class="fa fa-edit fa-lg"></i>
</a>
<a class="btn btn-danger btn-xs" href="#" role="button" ng-click="vm.eliminar(postulante)">
<i class="fa fa-trash fa-lg"></i>
</a>
</div>
</td>
</tr>
</tbody>
......
<div class="navbar navbar-default navbar-static-top" ng-controller="NavbarController">
<div class="navbar navbar-inverse navbar-static-top" ng-controller="NavbarController">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main" ng-click="nav.isCollapsed = !nav.isCollapsed">
......
{
"name": "modulo-personal",
"version": "0.1.0",
"version": "0.2.0",
"main": "server/app.js",
"dependencies": {
"babel-runtime": "^5.8.20",
......
......@@ -12,7 +12,9 @@ export function respondWithResult(res, statusCode) {
else {
entity.rows = res.inclusiones.length > 0 ? filtro.filtrar(entity.rows, res.inclusiones) : entity.rows;
entity.count = entity.rows.length;
entity.rows = res.offset && res.limit ? entity.rows.slice(res.offset, res.offset + res.limit) : entity.rows;
console.log(res.offset)
console.log(res.limit)
entity.rows = res.tienePaginacion? entity.rows.slice(res.offset, res.offset + res.limit) : entity.rows;
res.status(statusCode).json(entity);
}
}
......
......@@ -32,9 +32,12 @@ export function formatearRuta(req, res, next) {
res.busquedaInterna = true;
if (req.query.elementos) {
res.limit = numeroElementos(req.query.elementos);
res.tienePaginacion = true;
if (req.query.pagina)
res.offset = numeroPagina(req.query.pagina, res.limit);
}
else
res.tienePaginacion = false;
}
//parametros.subQuery=false;
......
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