Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
securityRemake
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
Juan Guevara Mayta
securityRemake
Commits
11b7cbce
Commit
11b7cbce
authored
Jul 13, 2023
by
Mauro Paolo Josue Zuñiga Mallqui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] SE AGREGO CODIGO PARA LA REDIRECCION DE MODULO SEGURIDAD A TRISMEGISTRO PLANILLA
parent
94c2bbf7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
14 deletions
+35
-14
.gitignore
.gitignore
+4
-2
usuario.js
src/main/webapp/js/pages/usuario.js
+16
-4
mantenimientoUsuario.jsp
src/main/webapp/vistas/mantenimientoUsuario.jsp
+15
-8
No files found.
.gitignore
View file @
11b7cbce
/dist/
/dist/
/build/
/build/
/nbproject/private/
/nbproject/private/
\ No newline at end of file
/nbproject/
/.idea/
\ No newline at end of file
src/main/webapp/js/pages/usuario.js
View file @
11b7cbce
...
@@ -261,7 +261,7 @@
...
@@ -261,7 +261,7 @@
let
retorno
=
``
;
let
retorno
=
``
;
if
(
data
===
1
)
{
if
(
data
===
1
)
{
retorno
+=
`<span data-toggle="tooltip" title="Editar" style="cursor: pointer"> <i class='editar click
${
conta
}
glyphicon glyphicon-pencil text-teal-800'></i> </span>`
;
retorno
+=
`<span data-toggle="tooltip" title="Editar" style="cursor: pointer"> <i class='editar click
${
conta
}
glyphicon glyphicon-pencil text-teal-800'></i> </span>`
;
retorno
+=
`<span data-toggle="tooltip" title="Asignar" style="cursor: pointer"> <i class='asignar icon icon-cog2 text-slate-800'></i> </span>`
;
retorno
+=
`<span data-toggle="tooltip" title="Asignar" style="cursor: pointer"> <i
data-value="
${
row
.
usuario
}
"
class='asignar icon icon-cog2 text-slate-800'></i> </span>`
;
retorno
+=
`<span data-toggle="tooltip" title="Eliminar" style="cursor: pointer"> <i class='eliminar glyphicon glyphicon-trash text-danger-800'></i> </span>`
;
retorno
+=
`<span data-toggle="tooltip" title="Eliminar" style="cursor: pointer"> <i class='eliminar glyphicon glyphicon-trash text-danger-800'></i> </span>`
;
}
else
{
}
else
{
retorno
+=
`<span data-toggle="tooltip" title="Reactivar" style="cursor: pointer"> <i class='reactivar fa fa-power-off text-success-800'></i> </span>`
;
retorno
+=
`<span data-toggle="tooltip" title="Reactivar" style="cursor: pointer"> <i class='reactivar fa fa-power-off text-success-800'></i> </span>`
;
...
@@ -1024,7 +1024,7 @@
...
@@ -1024,7 +1024,7 @@
}
}
function
asignarUsuarioProyecto
()
{
function
asignarUsuarioProyecto
()
{
$
(
'#tblUsuario tbody'
).
on
(
'click'
,
'.asignar'
,
function
()
{
$
(
'#tblUsuario tbody'
).
on
(
'click'
,
'.asignar'
,
function
(
e
)
{
var
table
=
$
(
"#tblUsuario"
).
DataTable
();
var
table
=
$
(
"#tblUsuario"
).
DataTable
();
var
data
=
table
.
row
(
$
(
this
).
parents
(
'tr'
)).
data
();
var
data
=
table
.
row
(
$
(
this
).
parents
(
'tr'
)).
data
();
var
codigo
=
data
[
"codigoUsuario"
];
var
codigo
=
data
[
"codigoUsuario"
];
...
@@ -1067,6 +1067,7 @@
...
@@ -1067,6 +1067,7 @@
listaDetalle
.
init
(
function
()
{
listaDetalle
.
init
(
function
()
{
datosDetalle
.
listarDetalle
(
codigo
);
datosDetalle
.
listarDetalle
(
codigo
);
desactivarDetalle
(
codigo
);
desactivarDetalle
(
codigo
);
entrarTrismegistoPlanilla
(
codigo
,
$
(
e
.
target
).
attr
(
'data-value'
));
activarDetalle
(
codigo
);
activarDetalle
(
codigo
);
nuevoProyectoUsuario
(
codigo
);
nuevoProyectoUsuario
(
codigo
);
$
(
'#tblDetalle'
).
on
(
'draw.dt'
,
function
()
{
$
(
'#tblDetalle'
).
on
(
'draw.dt'
,
function
()
{
...
@@ -1179,9 +1180,11 @@
...
@@ -1179,9 +1180,11 @@
}
}
},
},
{
"data"
:
"estadoUsuarioDetalle"
,
"render"
:
function
(
data
,
type
,
row
)
{
{
"data"
:
"estadoUsuarioDetalle"
,
"render"
:
function
(
data
,
type
,
row
)
{
console
.
log
(
row
);
conta
++
;
conta
++
;
if
(
data
===
1
)
{
if
(
data
===
1
)
{
return
`<span data-toggle="tooltip" title="Eliminar" style="cursor: pointer"> <i class='desactivar glyphicon glyphicon-trash text-danger-800'></i> </span>`
;
return
`
${
!
row
[
"nombreProyecto"
].
toString
().
includes
(
"TRISMEGISTO ASISTENCIA"
)
?
""
:
"<span data-toggle=
\"
tooltip
\"
title=
\"
Entrar a TP
\"
style=
\"
cursor: pointer
\"
> <i class='entrar glyphicon glyphicon-user text-blue-400'></i> </span>"
}
<span data-toggle="tooltip" title="Eliminar" style="cursor: pointer"> <i class='desactivar glyphicon glyphicon-trash text-danger-800'></i> </span>`
;
}
else
{
}
else
{
return
`<span data-toggle="tooltip" title="Reactivar" style="cursor: pointer"> <i class='reactivar fa fa-power-off text-success-800'></i> </span>`
;
return
`<span data-toggle="tooltip" title="Reactivar" style="cursor: pointer"> <i class='reactivar fa fa-power-off text-success-800'></i> </span>`
;
}
}
...
@@ -1235,8 +1238,17 @@
...
@@ -1235,8 +1238,17 @@
});
});
}
}
function
entrarTrismegistoPlanilla
(
codigo
,
usuario
){
$
(
'#tblDetalle tbody'
).
on
(
'click'
,
'.entrar'
,
function
()
{
const
json
=
JSON
.
stringify
({
usuario
:
usuario
,
pass
:
''
,
codigoProyecto
:
'37'
});
var
table
=
$
(
"#tblDetalle"
).
DataTable
();
const
data
=
table
.
row
(
$
(
this
).
parents
(
'tr'
)).
data
();
const
url
=
data
[
"nombreProyecto"
]
===
"TRISMEGISTO ASISTENCIA"
?
TP
:
TPPrueba
;
const
win
=
window
.
open
(
`
${
url
}
/vistas/security.jsp?body=
${
encodeURIComponent
(
json
)}
`
,
'_blank'
);
});
}
function
desactivarDetalle
(
filtro
)
{
function
desactivarDetalle
(
filtro
)
{
$
(
'#tblDetalle tbody'
).
on
(
'click'
,
'.desactivar'
,
function
()
{
$
(
'#tblDetalle tbody'
).
on
(
'click'
,
'.desactivar'
,
function
()
{
$
(
'.mantenimientoDetalle'
).
addClass
(
'hide'
);
$
(
'.mantenimientoDetalle'
).
addClass
(
'hide'
);
msnConfirm
(
'¿Seguro de eliminar esta asignación?'
,
(
option
)
=>
{
msnConfirm
(
'¿Seguro de eliminar esta asignación?'
,
(
option
)
=>
{
...
...
src/main/webapp/vistas/mantenimientoUsuario.jsp
View file @
11b7cbce
<
%
--
<
%@
page
import=
"com.mycompany.moduloseguridad.utilities.dotenSrv"
%
>
Document
:
mantenimientoMenu
<
%@
page
import=
"io.github.cdimascio.dotenv.Dotenv"
%
>
Created
on
:
09-jul-2018
,
11:42:42
<
%@
page
import=
"com.mycompany.moduloseguridad.utilities.OsUtils"
%
>
Author
:
Felipe
Escala
--
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<
%@
page
contentType=
"text/html"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en"
>
<html
lang=
"en"
>
...
@@ -15,6 +12,14 @@
...
@@ -15,6 +12,14 @@
<link
href=
"../css/general.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link
href=
"../css/general.css"
rel=
"stylesheet"
type=
"text/css"
/>
<!--css-->
<!--css-->
</head>
</head>
<
%
String
TP =
dotenSrv.obtenerValorVariableEntorno("TRISMEGISTO_ASISTENCIA_URL");
String
TPPrueba =
dotenSrv.obtenerValorVariableEntorno("TRISMEGISTO_ASISTENCIA_PRUEBA_URL");
%
>
<script
type=
"application/javascript"
>
const
TP
=
"<%=TP%>"
;
const
TPPrueba
=
"<%=TPPrueba%>"
;
</script>
<body
onload=
"segundaCarga();"
>
<body
onload=
"segundaCarga();"
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<
%@
include
file=
"templates/header-body.jsp"
%
>
<!-- content -->
<!-- content -->
...
@@ -154,7 +159,8 @@
...
@@ -154,7 +159,8 @@
<!-- / content -->
<!-- / content -->
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js-->
<!--js-->
<script
src=
"../js/pages/usuario.js?0"
type=
"text/javascript"
></script>
<script
src=
"../js/pages/usuario.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/js/crypto-js.min.js"
></script>
<!--js-->
<!--js-->
</body>
</body>
</html>
</html>
\ No newline at end of file
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