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

cambios menores al frontend referidos a la navegacion entre paginas

parent 2a472456
......@@ -33,6 +33,7 @@
controller: 'CargosCreaModalCtrl',
controllerAs: 'vm'
}).result.then(cargo=> {
this.cargos.push(cargo);
this.alertas.push({
tipo: 'success',
mensaje: 'Se creo corectamente el cargo: ' + cargo.nombre
......
<div class="row">
<div class="panel panel-default">
<div class="panel-heading"><span class="glyphicon glyphicon-edit"></span> Editar Cargo</div>
<div class="panel-body">
<form method="post">
<div class="form-group ">
<label class="control-label requiredField" for="nombre">
Nombre
<span class="asteriskField">
*
</span>
</label>
<input type="text" value="{{vm.cargo.nombre}}" class="form-control" id="nombre" name="nombre" placeholder="Nombre de cargo" size="15">
</div>
<div class="form-group">
<div>
<button class="btn btn-primary icon-user"><span class="glyphicon glyphicon-floppy-disk"></span> Guardar</button>
<button class="btn btn-danger"><span class="glyphicon glyphicon-arrow-left"></span> Cancelar</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div ui-view=""></div>
<div class="row">
<div class="row container">
<div ui-view class="container"></div>
</div>
......
<div class="row">
<h2 class="sub-header">Cargos</h2>
<button class="btn btn-default" ng-click="vm.crearCargos()">Crear Cargo</button>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Nombre del cargo</th>
<th colspan="2">Opciones</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="cargo in vm.cargos">
<td>{{cargo.nombre}}</td>
<!--<td width="150"><a ng-click="vm.detalle(cargo._id)">Detalles</a></td> -->
<td width="150"><a ng-click="vm.editar(cargo._id)">Editar</a></td>
<!--Mostrar un dialogo de eliminar-->
<!--<td><a ng-click="vm.eliminar(cargo._id)">Eliminar</a></td>-->
</tr>
</tbody>
</table>
<div class="container">
<div class="row">
<h2 class="sub-header">Cargos</h2>
<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>
<tr>
<th>Nombre del cargo</th>
<th colspan="2">Opciones</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="cargo in vm.cargos">
<td>{{cargo.nombre}}</td>
<td width="150"><a ng-click="vm.editar(cargo._id)">Editar</a></td>
<!--Mostrar un dialogo de eliminar-->
<!--<td><a ng-click="vm.eliminar(cargo._id)">Eliminar</a></td>-->
</tr>
</tbody>
</table>
</div>
<uib-pagination
ng-hide="vm.totalElementos<10"
total-items="vm.totalElementos"
items-per-page="15"
max-size="8"
force-ellipses="true"
ng-model="vm.paginaActual"
ng-change="vm.cambiarPagina()"
next-text="Siguiente"
previous-Text="Anterior"></uib-pagination>
</div>
<uib-pagination
total-items="vm.totalElementos"
items-per-page="15"
max-size="8"
force-ellipses="true"
ng-model="vm.paginaActual"
ng-change="vm.cambiarPagina()"
next-text="Siguiente"
previous-Text="Anterior"></uib-pagination>
</div>
<div ng-controller="CargosEditarCtrl">
<div class="page-header">
<h4 class="header">Editar Cargo</h4>
</div>
<h2 class="sub-header">Editar Cargo
<small class="pull-right">
<a class="btn btn-default btn-sm" ui-sref="cargos.lista">
<i class="fa fa-arrow-left"></i>
Regresar
</a>
</small>
</h2>
<div>
<uib-accordion close-others="oneAtATime">
<uib-accordion-group heading="Cargo" class="panel-primary" is-open="true">
......@@ -64,9 +69,6 @@
class="fa fa-plus"></i>
Nueva Postulación
</button>
<button class="btn btn-danger" ui-sref="cargos.lista"><i class="glyphicon glyphicon-arrow-left"></i>
Cancelar
</button>
</div>
</div>
</div>
......
<div ng-controller="PostulantesEditarCtrl">
<div class="page-header">
<h4 class="header">Editar Postulante</h4>
</div>
<h2 class="sub-header">Editar Postulante
<small class="pull-right">
<a class="btn btn-default btn-sm" ui-sref="postulantes.lista">
<i class="fa fa-arrow-left"></i>
Regresar
</a>
</small>
</h2>
<div>
<uib-accordion close-others="oneAtATime">
<uib-accordion-group heading="Postulante" class="panel-primary" is-open="true">
......
......@@ -21,6 +21,7 @@
controller: 'PostulanteCrearModalCtrl',
controllerAs: 'vm'
}).result.then(postulante=> {
this.postulantes.push(postulante);
this.alertas.push({
tipo: 'success',
mensaje: 'Se creo corectamente al postulante: ' + postulante.nombres + " " + postulante.apellidos
......
<div class="container">
<div class="row">
<div class="col-sm-12">
<h1>Crear postulante</h1>
</div>
<div class="col-sm-12">
<form class="form" name="form" ng-submit="vm.crear(form)" novalidate>
<div class="form-group">
<label>Nombres</label>
<input type="text" name="nombres" class="form-control" ng-model="vm.postulante.nombres" required>
</div>
<div class="form-group">
<label>Apellidos</label>
<input type="text" name="apellidos" class="form-control" ng-model="vm.postulante.apellidos" required>
</div>
<div class="form-group">
<label>CI</label>
<input type="text" name="ci" class="form-control" ng-model="vm.postulante.ci" required>
</div>
<tag-manager tags="tags" autocomplete="allTags"></tag-manager>
<hr>
<h3>Current Tags</h3>
<ul class="list-unstyled">
<li ng-repeat="tag in tags">{{tag}}</li>
</ul>
<div class="form-group has-error">
<p class="help-block" ng-show="(form.nombres.$error.required || form.apellidos.$error.required) && vm.enviado">
Debe llenar todos los campos
</p>
<p class="help-block">{{ vm.errores.other }}</p>
</div>
<div>
<button class="btn btn-inverse btn-lg btn-login" type="submit">
Guardar
</button>
</div>
</form>
</div>
</div>
<hr>
</div>
<div class="row">
<div class="row container">
<div ui-view class="container"></div>
</div>
<div class="row">
<h2 class="sub-header">Postulantes</h2>
<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.crear()"><i
class="fa fa-plus"></i> Crear Postulante
</button>
<div class="container">
<div class="row">
<h2 class="sub-header">Postulantes
</h2>
<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.crear()"><i
class="fa fa-plus"></i> Crear Postulante
</button>
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Nombres</th>
<th>Apellidos</th>
<th colspan="2">Opciones</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="postulante in vm.postulantes">
<td>{{postulante.nombres}}</td>
<td>{{postulante.apellidos}}</td>
<td><a ng-click="vm.editar(postulante._id)">Editar</a></td>
<td><a ng-click="vm.eliminar(postulante)">Eliminar</a></td>
</tr>
</tbody>
</table>
</div>
<uib-pagination
ng-hide="vm.totalElementos<10"
total-items="vm.totalElementos"
items-per-page="15"
max-size="8"
force-ellipses="true"
ng-model="vm.paginaActual"
ng-change="vm.cambiarPagina()"
next-text="Siguiente"
previous-Text="Anterior"></uib-pagination>
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Nombres</th>
<th>Apellidos</th>
<th colspan="2">Opciones</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="postulante in vm.postulantes">
<td>{{postulante.nombres}}</td>
<td>{{postulante.apellidos}}</td>
<td><a ng-click="vm.editar(postulante._id)">Editar</a></td>
<td><a ng-click="vm.eliminar(postulante)">Eliminar</a></td>
</tr>
</tbody>
</table>
</div>
<uib-pagination
total-items="vm.totalElementos"
items-per-page="15"
max-size="8"
force-ellipses="true"
ng-model="vm.paginaActual"
ng-change="vm.cambiarPagina()"
next-text="Siguiente"
previous-Text="Anterior"></uib-pagination>
</div>
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