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
5245e1cc
Commit
5245e1cc
authored
Oct 24, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EDIT registro de justificacion, agregando motivos de justificacion]
parent
36e186e6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
137 additions
and
10 deletions
+137
-10
OsUtils.java
src/main/java/asistencia/utilities/OsUtils.java
+106
-0
general.js
src/main/webapp/js/general.js
+1
-0
registroJustificacion.js
src/main/webapp/js/pages/registroJustificacion.js
+14
-4
bootstrap-datepicker.es.min.js
...p/plantilla/assets/locales/bootstrap-datepicker.es.min.js
+2
-0
controlAsistenciaAdministrativa.jsp
src/main/webapp/vistas/controlAsistenciaAdministrativa.jsp
+1
-1
registroJustificacion.jsp
src/main/webapp/vistas/registroJustificacion.jsp
+13
-5
No files found.
src/main/java/asistencia/utilities/OsUtils.java
0 → 100644
View file @
5245e1cc
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
horarioprimaria
.
utilities
;
import
java.io.File
;
import
java.util.Locale
;
/**
*
* @author sistem08user
*/
public
final
class
OsUtils
{
/**
* types of Operating Systems
*/
public
enum
OSType
{
Windows
,
MacOS
,
Linux
,
Other
};
// cached result of OS detection
protected
static
String
detectedOS
;
/**
* detect the operating system from the os.name System property and cache the
* result
*
* @return - the operating system detected
*/
public
static
String
getOperatingSysstemType
()
{
if
(
detectedOS
==
null
)
{
String
OS
=
System
.
getProperty
(
"os.name"
,
"generic"
).
toLowerCase
(
Locale
.
ENGLISH
);
if
((
OS
.
contains
(
"mac"
))
||
(
OS
.
contains
(
"darwin"
)))
{
detectedOS
=
"MacOS"
;
}
else
if
(
OS
.
contains
(
"win"
))
{
detectedOS
=
"Windows"
;
}
else
if
(
OS
.
contains
(
"nux"
))
{
detectedOS
=
"Linux"
;
}
else
{
detectedOS
=
"Other"
;
}
}
return
detectedOS
;
}
public
static
String
getPathOfVouchersDependingOS
()
{
String
path
=
""
;
String
detectedOs
=
OsUtils
.
getOperatingSysstemType
();
switch
(
detectedOs
)
{
case
"MacOS"
:
path
=
""
;
break
;
case
"Windows"
:
path
=
"C:/AppServ/www/comprobantes"
;
break
;
case
"Linux"
:
path
=
"/var/www/html/comprobantes"
;
break
;
}
return
path
;
}
public
static
String
getJSONDependingOS
()
{
String
path
=
""
;
String
detectedOs
=
OsUtils
.
getOperatingSysstemType
();
switch
(
detectedOs
)
{
case
"MacOS"
:
path
=
""
;
break
;
case
"Windows"
:
path
=
"C:/AppServ/www/comprobantes-log"
;
break
;
case
"Linux"
:
path
=
"/var/www/html/comprobantes-log"
;
break
;
}
return
path
;
}
public
static
String
getDotEnvPath
(
String
nameProject
)
{
String
path
=
""
;
String
detectedOs
=
OsUtils
.
getOperatingSysstemType
();
switch
(
detectedOs
)
{
case
"MacOS"
:
path
=
""
;
break
;
case
"Windows"
:
char
[]
alphabet
=
"abcdefghijklmnopqrstuvwxyz"
.
toCharArray
();
for
(
char
letter
:
alphabet
)
{
path
=
letter
+
":/dotenv/"
+
nameProject
;
File
directory
=
new
File
(
path
);
if
(
directory
.
exists
())
{
break
;
}
}
break
;
case
"Linux"
:
path
=
"/opt/dotenv/"
+
nameProject
;
break
;
}
return
path
;
}
}
src/main/webapp/js/general.js
View file @
5245e1cc
...
...
@@ -51,6 +51,7 @@ const URI_ADMINISTRATIVOS_DESCUENTO_MENSUAL_DETALLADO = "descuentoAsistenciaAdmi
//</editor-fold>
const
URI_SEDES
=
"sedes"
;
const
URI_JUSTIFICACION_CAUSA
=
"causaJustificacion"
const
URI_JUSTIFICACION_TIPO
=
"tipoJustificacion"
const
URI_JUSTIFICACION
=
"justificaciones"
const
URI_ESTADOJUSTIFICACION
=
"estadoJustificaciones"
...
...
src/main/webapp/js/pages/registroJustificacion.js
View file @
5245e1cc
...
...
@@ -2,11 +2,21 @@ const listarPersonal = (selectorName) => {
initSelect2
(
selectorName
,
baseURLRest
+
URI_TRABAJADORES
,
{
title
:
"nombresapellidos"
,
subtitle
:
"documentoidentidad"
});
};
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
)
})
}
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>`
)
html
+=
data
.
map
((
tipoJustificacion
)
=>
`<option value="
${
tipoJustificacion
.
id
}
">
${
tipoJustificacion
.
descripcion
}
</option>`
)
.
join
(
""
)
$
(
nodeIdentifier
).
html
(
html
)
})
}
...
...
@@ -17,6 +27,9 @@ const formControls = {
this
.
initializeChooseFile
()
pickersNoConflict
()
initDateRangePicker
(
"#dpRangoFechas"
)
listarCausaJustificacion
(
"#cboCausaJustificacion"
)
listarTipoJustificacion
(
"#cboTipoJustificacion"
)
listarPersonal
(
"#cboPersonal"
)
},
initializeRadioButton
()
{
$
(
".styled, .multiselect-container input"
).
uniform
({
...
...
@@ -163,7 +176,5 @@ const registrarJustificacion = () => {
$
(
document
).
ready
(
function
()
{
formControls
.
init
()
listarTipoJustificacion
(
"#cboTipoJustificacion"
)
listarPersonal
(
"#cboPersonal"
)
$
(
"#btnRegistrar"
).
click
(
registrarJustificacion
)
});
\ No newline at end of file
src/main/webapp/plantilla/assets/locales/bootstrap-datepicker.es.min.js
0 → 100644
View file @
5245e1cc
!
function
(
a
){
a
.
fn
.
datepicker
.
dates
.
es
=
{
days
:[
"Domingo"
,
"Lunes"
,
"Martes"
,
"Miércoles"
,
"Jueves"
,
"Viernes"
,
"Sábado"
],
daysShort
:[
"Dom"
,
"Lun"
,
"Mar"
,
"Mié"
,
"Jue"
,
"Vie"
,
"Sáb"
],
daysMin
:[
"Do"
,
"Lu"
,
"Ma"
,
"Mi"
,
"Ju"
,
"Vi"
,
"Sa"
],
months
:[
"Enero"
,
"Febrero"
,
"Marzo"
,
"Abril"
,
"Mayo"
,
"Junio"
,
"Julio"
,
"Agosto"
,
"Septiembre"
,
"Octubre"
,
"Noviembre"
,
"Diciembre"
],
monthsShort
:[
"Ene"
,
"Feb"
,
"Mar"
,
"Abr"
,
"May"
,
"Jun"
,
"Jul"
,
"Ago"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dic"
],
today
:
"Hoy"
,
monthsTitle
:
"Meses"
,
clear
:
"Borrar"
,
weekStart
:
1
,
format
:
"dd/mm/yyyy"
}}(
jQuery
);
\ No newline at end of file
src/main/webapp/vistas/controlAsistenciaAdministrativa.jsp
View file @
5245e1cc
...
...
@@ -87,7 +87,7 @@
<script
src=
"../plantilla/assets/js/plugins/forms/selects/select2.min.js"
></script>
<script
src=
"../js/lib/lodash.js"
type=
"text/javascript"
></script>
<script
src=
"../js/lib/sweetalert2.min.js"
type=
"text/javascript"
></script>
<script
src=
"../plantilla/assets/locales/bootstrap-datepicker.es.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/pages/control_asistencia_administrativa.js"
type=
"text/javascript"
></script>
<!--js-->
...
...
src/main/webapp/vistas/registroJustificacion.jsp
View file @
5245e1cc
...
...
@@ -20,12 +20,12 @@
<div
class=
"panel-body"
>
<div
class=
"row"
>
<div
class=
"col-md-
4
form-group"
>
<div
class=
"col-md-
3
form-group"
>
<label>
Personal
</label>
<select
class=
"select-search form-control"
id=
"cboPersonal"
>
</select>
</div>
<div
class=
"col-md-
4
form-group"
>
<div
class=
"col-md-
3
form-group"
>
<label>
Fecha(s) a justificar
</label>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"icon-calendar"
></i></span>
...
...
@@ -33,11 +33,11 @@
</div>
</div>
<div
class=
"col-md-
2
form-group"
>
<div
class=
"col-md-
3
form-group"
>
<label>
Justificacion por
</label>
<select
id=
"cbo
Tipo
Justificacion"
class=
"form-control"
></select>
<select
id=
"cbo
Causa
Justificacion"
class=
"form-control"
></select>
</div>
<div
class=
"col-md-
2
form-group hidden"
id=
"divHora"
>
<div
class=
"col-md-
3
form-group hidden"
id=
"divHora"
>
<label>
Hora
</label>
<input
type=
"time"
id=
"txtHora"
class=
"form-control"
></select>
</div>
...
...
@@ -50,6 +50,14 @@
</div>
<div
class=
"row"
>
<div
class=
"col-md-12 form-group"
>
<label>
Tipo de justificación
</label>
<select
id=
"cboTipoJustificacion"
class=
"form-control"
>
</select>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12 form-group"
>
<label>
Observación/Fundamento
</label>
<textarea
id=
"txtObservacion"
cols=
"30"
rows=
"5"
class=
"form-control"
></textarea>
</div>
...
...
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