git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C185
This commit is contained in:
parent
b2f2712fef
commit
83a878a2a0
5 changed files with 27 additions and 28 deletions
|
|
@ -32,7 +32,9 @@ namespace AYA.SlnSinort.Controllers
|
||||||
ViewBag.RepositorioLocal = RepositorioLocal;
|
ViewBag.RepositorioLocal = RepositorioLocal;
|
||||||
ViewBag.UsuarioSistema = Usuario;
|
ViewBag.UsuarioSistema = Usuario;
|
||||||
ViewBag.NombreUsuario = FullName;
|
ViewBag.NombreUsuario = FullName;
|
||||||
ViewBag.ListaOpciones = (List<string>)Session["PermisosUsuario"];
|
var Permisos = (List<string>)Session["PermisosUsuario"];
|
||||||
|
ViewBag.ListaOpciones = Permisos;
|
||||||
|
ViewBag.Number = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1691,7 +1691,15 @@ this.DibujarTareasPendientes = function (data) {
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ObtenerPantallas = function () {
|
this.ValidarPermisos = function (opcion) {
|
||||||
|
|
||||||
|
var validar = $.grep(localStorage['ListaOpciones'].split(","), function (data) {
|
||||||
|
return data == opcion;
|
||||||
|
});
|
||||||
|
|
||||||
|
return validar;
|
||||||
|
}
|
||||||
|
ObtenerPantallas = function () {
|
||||||
|
|
||||||
if ($("#hiddenMenuCreado").val() !== 1) {
|
if ($("#hiddenMenuCreado").val() !== 1) {
|
||||||
var uri = CatalogosWCF + '/api/ObtenerPantallas';
|
var uri = CatalogosWCF + '/api/ObtenerPantallas';
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ this.IniciarSesion = function (data) {
|
||||||
UserFullName: fullname,
|
UserFullName: fullname,
|
||||||
PermisosUsuario: ArrayPermisos
|
PermisosUsuario: ArrayPermisos
|
||||||
};
|
};
|
||||||
|
localStorage['ListaOpciones'] = ArrayPermisos;
|
||||||
url = $("#hiddenHref").val();
|
url = $("#hiddenHref").val();
|
||||||
url = url.replace("View", "Index");
|
url = url.replace("View", "Index");
|
||||||
url = url.replace("Controller", "Home");
|
url = url.replace("Controller", "Home");
|
||||||
|
|
@ -109,6 +110,7 @@ this.IniciarSesion = function (data) {
|
||||||
document.location.href = url;
|
document.location.href = url;
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
|
|
||||||
document.location.href = url;
|
document.location.href = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,30 +2,20 @@
|
||||||
var Item = {};
|
var Item = {};
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
//var opcion = $.grep(, function (data) {
|
|
||||||
// return data.Descripcion == "Ingreso y actualización de mantenimientos";
|
|
||||||
//});
|
|
||||||
|
|
||||||
//if (opcion != null) {
|
|
||||||
CargarMantenimiento();
|
CargarMantenimiento();
|
||||||
//} else {
|
|
||||||
// toastr.warning('No tiene permisos para ejecutar esta opción', Message_Warning);
|
|
||||||
//}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
this.CargarMantenimiento = function () {
|
this.CargarMantenimiento = function () {
|
||||||
//var variable1 = ListaOpciones;
|
|
||||||
//var ArrayPermisos = [];
|
|
||||||
//$.each(ListaOpciones, function (key, item) {
|
|
||||||
|
|
||||||
// ArrayPermisos.push(item.Descripcion);
|
if (ValidarPermisos('Ver catálogos1').length > 0) {
|
||||||
//});
|
var uri = CatalogosWCF + '/api/ObtenerMantenimientoCatalogos';
|
||||||
|
AjaxPostData(uri, Item, true, false, CargarTablaMantenimiento, null, null);
|
||||||
|
}
|
||||||
var uri = CatalogosWCF + '/api/ObtenerMantenimientoCatalogos';
|
else {
|
||||||
AjaxPostData(uri, Item, true, false, CargarTablaMantenimiento, null, null);
|
toastr.success('The process has been saved.', 'Success');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.CargarTablaMantenimiento = function (data) {
|
this.CargarTablaMantenimiento = function (data) {
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,7 @@
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<ul>
|
|
||||||
@foreach (var person in ViewBag.data)
|
|
||||||
{
|
|
||||||
<li>@person.FirstName</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
<div>
|
<div>
|
||||||
<table id="tableMantenimiento" class="table table-condensed dataTable no-footer">
|
<table id="tableMantenimiento" class="table table-condensed dataTable no-footer">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
@ -44,6 +39,8 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Scripts.Render("~/Sinort-Scripts/Mantenimientos.js")
|
@Scripts.Render("~/Sinort-Scripts/Mantenimientos.js")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue