git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C197
This commit is contained in:
parent
ba3dbc2fa1
commit
5855d179d0
8 changed files with 51 additions and 38 deletions
|
|
@ -196,6 +196,7 @@
|
||||||
<Compile Include="Controllers\HomeController.cs" />
|
<Compile Include="Controllers\HomeController.cs" />
|
||||||
<Compile Include="Controllers\LoginController.cs" />
|
<Compile Include="Controllers\LoginController.cs" />
|
||||||
<Compile Include="Controllers\ManageController.cs" />
|
<Compile Include="Controllers\ManageController.cs" />
|
||||||
|
<Compile Include="Controllers\NormativaReglamentacionTecnicaController.cs" />
|
||||||
<Compile Include="Controllers\PropuestaNormativaController.cs" />
|
<Compile Include="Controllers\PropuestaNormativaController.cs" />
|
||||||
<Compile Include="FileUploadHandler\FileUploadHandler.ashx.cs">
|
<Compile Include="FileUploadHandler\FileUploadHandler.ashx.cs">
|
||||||
<DependentUpon>FileUploadHandler.ashx</DependentUpon>
|
<DependentUpon>FileUploadHandler.ashx</DependentUpon>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
|
||||||
|
namespace AYA.SlnSinort.Controllers.NormativaReglamentacionTecnica
|
||||||
|
{
|
||||||
|
public class NormativaReglamentacionTecnicaController : BaseController
|
||||||
|
{
|
||||||
|
public ActionResult FichaTecnica()
|
||||||
|
{
|
||||||
|
InitControllers();
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -124,18 +124,9 @@ this.VerDescripcionLarga = function (DescripcionLarga) {
|
||||||
|
|
||||||
|
|
||||||
this.ObtenerAplicaciones = function (data) {
|
this.ObtenerAplicaciones = function (data) {
|
||||||
|
|
||||||
if (ValidarPermisos('Ver catálogos').length > 0) {
|
|
||||||
var uri = CatalogosWCF + '/api/ObtenerAplicacion';
|
var uri = CatalogosWCF + '/api/ObtenerAplicacion';
|
||||||
AjaxPostData(uri, null, false, false, CargarGridAplicaciones, null, null);
|
AjaxPostData(uri, null, false, false, CargarGridAplicaciones, null, null);
|
||||||
}
|
|
||||||
else {
|
|
||||||
alert('No tiene permisos para ejecutar esta opción.');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.EditarItem = function (id) {
|
this.EditarItem = function (id) {
|
||||||
|
|
|
||||||
|
|
@ -80,15 +80,9 @@ this.CargarGridEmisores = function (data) {
|
||||||
|
|
||||||
this.ObtenerEmisores = function () {
|
this.ObtenerEmisores = function () {
|
||||||
|
|
||||||
if (ValidarPermisos('Ver catálogos').length > 0) {
|
|
||||||
var uri = CatalogosWCF + '/api/ObtenerEmisor';
|
var uri = CatalogosWCF + '/api/ObtenerEmisor';
|
||||||
AjaxPostData(uri, null, false, false, CargarGridEmisores, null, null);
|
AjaxPostData(uri, null, false, false, CargarGridEmisores, null, null);
|
||||||
}
|
|
||||||
else {
|
|
||||||
alert('No tiene permisos para ejecutar esta opción.');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1692,11 +1692,15 @@ this.DibujarTareasPendientes = function (data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ValidarPermisos = function (opcion) {
|
this.ValidarPermisos = function (opcion) {
|
||||||
|
var validar;
|
||||||
var validar = $.grep(localStorage['ListaOpciones'].split(","), function (data) {
|
validar = $.grep(localStorage['ListaOpciones'].split(","), function (data) {
|
||||||
return data == opcion;
|
return data == 'Super Usuario';
|
||||||
});
|
});
|
||||||
|
if (validar.length == 0) {
|
||||||
|
validar = $.grep(localStorage['ListaOpciones'].split(","), function (data) {
|
||||||
|
return data == opcion;
|
||||||
|
});
|
||||||
|
}
|
||||||
return validar;
|
return validar;
|
||||||
}
|
}
|
||||||
ObtenerPantallas = function () {
|
ObtenerPantallas = function () {
|
||||||
|
|
@ -1767,10 +1771,15 @@ this.AsignarUsuario = function (model) {
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ValidarAcceder = function (vista,controlador) {
|
this.ValidarAcceder = function (vista, controlador,opcion) {
|
||||||
url = $("#hiddenHref").val();
|
|
||||||
url = url.replace("View", vista);
|
if (ValidarPermisos(opcion).length > 0) {
|
||||||
url = url.replace("Controller", controlador);
|
url = $("#hiddenHref").val();
|
||||||
|
url = url.replace("View", vista);
|
||||||
document.location.href = url;
|
url = url.replace("Controller", controlador);
|
||||||
|
|
||||||
|
document.location.href = url;
|
||||||
|
} else {
|
||||||
|
toastr.warning('No tiene permisos para ejecutar esta opción', Message_Warning);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,12 +1,9 @@
|
||||||
|
|
||||||
var Item = {};
|
var Item = {};
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
if (ValidarPermisos('Ingreso y actualización de mantenimientos').length > 0) {
|
|
||||||
CargarMantenimiento();
|
CargarMantenimiento();
|
||||||
}
|
|
||||||
else {
|
|
||||||
alert('No tiene permisos para ejecutar esta opción.');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -40,6 +37,7 @@ this.CargarTablaMantenimiento = function (data) {
|
||||||
|
|
||||||
$('#tableMantenimiento').on('click', 'button', function () {
|
$('#tableMantenimiento').on('click', 'button', function () {
|
||||||
|
|
||||||
|
if (ValidarPermisos('Ver catálogos').length > 0) {
|
||||||
var data = $('#tableMantenimiento').DataTable().row($(this).parents('tr')).data();
|
var data = $('#tableMantenimiento').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
||||||
var mtzView = data.Vista.split('/')
|
var mtzView = data.Vista.split('/')
|
||||||
|
|
@ -49,5 +47,7 @@ $('#tableMantenimiento').on('click', 'button', function () {
|
||||||
url = url.replace("Controller", mtzView[0]);
|
url = url.replace("Controller", mtzView[0]);
|
||||||
|
|
||||||
document.location.href = url;
|
document.location.href = url;
|
||||||
|
} else {
|
||||||
|
toastr.warning('No tiene permisos para ejecutar esta opción', Message_Warning);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewBag.Title = "FichaTecnica";
|
ViewBag.Title = "FichaTecnica";
|
||||||
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>FichaTecnica</h2>
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,8 +166,8 @@
|
||||||
</a>
|
</a>
|
||||||
<ul class="treeview-menu">
|
<ul class="treeview-menu">
|
||||||
<span><i class="fa fa-circle text-success"> Acciones</i> </span>
|
<span><i class="fa fa-circle text-success"> Acciones</i> </span>
|
||||||
|
<li><a href="@Url.Action("FichaTecnica", "NormativaReglamentacionTecnica")"> Ficha Técnica</a></li>
|
||||||
<li onclick="Vali"><a href="@Url.Action("Mantenimiento", "Catalogos")"> Configuración de la </br> aplicación</a></li>
|
<li><a href="javascript: ValidarAcceder('Mantenimiento','Catalogos','Ingreso y actualización de mantenimientos');"> Configuración de la </br> aplicación</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
@ -179,8 +179,8 @@
|
||||||
</a>
|
</a>
|
||||||
<ul class="treeview-menu">
|
<ul class="treeview-menu">
|
||||||
<span><i class="fa fa-circle text-success"> Acciones</i> </span>
|
<span><i class="fa fa-circle text-success"> Acciones</i> </span>
|
||||||
<li><a href="@Url.Action("Index", "PropuestaNormativa")">Propuesta Normativa</a></li>
|
<li><a href="javascript: ValidarAcceder('Index','PropuestaNormativa','Crear propuesta normativa');">Propuesta Normativa</a></li>
|
||||||
<li><a href="@Url.Action("Foro", "PropuestaNormativa")"> Foro</a></li>
|
<li><a href="javascript: ValidarAcceder('Foro','PropuestaNormativa','Crear foro (no vinculado)');"> Foro</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="treeview">
|
<li class="treeview">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue