From f921a04eea65d65d1ffb2a6fe55832a2ad5a5dbc Mon Sep 17 00:00:00 2001 From: jmoya Date: Thu, 9 Aug 2018 17:04:18 +0000 Subject: [PATCH] permisos 2.1 git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C414 --- .../NormativaReglamentacionTecnica.js | 12 ++++++------ .../AYA.SlnSynor/Sinort-Scripts/TareasPendientes.js | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica.js index 3cdc5a1bb..a08cfb9ec 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/NormativaReglamentacionTecnica.js @@ -116,12 +116,12 @@ $('#tableSitios').on('click', 'button', function () { var data = $('#tableSitios').DataTable().row($(this).parents('tr')).data(); - //if (ValidarPermisos('Búsqueda rápida').length <= 0) { - // if (ValidarPermisos('Super Usuario').length <= 0) { - // toastr.warning(Message_NoGrants, Message_Warning); - // return; - // } - //} + if (ValidarPermisos('Búsqueda rápida').length <= 0) { + if (ValidarPermisos('Super Usuario').length <= 0) { + toastr.warning(Message_NoGrants, Message_Warning); + return; + } + } url = $("#hiddenHref").val(); url = url.replace("View", "FichaTecnica"); diff --git a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/TareasPendientes.js b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/TareasPendientes.js index c8f6dfcf6..b71a63621 100644 --- a/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/TareasPendientes.js +++ b/AYA.SlnSynor/AYA.SlnSynor/Sinort-Scripts/TareasPendientes.js @@ -404,15 +404,16 @@ this.GuardarRespuestaSolicitud = function () { this.GuardarRespuestaSolicitudCompra = function () { if (EstadoTipoUsuario == "1") { - if (ValidarPermisos('Autorización de compra de documento técnico').length <= 0) { - if (ValidarPermisos('Super Usuario').length <= 0) { - toastr.warning(Message_NoGrants, Message_Warning); - return; - } - } + justificacion = $('#txtJustificacionCompra').val(); if (EstadoConfirmacion) { + if (ValidarPermisos('Autorización de compra de documento técnico').length <= 0) { + if (ValidarPermisos('Super Usuario').length <= 0) { + toastr.warning(Message_NoGrants, Message_Warning); + return; + } + } if (!confirm("¿Está seguro que desea autorizar la solicitud de compra? .\n ¿Desea continuar?")) { return; } }