[EDIT] CAMBIOS PARA LA EDICION DE MENU Y PERMISOS POR VISTA

parent 60ef6108
......@@ -75,7 +75,8 @@ let tipo_usuario_nombre = "";
"codigo": detalle,
"proyecto": proyecto,
"tipo": 0,
"tipo_usuario": tipo_usuario
"tipo_usuario": tipo_usuario,
"listarPermisos" : !$('#cbkPermisos').is(':checked') ? 1 : 0
};
tipo_usuario = $('#cboTipoUsuario').val();
tipo_usuario_nombre = $('#cboTipoUsuario option:selected').text();
......@@ -237,7 +238,7 @@ let tipo_usuario_nombre = "";
className: "dialogExtraSmall",
title: "<i class='ace-icon fa fa-exclamation-circle white'></i> <span class='white'>Advertencia</span>",
headerClass: "modal-bg-warning",
message: "Este menú está siendo usado por otro proyecto",
message: data.message,
buttons: {
si: {
label: "<i class='fa fa-check bigger-110'></i>&nbsp; OK",
......@@ -329,7 +330,7 @@ let tipo_usuario_nombre = "";
</button>
</div>
</div>
<div class="table-responsive" style="overflow-y: auto;height: 17.5rem;">
<div class="table-responsive" style="overflow-y: auto;max-height: 17.5rem;">
<table id="tablaPermisosVista" class="table table-striped table-hover table-sm table-bordered display no-footer dataTable table-responsive">
<thead>
<tr>
......@@ -450,7 +451,7 @@ let tipo_usuario_nombre = "";
className: "btn-primary buttonOk",
callback: function () {
let nom_accion = $('#cboListadoAcciones').val();
let result_accion = $('#cboListadoAcciones').siblings("ul").find('li').get().filter( li => li.innerText.toUpperCase() === nom_accion.toUpperCase());
let result_accion = $('#cboListadoAcciones').siblings("ul").find('li').get().filter( li => li.innerText.trim().toUpperCase() === nom_accion.trim().toUpperCase());
let cod_accion = result_accion.length > 0 ? result_accion[0].value : 0;
if(nom_accion !== ""){
crearAcciones(vista, jerarquia, cod_accion, nom_accion);
......@@ -567,6 +568,7 @@ let tipo_usuario_nombre = "";
}
});
}).then(data => {
console.log(data);
if(data === null){
bootbox.dialog({
title: "<i class='ace-icon fa fa-exclamation-circle white'></i> <span class='white'>Advertencia</span>",
......@@ -836,7 +838,7 @@ function crearAcciones(vista, jerarquia,accion, nom_accion){
});
}
$('#btnBuscar').click(function () {
$('#btnBuscar').on('click',function () {
proyecto = $('#cboProyecto').val();
detalle = $('#cboTipoUsuario').val();
recargar();
......
......@@ -149,7 +149,13 @@
<div class="panel panel-primary card-3 hide" style="margin-top: 30px" id="panelTabla">
<div class="panel-heading" style="padding: 8px 15px">
<h6 class="panel-title" style="font-size: 15px; font-family: inherit"><i class="fa fa-list"></i>&nbsp; Listado del Menu</h6>
<div class="heading-elements">
<div class="heading-elements">
<div class="checkbox checkbox-switchery">
<label>
<span>MOSTRAR PERMISOS</span>
<input type="checkbox" id="cbkPermisos">
</label>
</div>
<button type="button" id="btnNuevoTitulo" class="btn bg-slate border-slate-600 btn-xs"><i class="glyphicon glyphicon-plus"></i>&nbsp; Nuevo Titulo</button>
</div>
</div>
......@@ -174,7 +180,10 @@
<script src="../js/lib/jquery-editable-select.min.js" type="text/javascript"></script>
<script src="../js/pages/MantenimientoMenu.js" type="text/javascript"></script>
<script>
let switchery = new Switchery(document.querySelector('#cbkEstado'), {color: 'red', secondaryColor: 'green'})
let switchery = new Switchery(document.querySelector('#cbkEstado'), {color: 'red', secondaryColor: 'green'});
let switchery2 = new Switchery(document.querySelector('#cbkPermisos'), {color: 'red', secondaryColor: 'green'});
$('.heading-elements').css('display','flex');
$('.heading-elements').css('gap','2rem');
document.querySelector('#txtEstado').innerText = 'MOSTRANDO ACTIVOS';
document.querySelector('#cbkEstado').checked = false;
document.querySelector('#cbkEstado').onchange = function () {
......@@ -186,6 +195,9 @@
listarProyectos();
document.querySelector('#btnLimpiar').click();
};
document.querySelector('#cbkPermisos').addEventListener('click',() => {
$('#btnBuscar').trigger('click');
});
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment