Validacion Promotor de Proyecto
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C215
This commit is contained in:
parent
b552532d5f
commit
6de3a6a750
1 changed files with 45 additions and 21 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
var IDTipoProyecto;
|
var IDTipoProyecto;
|
||||||
var model = {};
|
var model = {};
|
||||||
var EsRespuesta = false;
|
var EsRespuesta = false;
|
||||||
|
var EsPromotor = false;
|
||||||
var IDComentario = 0;
|
var IDComentario = 0;
|
||||||
var EsForo = false;
|
var EsForo = false;
|
||||||
var NombreDocumento;
|
var NombreDocumento;
|
||||||
|
|
@ -10,6 +11,9 @@ var SubTipoproyecto;
|
||||||
var respuestaForo;
|
var respuestaForo;
|
||||||
var IdPropuestaNormativa;
|
var IdPropuestaNormativa;
|
||||||
|
|
||||||
|
var Promotor;
|
||||||
|
var Estado;
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
$(document).tooltip();
|
$(document).tooltip();
|
||||||
|
|
@ -40,6 +44,12 @@ jQuery(document).ready(function () {
|
||||||
IDPropuesta = ObtenerParametros().propuesta;
|
IDPropuesta = ObtenerParametros().propuesta;
|
||||||
IDTipoProyecto = ObtenerParametros().tipo;
|
IDTipoProyecto = ObtenerParametros().tipo;
|
||||||
|
|
||||||
|
Promotor = ObtenerParametros().promotor;
|
||||||
|
Estado = ObtenerParametros().estado;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (IsNullOrEmpty(IDPropuesta)) {
|
if (IsNullOrEmpty(IDPropuesta)) {
|
||||||
alert("No ha seleccionado una propuesta");
|
alert("No ha seleccionado una propuesta");
|
||||||
$("#formDetallePropuesta").FormReadOnly();
|
$("#formDetallePropuesta").FormReadOnly();
|
||||||
|
|
@ -62,12 +72,13 @@ jQuery(document).ready(function () {
|
||||||
};
|
};
|
||||||
IdPropuestaNormativa = ROT47(IDPropuesta.toString());
|
IdPropuestaNormativa = ROT47(IDPropuesta.toString());
|
||||||
|
|
||||||
ObtenerPropuesta();
|
|
||||||
getDataModel();
|
getDataModel();
|
||||||
|
ObtenerPropuesta();
|
||||||
|
|
||||||
if ($("#txtPromotorProyecto").val() == UsuarioSistema) {
|
if ($("#txtPromotorProyecto").val() == UsuarioSistema) {
|
||||||
$("#txtFechaFinalizacion").noReadOnly();
|
$("#txtFechaFinalizacion").noReadOnly();
|
||||||
$('#btnModificar').enable();
|
$('#btnModificar').enable();
|
||||||
|
EsPromotor = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -100,12 +111,14 @@ this.getDataModel = function () {
|
||||||
|
|
||||||
$("#btnAgregarComentario").unbind("click");
|
$("#btnAgregarComentario").unbind("click");
|
||||||
$("#btnAgregarComentario").click(function () {
|
$("#btnAgregarComentario").click(function () {
|
||||||
|
if (EsPromotor == false) {
|
||||||
if (ValidarPermisos('Ingreso y actualización de área de foro').length <= 0 || $('#txtEstado').val() != "Inicial") {
|
if (ValidarPermisos('Ingreso y actualización de área de foro').length <= 0 || Estado != Estados.Inicial.Codigo) {
|
||||||
toastr.warning('No tiene permisos para ejecutar esta opción', Message_Warning);
|
toastr.warning('No tiene permisos para ejecutar esta opción', Message_Warning);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$("#divRespuesta").empty();
|
$("#divRespuesta").empty();
|
||||||
$("#lblcomentario").text("Comentario");
|
$("#lblcomentario").text("Comentario");
|
||||||
$("#txtAsunto").val('');
|
$("#txtAsunto").val('');
|
||||||
|
|
@ -169,16 +182,21 @@ this.getDataModel = function () {
|
||||||
$("#txtEstado").readOnly();
|
$("#txtEstado").readOnly();
|
||||||
$('#btnModificar').disable();
|
$('#btnModificar').disable();
|
||||||
|
|
||||||
if (ValidarPermisos('Ingreso y actualización de área de proyecto').length <= 0 || $('#txtEstado').val() != "Inicial" ) {
|
|
||||||
$("#tabs").tabs({
|
|
||||||
disabled: [2]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ValidarPermisos('Accesar expediente de foro').length <= 0 || $('#txtEstado').val() != "Inicial") {
|
if (EsPromotor == false) {
|
||||||
$("#tabs").tabs({
|
|
||||||
disabled: [3]
|
if (ValidarPermisos('Ingreso y actualización de área de proyecto').length <= 0 || Estado != Estados.Inicial.Codigo ) {
|
||||||
});
|
$("#tabs").tabs({
|
||||||
|
disabled: [2]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ValidarPermisos('Accesar expediente de foro').length <= 0 || Estado != Estados.Inicial.Codigo ) {
|
||||||
|
$("#tabs").tabs({
|
||||||
|
disabled: [3]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CargarUsuarios();
|
CargarUsuarios();
|
||||||
|
|
@ -1206,15 +1224,21 @@ $('#tableDocMatriz').on('click', 'button', function () {
|
||||||
|
|
||||||
this.AbrirAdjuntos = function (id) {
|
this.AbrirAdjuntos = function (id) {
|
||||||
|
|
||||||
if (id == 2 && ValidarPermisos('Accesar documentos auxiliares del foro').length <= 0) {
|
if (EsPromotor == false) {
|
||||||
toastr.warning('No tiene permisos para ejecutar esta opción', Message_Warning);
|
|
||||||
return;
|
if (id == 2 && ValidarPermisos('Accesar documentos auxiliares del foro').length <= 0) {
|
||||||
|
toastr.warning('No tiene permisos para ejecutar esta opción', Message_Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id == 3 && ValidarPermisos('Accesar expediente de propuesta normativa').length <= 0) {
|
||||||
|
toastr.warning('No tiene permisos para ejecutar esta opción', Message_Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id == 3 && ValidarPermisos('Accesar expediente de propuesta normativa').length <= 0) {
|
|
||||||
toastr.warning('No tiene permisos para ejecutar esta opción', Message_Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$('#hiddenSubTipoDocumento').val(id);
|
$('#hiddenSubTipoDocumento').val(id);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue