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

cambios en la apariencia y reparacion de bugs menores

parent 77fbba66
...@@ -22,6 +22,10 @@ $masculino-color: #57b6ff; ...@@ -22,6 +22,10 @@ $masculino-color: #57b6ff;
.input-group { .input-group {
margin-bottom: 10px; margin-bottom: 10px;
} }
.header-button{
margin-top: 20px;
margin-bottom: 10px;
}
// Component styles are injected through grunt // Component styles are injected through grunt
// injector // injector
......
<div class="container"> <div class="row">
<div class="row"> <div class="container">
<h2 class="sub-header">Cargos</h2> <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)" <uib-alert ng-repeat="alerta in vm.alertas" type="{{alerta.tipo}}" close="vm.alertas.splice($index,1)"
dismiss-on-timeout="3000">{{alerta.mensaje}} dismiss-on-timeout="3000">{{alerta.mensaje}}
</uib-alert> </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"> <div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
...@@ -21,7 +28,8 @@ ...@@ -21,7 +28,8 @@
<tr ng-repeat="cargo in vm.cargos"> <tr ng-repeat="cargo in vm.cargos">
<td>{{cargo.nombre}}</td> <td>{{cargo.nombre}}</td>
<td width="150"> <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> </td>
<!--Mostrar un dialogo de eliminar--> <!--Mostrar un dialogo de eliminar-->
<!--<td><a ng-click="vm.eliminar(cargo._id)">Eliminar</a></td>--> <!--<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 { .modal-header-success {
color:#fff; color:#fff;
padding:9px 15px; padding:9px 15px;
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
this.tagService.getTags() this.tagService.getTags()
.then(tags=> { .then(tags=> {
this.tags = 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)); else return this.tags.rows.filter(x=>x.nombre.includes(query));
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
else { else {
this.service.getPostulantes({ this.service.getPostulantes({
pagina: this.paginaActual, pagina: this.paginaActual,
elementos: 15, elementos: 10,
ordenarPor: this.ordenarPor, ordenarPor: this.ordenarPor,
orden: this.ordenDescendente orden: this.ordenDescendente
}) })
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
this.tagService.getTags() this.tagService.getTags()
.then(tags=> { .then(tags=> {
this.tags = 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)); else return this.tags.rows.filter(x=>x.nombre.includes(query));
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
}); });
this.service.getPostulantes({ this.service.getPostulantes({
pagina: this.paginaActual, pagina: this.paginaActual,
elementos: 15, elementos: 10,
ordenarPor: this.ordenarPor, ordenarPor: this.ordenarPor,
orden: this.ordenDescendente, orden: this.ordenDescendente,
incluye: [{entidad: 'Tags', buscar: palabras}] incluye: [{entidad: 'Tags', buscar: palabras}]
......
<div class="row"> <div class="row">
<div class="container"> <div class="container">
<h2 class="sub-header">Postulantes <div class="row">
</h2> <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)" <uib-alert ng-repeat="alerta in vm.alertas" type="{{alerta.tipo}}" close="vm.alertas.splice($index,1)"
dismiss-on-timeout="3000">{{alerta.mensaje}} dismiss-on-timeout="3000">{{alerta.mensaje}}
</uib-alert> </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="form-group">
<div class=""> <div class="">
<div class="input-group"> <div class="input-group">
...@@ -31,16 +34,22 @@ ...@@ -31,16 +34,22 @@
<tr> <tr>
<th><a href="" ng-click="vm.ordenar('nombres')">Nombres</a></th> <th><a href="" ng-click="vm.ordenar('nombres')">Nombres</a></th>
<th><a href="" ng-click="vm.ordenar('apellidos')">Apellidos</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> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="postulante in vm.postulantes"> <tr ng-repeat="postulante in vm.postulantes">
<td>{{postulante.nombres}}</td> <td>{{postulante.nombres}}</td>
<td>{{postulante.apellidos}}</td> <td>{{postulante.apellidos}}</td>
<td> <td class="text-center">
<a class = "btn btn-info btn-xs" href = "#" role = "button" ng-click="vm.editar(postulante._id)"><i class="fa fa-edit"></i></a> <div class="btn-group" role="group">
<a class = "btn btn-danger btn-xs" href = "#" role = "button" ng-click="vm.eliminar(postulante)"><i class="fa fa-trash"></i></a> <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> </td>
</tr> </tr>
</tbody> </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="container">
<div class="navbar-header"> <div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main" ng-click="nav.isCollapsed = !nav.isCollapsed"> <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main" ng-click="nav.isCollapsed = !nav.isCollapsed">
......
...@@ -12,7 +12,9 @@ export function respondWithResult(res, statusCode) { ...@@ -12,7 +12,9 @@ export function respondWithResult(res, statusCode) {
else { else {
entity.rows = res.inclusiones.length > 0 ? filtro.filtrar(entity.rows, res.inclusiones) : entity.rows; entity.rows = res.inclusiones.length > 0 ? filtro.filtrar(entity.rows, res.inclusiones) : entity.rows;
entity.count = entity.rows.length; 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); res.status(statusCode).json(entity);
} }
} }
......
...@@ -32,9 +32,12 @@ export function formatearRuta(req, res, next) { ...@@ -32,9 +32,12 @@ export function formatearRuta(req, res, next) {
res.busquedaInterna = true; res.busquedaInterna = true;
if (req.query.elementos) { if (req.query.elementos) {
res.limit = numeroElementos(req.query.elementos); res.limit = numeroElementos(req.query.elementos);
res.tienePaginacion = true;
if (req.query.pagina) if (req.query.pagina)
res.offset = numeroPagina(req.query.pagina, res.limit); res.offset = numeroPagina(req.query.pagina, res.limit);
} }
else
res.tienePaginacion = false;
} }
//parametros.subQuery=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