Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SistemaGestionAdministrativa
ModuloPersonalCliente
Commits
a587ea51
Commit
a587ea51
authored
May 11, 2016
by
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
Changes
59
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Gruntfile.js
View file @
a587ea51
...
...
@@ -811,7 +811,7 @@ module.exports = function (grunt) {
'
ngAnnotate
'
,
'
copy:dist
'
,
'
babel:server
'
,
'
cdnify
'
,
//
'cdnify',
'
cssmin
'
,
'
uglify
'
,
'
filerev
'
,
...
...
INSTALL.md
View file @
a587ea51
...
...
@@ -129,7 +129,7 @@ postgres=# CREATE DATABASE moduloPersonalDb WITH OWNER usuarioPersonal;
```
sh
$
sudo
su - usuarioPersonal
$
cd
~
$
git clone git@gitlab.geo.gob.bo:SistemaGestionAdministrativa/ModuloPersonal.git
$
git clone git@gitlab.geo.gob.bo:SistemaGestionAdministrativa/ModuloPersonal
Cliente
.git
$
cd
ModuloPersonal
```
...
...
README.md
View file @
a587ea51
# modulo-personal
# modulo-personal
-cliente
Este es el modulo de personal del sistema de gestion administrativa
Este es el
cliente del
modulo de personal del sistema de gestion administrativa
## Desarrolladores
-
D'jalmar
...
...
@@ -14,7 +14,6 @@ Este es el modulo de personal del sistema de gestion administrativa
-
[
Bower
](
bower.io
)
(
`npm
install --global bower
`)
- [Ruby](https://www.ruby-lang.org) and then `
gem install sass
`
- [Grunt](http://gruntjs.com/) (`
npm install --global grunt-cli
`)
- [Postgresql](http://www.postgresql.org.es/)
### Para iniciar el proyecto en desarrollo se deben ejecutar los siguientes comandos en la terminal
...
...
bower.json
View file @
a587ea51
...
...
@@ -2,7 +2,7 @@
"name"
:
"modulo-personal"
,
"version"
:
"0.0.0"
,
"dependencies"
:
{
"angular"
:
"~1.
5.3
"
,
"angular"
:
"~1.
4.10
"
,
"json3"
:
"~3.3.1"
,
"es5-shim"
:
"~3.0.1"
,
"bootstrap-sass-official"
:
"~3.1.1"
,
...
...
@@ -14,8 +14,8 @@
"font-awesome"
:
">=4.1.0"
,
"lodash"
:
"~2.4.1"
,
"angular-ui-router"
:
"~0.2.18"
,
"angular-validation-match"
:
"~1.
5.2
"
,
"angular-animate"
:
"^1.
5.3
"
,
"angular-validation-match"
:
"~1.
4.0
"
,
"angular-animate"
:
"^1.
4.9
"
,
"ng-tags-input"
:
"^3.0.0"
},
"devDependencies"
:
{
...
...
client/app/app.scss
View file @
a587ea51
...
...
@@ -143,12 +143,15 @@ h4.color-primary {
@import
'cargos/cargos.scss'
;
@import
'comentarios/comentarios.scss'
;
@import
'datosPostulantes/datosPostulantes.scss'
;
@import
'entidades/entidades.scss'
;
@import
'main/main.scss'
;
@import
'postulaciones/postulaciones.scss'
;
@import
'postulantes/postulantes.scss'
;
@import
'tags/tags.scss'
;
@import
'tagsPostulantes/tagsPostulantes.scss'
;
@import
'tiposDato/tiposDato.scss'
;
@import
'tiposEntidad/tiposEntidad.scss'
;
@import
'../components/footer/footer.scss'
;
@import
'../components/modal/modal.scss'
;
@import
'../components/organigrama/framework/jquery.orgchart.scss'
;
// endinjector
client/app/cargos/cargos.scss
View file @
a587ea51
...
...
@@ -2,7 +2,7 @@
color
:
#fff
;
padding
:
9px
15px
;
border-bottom
:
1px
solid
#eee
;
background-color
:
#5cb85c
;
background-color
:
$brand-success
;
-webkit-border-top-left-radius
:
5px
;
-webkit-border-top-right-radius
:
5px
;
-moz-border-radius-topleft
:
5px
;
...
...
@@ -14,7 +14,7 @@
color
:
#fff
;
padding
:
9px
15px
;
border-bottom
:
1px
solid
#eee
;
background-color
:
#f0ad4e
;
background-color
:
$brand-warning
;
-webkit-border-top-left-radius
:
5px
;
-webkit-border-top-right-radius
:
5px
;
-moz-border-radius-topleft
:
5px
;
...
...
@@ -26,7 +26,7 @@
color
:
#fff
;
padding
:
9px
15px
;
border-bottom
:
1px
solid
#eee
;
background-color
:
#d9534f
;
background-color
:
$brand-danger
;
-webkit-border-top-left-radius
:
5px
;
-webkit-border-top-right-radius
:
5px
;
-moz-border-radius-topleft
:
5px
;
...
...
@@ -38,7 +38,7 @@
color
:
#fff
;
padding
:
9px
15px
;
border-bottom
:
1px
solid
#eee
;
background-color
:
#5bc0de
;
background-color
:
$brand-info
;
-webkit-border-top-left-radius
:
5px
;
-webkit-border-top-right-radius
:
5px
;
-moz-border-radius-topleft
:
5px
;
...
...
@@ -50,7 +50,7 @@
color
:
#fff
;
padding
:
9px
15px
;
border-bottom
:
1px
solid
#eee
;
background-color
:
#428bca
;
background-color
:
$brand-primary
;
-webkit-border-top-left-radius
:
5px
;
-webkit-border-top-right-radius
:
5px
;
-moz-border-radius-topleft
:
5px
;
...
...
client/app/comentarios/comentarios.service.js
View file @
a587ea51
...
...
@@ -3,7 +3,7 @@
class
ComentarioService
{
constructor
(
$resource
,
appConfig
)
{
this
.
resource
=
$resource
(
appConfig
.
serverAddress
+
'
/api/comentarios/:id
'
,
{
id
:
'
@_id
'
},
{
this
.
resource
=
$resource
(
appConfig
.
serverAddress
+
'
/api/comentarios/:id
'
,
{
id
:
'
@_id
'
},
{
update
:
{
method
:
'
PUT
'
},
query
:
{
isArray
:
false
}
})
...
...
client/app/datosPostulantes/modals/datosPostulantes.crear.modal.controller.js
View file @
a587ea51
...
...
@@ -9,8 +9,8 @@
this
.
datoPostulante
=
{
fk_postulante
:
this
.
postulante
.
_id
}
this
.
service
=
datoPostulanteService
;
tipoDatoService
.
getTiposDato
().
then
(
tiposDato
=>
{
this
.
tiposDato
=
tiposDato
;
this
.
tipoDatoSeleccionado
=
{};
this
.
tiposDato
=
{
rows
:
tiposDato
.
rows
.
filter
(
dato
=>
this
.
postulante
.
Datos
.
findIndex
(
x
=>
x
.
propiedad
==
dato
.
propiedad
)
==
-
1
)}
;
//
this.tipoDatoSeleccionado = {};
})
}
...
...
client/app/datosPostulantes/modals/datosPostulantes.editar.modal.controller.js
View file @
a587ea51
...
...
@@ -7,11 +7,13 @@
this
.
enviado
=
false
;
this
.
modal
=
$uibModalInstance
;
this
.
datoPostulante
=
Object
.
assign
({},
parametro
.
tipoDato
.
DatoPostulante
)
this
.
postulante
=
parametro
.
postulante
;
this
.
tipoDato
=
parametro
.
tipoDato
;
this
.
service
=
datoPostulanteService
;
tipoDatoService
.
getTiposDato
().
then
(
tiposDato
=>
{
this
.
tiposDato
=
tiposDato
;
this
.
tipoDatoSeleccionado
=
tiposDato
.
rows
.
find
(
x
=>
x
.
propiedad
===
this
.
datoPostulante
.
propiedad
);
this
.
tiposDato
=
{
rows
:
tiposDato
.
rows
.
filter
(
dato
=>
this
.
postulante
.
Datos
.
findIndex
(
x
=>
x
.
propiedad
==
dato
.
propiedad
)
==
-
1
)};
this
.
tiposDato
.
rows
.
push
(
this
.
tipoDatoSeleccionado
);
})
}
...
...
client/app/entidades/entidades.controller.js
0 → 100644
View file @
a587ea51
'
use strict
'
;
(()
=>
{
class
EntidadController
{
constructor
(
$state
,
$uibModal
,
Modal
,
EntidadService
)
{
this
.
$state
=
$state
;
this
.
entidades
=
[];
this
.
entidad
=
{};
this
.
alertas
=
[];
this
.
ordenarPor
=
"
nombre
"
;
this
.
ordenDescendente
=
false
;
this
.
modal
=
$uibModal
;
this
.
Modal
=
Modal
;
this
.
service
=
EntidadService
;
this
.
paginaActual
=
1
;
this
.
cambiarPagina
();
}
organigrama
(
id
)
{
this
.
$state
.
go
(
'
entidades.organigrama
'
,
{
entidadId
:
id
});
}
cambiarPagina
()
{
this
.
service
.
getEntidades
({
pagina
:
this
.
paginaActual
,
elementos
:
10
,
ordenarPor
:
this
.
ordenarPor
,
orden
:
this
.
ordenDescendente
})
.
then
(
respuesta
=>
{
console
.
log
(
respuesta
);
this
.
entidades
=
respuesta
.
rows
;
this
.
totalElementos
=
respuesta
.
count
;
})
}
}
angular
.
module
(
'
moduloPersonalApp
'
)
.
controller
(
'
EntidadCtrl
'
,
EntidadController
);
})();
client/app/entidades/entidades.controller.spec.js
0 → 100644
View file @
a587ea51
'
use strict
'
;
describe
(
'
Controller: EntidadesCtrl
'
,
function
()
{
// load the controller's module
beforeEach
(
module
(
'
moduloPersonalApp
'
));
var
EntidadesCtrl
,
scope
;
// Initialize the controller and a mock scope
beforeEach
(
inject
(
function
(
$controller
,
$rootScope
)
{
scope
=
$rootScope
.
$new
();
EntidadesCtrl
=
$controller
(
'
EntidadesCtrl
'
,
{
$scope
:
scope
});
}));
it
(
'
should ...
'
,
function
()
{
expect
(
1
).
to
.
equal
(
1
);
});
});
client/app/entidades/entidades.html
0 → 100644
View file @
a587ea51
<div
class=
"container"
>
<div
ui-view
></div>
</div>
client/app/entidades/entidades.js
0 → 100644
View file @
a587ea51
'
use strict
'
;
angular
.
module
(
'
moduloPersonalApp
'
)
.
config
(
function
(
$stateProvider
)
{
$stateProvider
.
state
(
'
entidades
'
,
{
abstract
:
true
,
url
:
'
/entidades
'
,
templateUrl
:
'
app/entidades/entidades.html
'
,
controller
:
'
EntidadCtrl
'
,
controllerAs
:
'
vm
'
})
.
state
(
'
entidades.lista
'
,
{
url
:
''
,
templateUrl
:
'
app/entidades/entidades.lista.html
'
})
.
state
(
'
entidades.organigrama
'
,
{
url
:
'
/:entidadId/organigrama
'
,
templateUrl
:
'
app/entidades/organigrama/entidades.organigrama.html
'
,
controller
:
'
EntidadOrganigramaCtrl
'
,
controllerAs
:
'
vm
'
});
});
client/app/entidades/entidades.lista.html
0 → 100644
View file @
a587ea51
<div
class=
"row"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-sm-4 col-xs-6"
>
<h3>
Entidades
<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.crear()"
>
<i
class=
"fa fa-plus"
></i>
Crear 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=
"3000"
>
{{alerta.mensaje}}
</uib-alert>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped"
>
<thead>
<tr>
<th><a
href=
""
ng-click=
"vm.ordenar('nombres')"
>
Nombre
</a></th>
<th><a
href=
""
ng-click=
"vm.ordenar('siglas')"
>
Sigla
</a></th>
<th
colspan=
"2"
class=
"text-center"
>
Opciones
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"entidad in vm.entidades"
>
<td>
{{entidad.nombre}}
</td>
<td>
{{entidad.sigla}}
</td>
<td
class=
"text-center"
>
<div
class=
"btn-group"
role=
"group"
>
<a
class=
"btn btn-primary-outline btn-xs"
href=
"#"
role=
"button"
ng-click=
"vm.organigrama(entidad._id)"
>
<i
class=
"fa fa-sitemap fa-lg"
></i>
</a>
<a
class=
"btn btn-info-outline btn-xs"
href=
"#"
role=
"button"
ng-click=
"vm.eliminar(entidad)"
>
<i
class=
"fa fa-edit fa-lg"
></i>
</a>
</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>
client/app/entidades/entidades.scss
0 → 100644
View file @
a587ea51
client/app/entidades/entidades.service.js
0 → 100644
View file @
a587ea51
'
use strict
'
;
(()
=>
{
class
EntidadService
{
constructor
(
$resource
,
appConfig
)
{
this
.
resource
=
$resource
(
appConfig
.
serverAddress
+
'
/api/entidades/:id
'
,
{
id
:
'
@_id
'
},
{
update
:
{
method
:
'
PUT
'
},
query
:
{
isArray
:
false
},
organigrama
:
{
method
:
'
GET
'
,
url
:
appConfig
.
serverAddress
+
'
/api/entidades/:id/organigrama
'
}
})
}
getEntidades
(
parametros
)
{
return
this
.
resource
.
query
(
parametros
).
$promise
;
}
getOrganigrama
(
id
)
{
return
this
.
resource
.
organigrama
({
id
:
id
}).
$promise
;
}
}
angular
.
module
(
'
moduloPersonalApp
'
)
.
service
(
'
EntidadService
'
,
EntidadService
);
})();
client/app/entidades/entidades.service.spec.js
0 → 100644
View file @
a587ea51
'
use strict
'
;
describe
(
'
Service: entidades
'
,
function
()
{
// load the service's module
beforeEach
(
module
(
'
moduloPersonalApp
'
));
// instantiate service
var
entidades
;
beforeEach
(
inject
(
function
(
_entidades_
)
{
entidades
=
_entidades_
;
}));
it
(
'
should do something
'
,
function
()
{
expect
(
!!
entidades
).
to
.
be
.
true
;
});
});
client/app/entidades/organigrama/entidades.organigrama.controller.js
0 → 100644
View file @
a587ea51
/**
* Created by adsib on 03-05-16.
*/
'
use strict
'
;
(()
=>
{
class
EntidadOrganigramaController
{
constructor
(
EntidadService
,
$stateParams
)
{
this
.
service
=
EntidadService
;
this
.
id
=
$stateParams
.
entidadId
;
EntidadService
.
getOrganigrama
(
this
.
id
).
then
(
arbol
=>
{
this
.
arbol
=
arbol
;
$
(
'
#chart
'
).
orgchart
({
'
data
'
:
this
.
arbol
,
'
nodeTitle
'
:
'
name
'
,
'
nodeContent
'
:
'
title
'
,
'
draggable
'
:
true
,
'
createNode
'
:
function
(
$node
,
data
)
{
switch
(
data
.
tipo
)
{
case
'
oficina
'
:
$node
.
addClass
(
'
success
'
);
break
;
case
'
unidadOrganizacional
'
:
$node
.
addClass
(
'
warning
'
);
break
;
case
'
cargo
'
:
$node
.
addClass
(
'
danger
'
);
break
;
default
:
break
;
}
}
});
});
}
}
angular
.
module
(
'
moduloPersonalApp
'
)
.
controller
(
'
EntidadOrganigramaCtrl
'
,
EntidadOrganigramaController
)
})();
client/app/entidades/organigrama/entidades.organigrama.html
0 → 100644
View file @
a587ea51
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<div
id=
"chart"
class=
"table-responsive orgchart-primary"
>
</div>
</div>
</div>
client/app/main/main.controller.js
View file @
a587ea51
'
use strict
'
;
(
function
()
{
(
function
()
{
class
MainController
{
constructor
(
$http
)
{
constructor
(
Autenticacion
,
$state
)
{
Autenticacion
.
inicioSesion
(
function
(
inicio
)
{
if
(
!
inicio
)
$state
.
go
(
'
login
'
);
})
}
}
angular
.
module
(
'
moduloPersonalApp
'
)
.
controller
(
'
MainController
'
,
MainController
);
})();
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment