Commit a587ea51 authored by D’jalmar Gutierrez Titirico's avatar D’jalmar Gutierrez Titirico 🚲
Browse files

Merge branch 'release-0.3.1' into 'master'

Release 0.3.1



See merge request !18
parents e3062666 1be81808
Pipeline #8 failed with stage
'use strict';
describe('Controller: TiposEntidadCtrl', function () {
// load the controller's module
beforeEach(module('moduloPersonalApp'));
var TiposEntidadCtrl, scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
TiposEntidadCtrl = $controller('TiposEntidadCtrl', {
$scope: scope
});
}));
it('should ...', function () {
expect(1).to.equal(1);
});
});
<div class="row">
<div class="container"><div ui-view class="container"></div></div>
</div>
'use strict';
angular.module('moduloPersonalApp')
.config(function ($stateProvider) {
$stateProvider
.state('tiposEntidad', {
url: '/tiposEntidad',
abstract:true,
templateUrl: 'app/tiposEntidad/tiposEntidad.html',
controller: 'TiposEntidadCtrl',
controllerAs: 'vm'
})
.state('tiposEntidad.lista', {
url: '',
templateUrl: 'app/tiposEntidad/tiposEntidad.lista.html'
});
});
<div class="row">
<div class="container">
<div class="row">
<div class="col-sm-4 col-xs-6">
<h3>Tipos Entidad
<small><span class="label label-default">{{vm.totalElementos}}</span></small>
</h3>
</div>
<div class="col-sm-3 col-sm-offset-5">
<div class="pull-right">
<button class="btn btn-success-outline header-button" ng-click="vm.crearEntidad()">
<i class="fa fa-plus"></i> Crear Tipo Entidad
</button>
</div>
</div>
</div>
<uib-alert ng-repeat="alerta in vm.alertas" type="{{alerta.tipo}}" close="vm.alertas.splice($index,1)"
dismiss-on-timeout="5000">{{alerta.mensaje}}
</uib-alert>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Nombre</th>
<th width="15%">Opciones</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tipoEntidad in vm.tiposEntidad">
<td>{{tipoEntidad.nombre}}</td>
<td>
<div class="btn-group">
<button class="btn btn-info-outline btn-xs" ng-click="vm.editarEntidad(tipoEntidad)">
<i class="fa fa-edit fa-lg"></i></button>
<button class="btn btn-danger-outline btn-xs" ng-click="vm.eliminarEntidad(tipoEntidad)">
<i class="fa fa-trash fa-lg"></i></button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<uib-pagination
ng-hide="vm.totalElementos<10"
total-items="vm.totalElementos"
items-per-page="10"
max-size="8"
force-ellipses="true"
ng-model="vm.paginaActual"
ng-change="vm.cambiarPagina()"
next-text="Siguiente"
previous-Text="Anterior">
</uib-pagination>
</div>
</div>
(()=> {
'use strict';
class TipoEntidadService {
constructor($resource, appConfig) {
this.resource = $resource(appConfig.serverAddress + '/api/tiposEntidad/:id', {id: '@_id'}, {
update: {method: 'PUT'},
query: {isArray: false}
});
}
getTiposEntidad(parametros) {
return this.resource.query(parametros).$promise;
}
getTipoEntidad(id, parametros) {
return this.resource.get({id: id, parametros}).$promise;
}
crearTipoEntidad(tipoEntidad) {
return this.resource.save(tipoEntidad).$promise;
}
editarTipoEntidad(id, tipoEntidad) {
return this.resource.update({id: id}, tipoEntidad).$promise;
}
eliminarTipoEntidad(id) {
return this.resource.remove({id: id}).$promise;
}
}
angular.module('moduloPersonalApp')
.service('tipoEntidadService', TipoEntidadService);
})();
'use strict';
describe('Service: tiposEntidad', function () {
// load the service's module
beforeEach(module('moduloPersonalApp'));
// instantiate service
var tiposEntidad;
beforeEach(inject(function (_tiposEntidad_) {
tiposEntidad = _tiposEntidad_;
}));
it('should do something', function () {
expect(!!tiposEntidad).to.be.true;
});
});
<a href="http://softwarelibre.gob.bo/licencia.php">LPG-Bolivia</a>
<!-- Footer start -->
<a href="http://softwarelibre.gob.bo/licencia.php">LPG-Bolivia</a>
<!-- Footer end -->
footer.footer {
html {
position: relative;
min-height: 100%;
}
.content {
margin: 0 0 30px; /* bottom = footer height */
}
footer {
position: absolute;
left: 0;
bottom: 0;
height: 30px;
width: 100%;
text-align: center;
padding: 30px 0;
margin-top: 70px;
border-top: 1px solid #E5E5E5;
background: #fff;
}
......@@ -10,11 +10,20 @@ class NavbarController {
'title':'Cargos',
'state':'cargos.lista',
'parentState':'cargos'
},{
'title':'Entidades',
'state':'entidades.lista',
'parentState':'entidades'
}];
menuAdministrador=[{
'title':'Tipos de Dato',
'state':'tiposDato.lista',
'parentState':'tiposDato'
},
{
'title':'Tipos Entidad',
'state':'tiposEntidad.lista',
'parentState':'tiposEntidad'
}];
isCollapsed = true;
......
......@@ -7,12 +7,12 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/" class="navbar-brand">Modulo Personal</a>
<a href="~/" class="navbar-brand">Modulo Personal</a>
</div>
<div collapse="nav.isCollapsed" class="navbar-collapse collapse" id="navbar-main" uib-collapse="nav.isCollapsed">
<ul class="nav navbar-nav">
<ul class="nav navbar-nav" ng-show="nav.inicioSesion()">
<li class="dropdown" uib-dropdown="" style="">
<a role="button" class="dropdown-toggle" uib-dropdown-toggle="" aria-haspopup="true" aria-expanded="false">
<a role="button" href class="dropdown-toggle" uib-dropdown-toggle="" aria-haspopup="true" aria-expanded="false">
Entidades <span class="caret"></span>
</a>
<ul class="dropdown-menu">
......@@ -22,7 +22,7 @@
</ul>
</li>
<li class="dropdown" uib-dropdown="" style="">
<a role="button" class="dropdown-toggle" uib-dropdown-toggle="" aria-haspopup="true" aria-expanded="false">
<a role="button" href class="dropdown-toggle" uib-dropdown-toggle="" aria-haspopup="true" aria-expanded="false">
Administrador <span class="caret"></span>
</a>
<ul class="dropdown-menu">
......
This diff is collapsed.
/*
* jQuery OrgChart Plugin
* https://github.com/dabeng/OrgChart
*
* Demos of jQuery OrgChart Plugin
* http://dabeng.github.io/OrgChart/local-datasource/
* http://dabeng.github.io/OrgChart/ajax-datasource/
* http://dabeng.github.io/OrgChart/ondemand-loading-data/
* http://dabeng.github.io/OrgChart/option-createNode/
* http://dabeng.github.io/OrgChart/export-orgchart/
* http://dabeng.github.io/OrgChart/integrate-map/
*
* Copyright 2016, dabeng
* http://dabeng.github.io/
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
.hidden {
display: none !important;
}
@mixin orgchart-brand($color) {
overflow-x: auto;
.orgchart {
background-image: linear-gradient(90deg, rgba($color, 0.15) 10%, rgba(0, 0, 0, 0) 10%), linear-gradient(rgba($color, 0.15) 10%, rgba(0, 0, 0, 0) 10%);
}
.orgchart .node.focused {
background-color: rgba($color, 0.5);
}
.orgchart .node:hover {
background-color: rgba($color, 0.5);
}
.orgchart .node .content {
border: 1px solid $color;
}
.orgchart .node .title {
background-color: $color;
}
.orgchart td.top {
border-top: 2px solid $color;
}
.orgchart td.right {
border-right: 1px solid $color;
}
.orgchart td.left {
border-left: 1px solid $color;
}
.orgchart td > .down {
background-color: $color;
margin: 0px auto;
height: 20px;
width: 2px;
}
}
.orgchart {
display: inline-block;
min-height: 202px;
min-width: 202px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: linear-gradient(90deg, rgba(200, 0, 0, 0.15) 10%, rgba(0, 0, 0, 0) 10%), linear-gradient(rgba(200, 0, 0, 0.15) 10%, rgba(0, 0, 0, 0) 10%);
background-size: 10px 10px;
border: 1px dashed rgba(0, 0, 0, 0);
transition: border .3s;
padding: 20px;
}
.orgchart td.top {
border-top: 2px solid rgba(217, 83, 79, 0.8);
}
.orgchart td.right {
border-right: 1px solid rgba(217, 83, 79, 0.8);
}
.orgchart td.left {
border-left: 1px solid rgba(217, 83, 79, 0.8);
}
.orgchart td > .down {
background-color: rgba(217, 83, 79, 0.8);
margin: 0px auto;
height: 20px;
width: 2px;
}
.orgchart-primary {
@include orgchart-brand($brand-primary)
}
.orgchart-danger {
@include orgchart-brand($brand-danger)
}
.orgchart-info {
@include orgchart-brand($brand-info)
}
.orgchart-warning {
@include orgchart-brand($brand-warning)
}
.orgchart-success {
@include orgchart-brand($brand-success)
}
@mixin orgchart-brand-color-node($color) {
.title {
background-color: $color;
}
.content {
border: 1px solid $color;
}
}
.orgchart .node.danger {
@include orgchart-brand-color-node($brand-danger);
}
.orgchart .node.warning {
@include orgchart-brand-color-node($brand-warning);
}
.orgchart .node.success {
@include orgchart-brand-color-node($brand-success);
}
.orgchart > .spinner {
font-size: 100px;
margin-top: 30px;
color: rgba(68, 157, 68, 0.8);
}
.orgchart table {
border-spacing: 0;
border-collapse: inherit;
}
.orgchart > table:first-child {
margin: 20px auto;
}
.orgchart td {
text-align: center;
vertical-align: top;
padding: 0;
}
/* node styling */
.orgchart .node {
display: inline-block;
position: relative;
margin: 0;
padding: 3px;
border: 2px dashed transparent;
text-align: center;
width: 130px;
}
.orgchart .node > .spinner {
position: absolute;
top: calc(50% - 15px);
left: calc(50% - 15px);
vertical-align: middle;
font-size: 30px;
color: rgba(68, 157, 68, 0.8);
}
.orgchart .node:hover {
background-color: rgba(238, 217, 54, 0.5);
transition: .5s;
cursor: default;
z-index: 20;
}
.orgchart .node.focused {
background-color: rgba(238, 217, 54, 0.5);
}
.orgchart .node.allowedDrop {
border-color: rgba(68, 157, 68, 0.9);
}
.orgchart .node .title {
position: relative;
text-align: center;
font-size: 12px;
font-weight: bold;
height: 20px;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background-color: rgba(217, 83, 79, 0.8);
color: #fff;
border-radius: 4px 4px 0 0;
}
.orgchart .node .title .symbol {
float: left;
margin-top: 4px;
margin-left: 2px;
}
.orgchart .node .content {
position: relative;
width: 100%;
font-size: 11px;
line-height: 13px;
padding: 2px;
border: 1px solid rgba(217, 83, 79, 0.8);
border-radius: 0 0 4px 4px;
text-align: center;
background-color: #fff;
color: #333;
overflow: hidden;
}
.orgchart .node .edge {
font-size: 15px;
position: absolute;
color: rgba(68, 157, 68, 0.5);
cursor: default;
transition: .2s;
-webkit-transition: .2s;
}
.orgchart .edge:hover {
color: #449d44;
cursor: pointer;
}
.orgchart .node .verticalEdge {
width: calc(100% - 10px);
width: -webkit-calc(100% - 10px);
width: -moz-calc(100% - 10px);
left: 5px;
}
.orgchart .node .topEdge {
top: -4px;
}
.orgchart .node .bottomEdge {
bottom: -4px;
}
.orgchart .node .horizontalEdge {
width: 15px;
height: calc(100% - 10px);
height: -webkit-calc(100% - 10px);
height: -moz-calc(100% - 10px);
top: 5px;
}
.orgchart .node .rightEdge {
right: -4px;
}
.orgchart .node .leftEdge {
left: -4px;
}
.orgchart .node .horizontalEdge::before {
position: absolute;
top: calc(50% - 7px);
top: -webkit-calc(50% - 7px);
top: -moz-calc(50% - 7px);
}
.orgchart .node .rightEdge::before {
right: 3px;
}
.orgchart .node .leftEdge::before {
left: 3px;
}
.orgchart .node .edge.fa-chevron-up:hover {
transform: translate(0, -4px);
-webkit-transform: translate(0, -4px);
}
.orgchart .node .edge.fa-chevron-down:hover {
transform: translate(0, 4px);
-webkit-transform: translate(0, 4px);
}
.orgchart .node .edge.fa-chevron-right:hover {
transform: translate(4px, 0);
-webkit-transform: translate(4px, 0);
}
.orgchart .node .edge.fa-chevron-left:hover {
transform: translate(-4px, 0);
-webkit-transform: translate(-4px, 0);
}
.orgchart .node .edge.fa-chevron-right:hover ~ .fa-chevron-left {
transform: translate(-4px, 0);
-webkit-transform: translate(-4px, 0);
}
.orgchart .node .edge.fa-chevron-left:hover ~ .fa-chevron-right {
transform: translate(4px, 0);
-webkit-transform: translate(4px, 0);
}
.rightEdgeMoveRight {
transform: translate(4px, 0);
-webkit-transform: translate(4px, 0);
}
.rightEdgeMoveLeft {
transform: translate(-4px, 0);
-webkit-transform: translate(-4px, 0);
}
.oc-export-btn {
display: inline-block;
position: absolute;
right: 5px;
top: 5px;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
color: #fff;
background-color: #5cb85c;
border: 1px solid transparent;
border-color: #4cae4c;
border-radius: 4px;
}