Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Asistencia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Billy Larru
Asistencia
Commits
ad2f12a4
Commit
ad2f12a4
authored
Nov 02, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EDIT registro justificacion, refactorizando codigo]
parent
1df71cf3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
22 deletions
+21
-22
general.js
src/main/webapp/js/general.js
+14
-2
control_asistencia_administrativa.js
...main/webapp/js/pages/control_asistencia_administrativa.js
+2
-2
registroJustificacion.js
src/main/webapp/js/pages/registroJustificacion.js
+5
-18
No files found.
src/main/webapp/js/general.js
View file @
ad2f12a4
...
...
@@ -625,4 +625,16 @@ const getDataRow = (datatable, e) => datatable.DataTable().row($(e.currentTarget
/*ELIMINAR CUANDO PASE A PROD*/
//$("body").addClass("sidebar-xs")
/**/
\ No newline at end of file
/**/
const
llenarCombo
=
(
nodeIdentifier
,
URI
,
todos
=
false
,
value
=
"id"
,
texto
=
"descripcion"
)
=>
{
return
ajaxWebService
.
get
(
URI
).
then
((
response
)
=>
{
let
data
=
response
.
data
let
primeraOpcion
=
todos
?
"[TODOS]"
:
"[SELECCIONE]"
let
html
=
`<option>
${
primeraOpcion
}
</option>`
html
+=
data
.
map
((
obj
)
=>
`<option value="
${
obj
[
value
]}
">
${
obj
[
texto
]}
</option>`
).
join
(
""
)
$
(
nodeIdentifier
).
html
(
html
)
return
$
(
nodeIdentifier
)
})
}
\ No newline at end of file
src/main/webapp/js/pages/control_asistencia_administrativa.js
View file @
ad2f12a4
...
...
@@ -122,7 +122,7 @@ function getColumns() {
}
// return `<span class="${label}">${estado}</span>`;
return
`<
abbr title="
${
data
.
estadoasistencia_descripcion
}
" class="
${
label
}
">
${
estado
}
</abbr
>`
;
return
`<
span data-original-title="
${
data
.
estadoasistencia_descripcion
}
" tittle class="
${
label
}
estado-asistencia" data-popup="tooltip" data-placement="right">
${
estado
}
</span
>`
;
}
},
{
...
...
@@ -252,7 +252,7 @@ function listarAsistencia(objParams = {}) {
let
data
=
nodes
.
datatable
.
DataTable
().
row
(
$
(
this
).
parents
(
"tr"
)).
data
();
mostrarModalRegistro
(
data
);
});
$
(
'.estado-asistencia'
).
tooltip
()
});
});
}
...
...
src/main/webapp/js/pages/registroJustificacion.js
View file @
ad2f12a4
...
...
@@ -3,13 +3,10 @@ const listarPersonal = (selectorName) => {
};
const
listarCausaJustificacion
=
(
nodeIdentifier
)
=>
{
ajaxWebService
.
get
(
URI_JUSTIFICACION_CAUSA
).
then
((
response
)
=>
{
let
data
=
response
.
data
let
html
=
"<option>[SELECCIONE]</option>"
html
+=
data
.
map
((
causaJustificacion
)
=>
`<option value="
${
causaJustificacion
.
id
}
">
${
causaJustificacion
.
descripcion
}
</option>`
).
join
(
""
)
$
(
nodeIdentifier
).
html
(
html
)
$
(
nodeIdentifier
).
change
(
pintarHora
)
})
llenarCombo
(
nodeIdentifier
,
URI_JUSTIFICACION_CAUSA
)
.
then
((
nodo
)
=>
{
nodo
.
change
(
pintarHora
)
})
}
const
pintarHora
=
()
=>
{
...
...
@@ -23,16 +20,6 @@ const pintarHora = () => {
}
}
const
listarTipoJustificacion
=
(
nodeIdentifier
)
=>
{
ajaxWebService
.
get
(
URI_JUSTIFICACION_TIPO
).
then
((
response
)
=>
{
let
data
=
response
.
data
let
html
=
"<option>[SELECCIONE]</option>"
html
+=
data
.
map
((
tipoJustificacion
)
=>
`<option value="
${
tipoJustificacion
.
id
}
">
${
tipoJustificacion
.
descripcion
}
</option>`
).
join
(
""
)
$
(
nodeIdentifier
).
html
(
html
)
})
}
const
formControls
=
{
init
()
{
this
.
initializeRadioButton
()
...
...
@@ -40,7 +27,7 @@ const formControls = {
pickersNoConflict
()
initDateRangePicker
(
"#dpRangoFechas"
)
listarCausaJustificacion
(
"#cboCausaJustificacion"
)
l
istarTipoJustificacion
(
"#cboTipoJustificacion"
)
l
lenarCombo
(
"#cboTipoJustificacion"
,
URI_JUSTIFICACION_TIPO
)
listarPersonal
(
"#cboPersonal"
)
},
initializeRadioButton
()
{
...
...
Write
Preview
Markdown
is supported
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