git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C399
This commit is contained in:
parent
db466cb14b
commit
b3dfbeb7d9
3 changed files with 40 additions and 42 deletions
|
|
@ -5,7 +5,6 @@ var RepositorioVirtual = $("#hiddenRepositorioVirtual").val();
|
|||
var RepositorioLocal = $("#hiddenRepositorioLocal").val();
|
||||
var UsuarioSistema = $("#hiddenUsuarioSistema").val();
|
||||
var NombreUsuario = $("#hiddenNombreUsuario").val();
|
||||
var esSuperUsuario = false;
|
||||
|
||||
var server = window.location.protocol + "//" + "localhost" + "/" + (window.location.pathname.split('/')[1]) + "/";
|
||||
var SinorLoginWCF = "http://localhost/AYA.SlnSinort.WCF/Sinort.svc";
|
||||
|
|
@ -196,42 +195,7 @@ this.ObtenerParametros = function (url) {
|
|||
return obj;
|
||||
}
|
||||
//verifica si el usuario conectado es tiene el rol pantalla de superusuario
|
||||
this.ObtenerRolPantalla = function () {
|
||||
var uri = CatalogosWCF + '/api/ObtenerRolesPantalla';
|
||||
var model = {
|
||||
codigo: Pantallas.SuperUser.Codigo
|
||||
};
|
||||
|
||||
AjaxPostData(uri, model, true, false, ObtenerUsuarioRol, null, null);
|
||||
|
||||
}
|
||||
this.ObtenerUsuarioRol = function (data) {
|
||||
|
||||
var modelPost = {
|
||||
listaCodigos: []
|
||||
};
|
||||
|
||||
$.each(data, function (key, item) {
|
||||
modelPost.listaCodigos.push(item.IdRol);
|
||||
});
|
||||
|
||||
//funcional experto
|
||||
//if (modelPost.listaCodigos.indexOf(1) == -1)
|
||||
// modelPost.listaCodigos.push(Roles.FuncionalExperto.Codigo);
|
||||
|
||||
var uri = CatalogosWCF + '/api/ObtenerUsuariosRol';
|
||||
AjaxPostData(uri, modelPost, true, false, VerificarSuperusuario, null, null);
|
||||
|
||||
}
|
||||
this.VerificarSuperusuario = function (data) {
|
||||
|
||||
$.each(data, function (key, item) {
|
||||
if (item.UsuarioSistema == UsuarioSistema) {
|
||||
esSuperUsuario = true;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
this.RequiredToDisabled = function (controlId) {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
var data;
|
||||
var IdEncabezadoEncuesta;
|
||||
var Estado;
|
||||
var esSuperUsuario = false;
|
||||
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
$(window).on("load", function () {
|
||||
getDataModel();
|
||||
})
|
||||
CargarEncuestas();
|
||||
|
||||
});
|
||||
|
||||
this.getDataModel = function () {
|
||||
|
|
@ -16,9 +16,44 @@ this.getDataModel = function () {
|
|||
$('#tableEncuestas').DataTable().column(0).visible(false);
|
||||
$('#tableEncuestas').DataTable().column(1).visible(false);
|
||||
Estado = 1;
|
||||
ObtenerRolPantalla();
|
||||
|
||||
CargarEncuestas();
|
||||
}
|
||||
this.ObtenerRolPantalla = function () {
|
||||
var uri = CatalogosWCF + '/api/ObtenerRolesPantalla';
|
||||
var model = {
|
||||
codigo: Pantallas.SuperUser.Codigo
|
||||
};
|
||||
|
||||
AjaxPostData(uri, model, false, false, ObtenerUsuarioRol, null, null);
|
||||
|
||||
}
|
||||
this.ObtenerUsuarioRol = function (data) {
|
||||
|
||||
var modelPost = {
|
||||
listaCodigos: []
|
||||
};
|
||||
|
||||
$.each(data, function (key, item) {
|
||||
modelPost.listaCodigos.push(item.IdRol);
|
||||
});
|
||||
|
||||
//funcional experto
|
||||
//if (modelPost.listaCodigos.indexOf(1) == -1)
|
||||
// modelPost.listaCodigos.push(Roles.FuncionalExperto.Codigo);
|
||||
|
||||
var uri = CatalogosWCF + '/api/ObtenerUsuariosRol';
|
||||
AjaxPostData(uri, modelPost, false, false, VerificarSuperusuario, null, null);
|
||||
|
||||
}
|
||||
this.VerificarSuperusuario = function (data) {
|
||||
|
||||
$.each(data, function (key, item) {
|
||||
if (item.UsuarioSistema == UsuarioSistema) {
|
||||
esSuperUsuario = true;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
this.CargarEncuestas = function () {
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
<ul class="dropdown-menu">
|
||||
<li class="header" id="numGotitasPendientesHeader">[$0]</li>
|
||||
|
||||
<li class="footer"><a href=#>Ver gotitas normativas </a></li>
|
||||
<li class="footer"><a href="@Url.Action("GotitasPendientes", "Home")">Ver gotitas normativas </a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
|
@ -294,7 +294,6 @@
|
|||
$(document).ready(function () {
|
||||
|
||||
ObtenerDatosUsuario();
|
||||
ObtenerRolPantalla();
|
||||
ObtenerCantidadTareasPendientes();
|
||||
ObtenerCantidadGotitasPendientes();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue