Recuperar contraseña, y editar aporte por promotor
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C458
This commit is contained in:
parent
61f1c673ad
commit
255f583fcc
8 changed files with 267 additions and 183 deletions
|
|
@ -97,7 +97,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
BaseJson InsertarUsuarioExterno(UsuarioExterno model);
|
BaseJson InsertarUsuarioExterno(UsuarioExterno model);
|
||||||
|
|
||||||
[OperationContract]
|
[OperationContract]
|
||||||
Usuario BuscarUsuarioExterno(CatalogosPostJSON model);
|
UsuarioExterno BuscarUsuarioExterno(CatalogosPostJSON model);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region RolesUsuario
|
#region RolesUsuario
|
||||||
|
|
|
||||||
|
|
@ -308,12 +308,12 @@ namespace AYA.SlnSinort.WCF
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region UsuarioExterno
|
#region UsuarioExterno
|
||||||
public Usuario BuscarUsuarioExterno(CatalogosPostJSON model)
|
public UsuarioExterno BuscarUsuarioExterno(CatalogosPostJSON model)
|
||||||
{
|
{
|
||||||
Usuario respuesta = null;
|
UsuarioExterno respuesta = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
respuesta = new UsuarioDAL().BuscarUsuario(model);
|
respuesta = new UsuarioExternoDAL().BuscarUsuario(model);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ this.getDataModel = function ()
|
||||||
{
|
{
|
||||||
$("#linkRecuperar").unbind("click");
|
$("#linkRecuperar").unbind("click");
|
||||||
$("#linkRecuperar").click(function () {
|
$("#linkRecuperar").click(function () {
|
||||||
$("#linkRecuperar").attr("href", recuperarContrasena());
|
recuperarContrasena();
|
||||||
});
|
});
|
||||||
$("#btnRegistro").unbind("click");
|
$("#btnRegistro").unbind("click");
|
||||||
$("#btnRegistro").click(function () {
|
$("#btnRegistro").click(function () {
|
||||||
|
|
@ -34,12 +34,12 @@ $('#txtContrasena').keyup(function (e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#linkRecuperar').keyup(function (e) {
|
//$('#linkRecuperar').keyup(function (e) {
|
||||||
if (e.which == 13) {
|
// if (e.which == 13) {
|
||||||
recuperarContrasena();
|
// recuperarContrasena();
|
||||||
|
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
|
|
||||||
function validarFormulario() {
|
function validarFormulario() {
|
||||||
|
|
||||||
|
|
@ -74,13 +74,13 @@ $('#txtUsuarioUnico').change(function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function recuperarContrasena() {
|
this.recuperarContrasena = function () {
|
||||||
|
|
||||||
model = {
|
model = {
|
||||||
codigo: $('#txtUsuarioUnico').val()
|
codigo: $('#txtUsuarioUnico').val()
|
||||||
}
|
}
|
||||||
var uri = SinorSignupWCF + '/api/BuscarUsuarioExterno';
|
var uri = SinorSignupWCF + '/api/BuscarUsuarioExterno';
|
||||||
AjaxPostData(uri, model, false, false, null, null, null);
|
AjaxPostData(uri, model, false, false, EnviarCorreoContrasena, null, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,12 +93,15 @@ this.EnviarCorreoContrasena = function (data) {
|
||||||
|
|
||||||
correo = {}
|
correo = {}
|
||||||
correo.PlantillaEmail = Plantilla;
|
correo.PlantillaEmail = Plantilla;
|
||||||
correo.UsuarioExterno = data.UsuarioExterno;
|
correo.UsuarioExterno = data;
|
||||||
var uri = SinorLoginWCF + '/api/EnviarCorreoAExterno';
|
var uri = SinorLoginWCF + '/api/EnviarCorreoAExterno';
|
||||||
AjaxPostData(uri, correo, false, true, null, null, null);
|
AjaxPostData(uri, correo, false, true, null, null, null);
|
||||||
|
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
toastr.warning('El usuario digitado no existe', Message_Warning);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.VerificarUsurarioBD = function () {
|
this.VerificarUsurarioBD = function () {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ var EstadoExpediente = -1;
|
||||||
var TipoExp;
|
var TipoExp;
|
||||||
var titulodoc = '';
|
var titulodoc = '';
|
||||||
var FechaDocumentos;
|
var FechaDocumentos;
|
||||||
|
var IDComentarioProyecto;
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
|
|
@ -26,12 +26,12 @@ jQuery(document).ready(function () {
|
||||||
function cerrar() {
|
function cerrar() {
|
||||||
$("#carga").animate({ "opacity": "0" }, 1000, function () { $("#carga").css("display", "none"); });
|
$("#carga").animate({ "opacity": "0" }, 1000, function () { $("#carga").css("display", "none"); });
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).tooltip();
|
$(document).tooltip();
|
||||||
$('#tableParticipantes').TableInit(0, false, true, true, false, null, null);
|
$('#tableParticipantes').TableInit(0, false, true, true, false, null, null);
|
||||||
$('#tableParticipantes').DataTable().column(1).visible(false);
|
$('#tableParticipantes').DataTable().column(1).visible(false);
|
||||||
$('#tableDiscusion').TableInit(0, false, true, true, false, null, null);
|
$('#tableDiscusion').TableInit(0, false, true, true, false, null, null);
|
||||||
|
|
||||||
$('#tableForo').TableInit(0, false, false, false, false, null, null);
|
$('#tableForo').TableInit(0, false, false, false, false, null, null);
|
||||||
$('#tableMatriz').TableInit(0, false, false, false, false, null, null);
|
$('#tableMatriz').TableInit(0, false, false, false, false, null, null);
|
||||||
$('#tableDocAuxiliares').TableInit(0, false, false, false, false, null, null);
|
$('#tableDocAuxiliares').TableInit(0, false, false, false, false, null, null);
|
||||||
|
|
@ -53,8 +53,8 @@ jQuery(document).ready(function () {
|
||||||
|
|
||||||
$("#tabs").tabs();
|
$("#tabs").tabs();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IDPropuesta = ObtenerParametros().propuesta;
|
IDPropuesta = ObtenerParametros().propuesta;
|
||||||
IDTipoProyecto = ObtenerParametros().tipo;
|
IDTipoProyecto = ObtenerParametros().tipo;
|
||||||
|
|
||||||
|
|
@ -85,7 +85,7 @@ jQuery(document).ready(function () {
|
||||||
IdProyectoNormativo: ROT47(IDPropuesta.toString())
|
IdProyectoNormativo: ROT47(IDPropuesta.toString())
|
||||||
};
|
};
|
||||||
IdPropuestaNormativa = ROT47(IDPropuesta.toString());
|
IdPropuestaNormativa = ROT47(IDPropuesta.toString());
|
||||||
|
|
||||||
$('#btnModificar').disable();
|
$('#btnModificar').disable();
|
||||||
$('#btnEliminar').disable();
|
$('#btnEliminar').disable();
|
||||||
$('#btnDiscusion').disable();
|
$('#btnDiscusion').disable();
|
||||||
|
|
@ -127,12 +127,11 @@ jQuery(document).ready(function () {
|
||||||
disabled: [3]
|
disabled: [3]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
if (EsPromotor == false) {
|
if (EsPromotor == false) {
|
||||||
|
|
||||||
if (ValidarPermisos('Ingreso y actualización de área de proyecto').length <= 0 || Estado != Estados.Activo.Codigo || Estado != Estados.Inicial.Codigo) {
|
if (ValidarPermisos('Ingreso y actualización de área de proyecto').length <= 0 || Estado != Estados.Activo.Codigo || Estado != Estados.Inicial.Codigo) {
|
||||||
|
|
@ -141,7 +140,7 @@ jQuery(document).ready(function () {
|
||||||
disabled: [2]
|
disabled: [2]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ValidarPermisos('Accesar expediente de propuesta normativa').length <= 0 || Estado != Estados.Contruccion.Codigo) {
|
if (ValidarPermisos('Accesar expediente de propuesta normativa').length <= 0 || Estado != Estados.Contruccion.Codigo) {
|
||||||
|
|
@ -150,31 +149,31 @@ jQuery(document).ready(function () {
|
||||||
disabled: [3]
|
disabled: [3]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#btnGuardarEvento').show();
|
$('#btnGuardarEvento').show();
|
||||||
$('#btnReenviarEvento').hide();
|
$('#btnReenviarEvento').hide();
|
||||||
Calendario(model.EventosJSON);
|
Calendario(model.EventosJSON);
|
||||||
|
|
||||||
if(Estado == "11"){
|
if (Estado == "11") {
|
||||||
$("#tabs").tabs({
|
$("#tabs").tabs({
|
||||||
disabled: [1,2]
|
disabled: [1, 2]
|
||||||
});
|
});
|
||||||
$('#btnVerAdjuntosExpediente').disable();
|
$('#btnVerAdjuntosExpediente').disable();
|
||||||
$('#btnAbrirListaDocAux').disable();
|
$('#btnAbrirListaDocAux').disable();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.getDataModel = function () {
|
this.getDataModel = function () {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#btnEliminarDiscusion").unbind("click");
|
$("#btnEliminarDiscusion").unbind("click");
|
||||||
$("#btnEliminarDiscusion").click(function () {
|
$("#btnEliminarDiscusion").click(function () {
|
||||||
|
|
@ -224,8 +223,8 @@ this.getDataModel = function () {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$("#divRespuesta").empty();
|
$("#divRespuesta").empty();
|
||||||
$("#lblcomentario").text("Comentario");
|
$("#lblcomentario").text("Comentario");
|
||||||
$("#txtAsunto").val('');
|
$("#txtAsunto").val('');
|
||||||
|
|
@ -245,8 +244,8 @@ this.getDataModel = function () {
|
||||||
|
|
||||||
$("#btnAgregarElemento").unbind("click");
|
$("#btnAgregarElemento").unbind("click");
|
||||||
$("#btnAgregarElemento").click(function () {
|
$("#btnAgregarElemento").click(function () {
|
||||||
|
|
||||||
if (EsPromotor == false && Participa == true || EsPromotor == true || ValidarPermisos('Administrador Funcional').length > 0) {
|
if (EsPromotor == false && Participa == true || EsPromotor == true || ValidarPermisos('Administrador Funcional').length > 0) {
|
||||||
$("#divRespuestaMatriz").empty();
|
$("#divRespuestaMatriz").empty();
|
||||||
$("#lblAsuntoM").text("*Asunto");
|
$("#lblAsuntoM").text("*Asunto");
|
||||||
$("#lblCapitulo").text("*Capítulo");
|
$("#lblCapitulo").text("*Capítulo");
|
||||||
|
|
@ -298,18 +297,18 @@ this.getDataModel = function () {
|
||||||
$("#btnReenviarEvento").click(function () {
|
$("#btnReenviarEvento").click(function () {
|
||||||
ReenviarEvento();
|
ReenviarEvento();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#txtFechaFinalizacion").datepicker();
|
$("#txtFechaFinalizacion").datepicker();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CargarUsuarios();
|
CargarUsuarios();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
this.EliminarDiscusionFocalizada = function () {
|
this.EliminarDiscusionFocalizada = function () {
|
||||||
|
|
||||||
|
|
@ -317,25 +316,25 @@ this.EliminarDiscusionFocalizada = function () {
|
||||||
|
|
||||||
|
|
||||||
var tableDiscusion = $('#tableDiscusion').DataTable();
|
var tableDiscusion = $('#tableDiscusion').DataTable();
|
||||||
|
|
||||||
var data = tableDiscusion
|
var data = tableDiscusion
|
||||||
.rows()
|
.rows()
|
||||||
.data();
|
.data();
|
||||||
|
|
||||||
$.each(data, function (key, item) {
|
$.each(data, function (key, item) {
|
||||||
EliminarConvocatoriaProyectoNormativo(item[0]);
|
EliminarConvocatoriaProyectoNormativo(item[0]);
|
||||||
|
|
||||||
});
|
});
|
||||||
ActualizarConvocados();
|
ActualizarConvocados();
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
this.DiscusionFocalizada = function () {
|
this.DiscusionFocalizada = function () {
|
||||||
|
|
||||||
$('#modalBuscarUsuarioDiscusion').modal('show');
|
$('#modalBuscarUsuarioDiscusion').modal('show');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ActualizarItem = function (accion) {
|
this.ActualizarItem = function (accion) {
|
||||||
|
|
||||||
|
|
||||||
if (!confirm((accion == true) ? "Se guardarán los cambios.\n ¿Desea continuar?" : "Desea eliminar el registro.\n ¿Desea continuar?"))
|
if (!confirm((accion == true) ? "Se guardarán los cambios.\n ¿Desea continuar?" : "Desea eliminar el registro.\n ¿Desea continuar?"))
|
||||||
{ return; }
|
{ return; }
|
||||||
|
|
@ -344,13 +343,13 @@ this.ActualizarItem = function (accion) {
|
||||||
model.ProyectoNormativo.Estado = (accion == true) ? model.ProyectoNormativo.Estado : Estados.Eliminado.Descripcion;
|
model.ProyectoNormativo.Estado = (accion == true) ? model.ProyectoNormativo.Estado : Estados.Eliminado.Descripcion;
|
||||||
|
|
||||||
model.ProyectoNormativo.FechaFinConsulta = $('#txtFechaFinalizacion').DateFormatWCF();
|
model.ProyectoNormativo.FechaFinConsulta = $('#txtFechaFinalizacion').DateFormatWCF();
|
||||||
|
|
||||||
var uri = SinortWCF + '/api/GuardarProyectoNormativo';
|
var uri = SinortWCF + '/api/GuardarProyectoNormativo';
|
||||||
AjaxPostData(uri, model, true, true, CompletarAccion, null, null);
|
AjaxPostData(uri, model, true, true, CompletarAccion, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.CompletarAccion = function () {
|
this.CompletarAccion = function () {
|
||||||
|
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -421,7 +420,7 @@ this.CargarFormulario = function (data) {
|
||||||
|
|
||||||
//CONVOCADOS
|
//CONVOCADOS
|
||||||
CargarConvocados(model.ProyectoNormativo.Convocatoria);
|
CargarConvocados(model.ProyectoNormativo.Convocatoria);
|
||||||
|
|
||||||
|
|
||||||
//AREA DE TRABAJO
|
//AREA DE TRABAJO
|
||||||
CargarForo();
|
CargarForo();
|
||||||
|
|
@ -492,26 +491,26 @@ this.CargarConvocados = function (data) {
|
||||||
var participanteConfirmado = $("#ucItemsIcon").html();
|
var participanteConfirmado = $("#ucItemsIcon").html();
|
||||||
participanteConfirmado = replaceAll("[$icon]", "fa-check-circle", participanteConfirmado);
|
participanteConfirmado = replaceAll("[$icon]", "fa-check-circle", participanteConfirmado);
|
||||||
|
|
||||||
if (item.Participante !== true && item.Justificacion == null){
|
if (item.Participante !== true && item.Justificacion == null) {
|
||||||
participanteConfirmado = replaceAll("[$state_color]", "muted", participanteConfirmado);
|
participanteConfirmado = replaceAll("[$state_color]", "muted", participanteConfirmado);
|
||||||
if (UsuarioSistema == item.UsuarioSistema)
|
if (UsuarioSistema == item.UsuarioSistema)
|
||||||
Participa = false;
|
Participa = false;
|
||||||
|
|
||||||
|
|
||||||
}else{
|
|
||||||
if (item.Participante !== true && item.Justificacion !== null){
|
} else {
|
||||||
participanteConfirmado = replaceAll("[$state_color]", "danger", participanteConfirmado);
|
if (item.Participante !== true && item.Justificacion !== null) {
|
||||||
}else {
|
participanteConfirmado = replaceAll("[$state_color]", "danger", participanteConfirmado);
|
||||||
participanteConfirmado = replaceAll("[$state_color]", "success", participanteConfirmado);
|
} else {
|
||||||
if (UsuarioSistema == item.UsuarioSistema)
|
participanteConfirmado = replaceAll("[$state_color]", "success", participanteConfirmado);
|
||||||
Participa = true;
|
if (UsuarioSistema == item.UsuarioSistema)
|
||||||
|
Participa = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (item.DiscusionFocalizada == false) {
|
if (item.DiscusionFocalizada == false) {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -526,16 +525,16 @@ this.CargarConvocados = function (data) {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$('#txtAsuntoDiscusion').val(item.AsuntoDiscusionFocalizada)
|
$('#txtAsuntoDiscusion').val(item.AsuntoDiscusionFocalizada)
|
||||||
|
|
||||||
tableDiscusion.row.add(
|
tableDiscusion.row.add(
|
||||||
[item.UsuarioSistema,
|
[item.UsuarioSistema,
|
||||||
item.Usuario.NombreUsuario,
|
item.Usuario.NombreUsuario,
|
||||||
option])
|
option])
|
||||||
.draw();
|
.draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
if ($('#txtAsuntoDiscusion').val() != '') {
|
if ($('#txtAsuntoDiscusion').val() != '') {
|
||||||
$('#txtAsuntoDiscusion').prop("readOnly", true);
|
$('#txtAsuntoDiscusion').prop("readOnly", true);
|
||||||
|
|
@ -660,7 +659,7 @@ this.AgregarUsuarioDiscusion = function () {
|
||||||
|
|
||||||
this.BuscarUsuario = function () {
|
this.BuscarUsuario = function () {
|
||||||
SelectedCatalog = 'Usuarios';
|
SelectedCatalog = 'Usuarios';
|
||||||
|
|
||||||
|
|
||||||
if (EsPromotor == true || ValidarPermisos('Administrador Funcional').length > 0) {
|
if (EsPromotor == true || ValidarPermisos('Administrador Funcional').length > 0) {
|
||||||
if ($.fn.DataTable.isDataTable('#tableUsuarios')) {
|
if ($.fn.DataTable.isDataTable('#tableUsuarios')) {
|
||||||
|
|
@ -674,16 +673,16 @@ this.BuscarUsuario = function () {
|
||||||
} else {
|
} else {
|
||||||
toastr.warning(Message_NoGrants, Message_Warning);
|
toastr.warning(Message_NoGrants, Message_Warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.AgregarUsuario = function () {
|
this.AgregarUsuario = function () {
|
||||||
|
|
||||||
if ($("#txtUsuario").val() != "") {
|
if ($("#txtUsuario").val() != "") {
|
||||||
|
|
||||||
if (!confirm("¿Desea convocar a un nuevo usuario?")) return;
|
if (!confirm("¿Desea convocar a un nuevo usuario?")) return;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var tableParticipantes = $('#tableParticipantes').DataTable();
|
var tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
var option = $("#ucbtnRemoverParticipante").html();
|
var option = $("#ucbtnRemoverParticipante").html();
|
||||||
var participanteConfirmado = $("#ucItemsIcon").html();
|
var participanteConfirmado = $("#ucItemsIcon").html();
|
||||||
|
|
@ -743,28 +742,28 @@ this.AgregarUsuario = function () {
|
||||||
// .draw();
|
// .draw();
|
||||||
|
|
||||||
//toastr.success(Message_Default, Message_Success);
|
//toastr.success(Message_Default, Message_Success);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.GuardarTareasPendientes = function () {
|
this.GuardarTareasPendientes = function () {
|
||||||
|
|
||||||
var ArrayConvocados = [];
|
var ArrayConvocados = [];
|
||||||
|
|
||||||
TareaPendiente
|
TareaPendiente
|
||||||
= {
|
= {
|
||||||
Descripcion: 'Convocatoria para el proceso de consulta para el proyecto normativo :' + $("#txtNombreProyecto").val(),
|
Descripcion: 'Convocatoria para el proceso de consulta para el proyecto normativo :' + $("#txtNombreProyecto").val(),
|
||||||
ContenidoRelacionado: 'Propuesta normativa ' + $("#txtNombreProyecto").val(),
|
ContenidoRelacionado: 'Propuesta normativa ' + $("#txtNombreProyecto").val(),
|
||||||
Respuesta: false,
|
Respuesta: false,
|
||||||
FechaVencimiento: $("#txtFechaMaxima").DateFormatWCF(),
|
FechaVencimiento: $("#txtFechaMaxima").DateFormatWCF(),
|
||||||
TipoTareaPendiente: 'Convocatoria',
|
TipoTareaPendiente: 'Convocatoria',
|
||||||
UsuarioAsignado: $("#hiddenUsuario").val(),
|
UsuarioAsignado: $("#hiddenUsuario").val(),
|
||||||
IdProyectoNormativo: IdPropuestaNormativa,
|
IdProyectoNormativo: IdPropuestaNormativa,
|
||||||
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||||
PromotorProyectoNormativo: $("#txtPromotorProyecto").val()
|
PromotorProyectoNormativo: $("#txtPromotorProyecto").val()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ArrayConvocados.push(TareaPendiente);
|
||||||
|
|
||||||
ArrayConvocados.push(TareaPendiente);
|
|
||||||
|
|
||||||
|
|
||||||
var uri = SinortWCF + '/api/InsertarActualizarTareasPendientes';
|
var uri = SinortWCF + '/api/InsertarActualizarTareasPendientes';
|
||||||
var model = {
|
var model = {
|
||||||
|
|
@ -774,18 +773,18 @@ this.GuardarTareasPendientes = function () {
|
||||||
AjaxPostData(uri, model, false, false, null, null, null);
|
AjaxPostData(uri, model, false, false, null, null, null);
|
||||||
EnviarCorreo();
|
EnviarCorreo();
|
||||||
ActualizarConvocados();
|
ActualizarConvocados();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.EnviarCorreo = function () {
|
this.EnviarCorreo = function () {
|
||||||
|
|
||||||
var ArrayParticipante = [];
|
var ArrayParticipante = [];
|
||||||
|
|
||||||
Convocatoria = {
|
Convocatoria = {
|
||||||
UsuarioSistema: $("#hiddenUsuario").val()
|
UsuarioSistema: $("#hiddenUsuario").val()
|
||||||
}
|
}
|
||||||
ArrayParticipante.push(Convocatoria);
|
ArrayParticipante.push(Convocatoria);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var PropuestaNormativa
|
var PropuestaNormativa
|
||||||
|
|
@ -822,12 +821,12 @@ this.EnviarCorreoDiscusionFocalizada = function () {
|
||||||
|
|
||||||
var PropuestaNormativa = {
|
var PropuestaNormativa = {
|
||||||
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||||
Matriz : url
|
Matriz: url
|
||||||
}
|
}
|
||||||
|
|
||||||
var Plantilla = {
|
var Plantilla = {
|
||||||
NombrePlatilla: 'Correo Discusion Focalizada'
|
NombrePlatilla: 'Correo Discusion Focalizada'
|
||||||
}
|
}
|
||||||
|
|
||||||
var Asunto = {
|
var Asunto = {
|
||||||
AsuntoDiscusionFocalizada: $("#txtAsuntoDiscusion").val()
|
AsuntoDiscusionFocalizada: $("#txtAsuntoDiscusion").val()
|
||||||
|
|
@ -840,7 +839,7 @@ this.EnviarCorreoDiscusionFocalizada = function () {
|
||||||
model.Convocado = Asunto;
|
model.Convocado = Asunto;
|
||||||
AjaxPostData(uri, model, false, true, ActualizarConvocados, null, null);
|
AjaxPostData(uri, model, false, true, ActualizarConvocados, null, null);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.EnviarCorreoCierreProyecto = function () {
|
this.EnviarCorreoCierreProyecto = function () {
|
||||||
|
|
@ -862,7 +861,7 @@ this.EnviarCorreoCierreProyecto = function () {
|
||||||
|
|
||||||
ArrayParticipante.push(Convocatoria);
|
ArrayParticipante.push(Convocatoria);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
var url = window.location.href;
|
var url = window.location.href;
|
||||||
url = url.replace("estado=3", "estado=11");
|
url = url.replace("estado=3", "estado=11");
|
||||||
|
|
@ -984,8 +983,8 @@ this.VisualizarRespuestas = function (IdComentario) {
|
||||||
|
|
||||||
$.each(respuestas, function (key, item) {
|
$.each(respuestas, function (key, item) {
|
||||||
|
|
||||||
|
|
||||||
var el = $("#btnDocRespuesta")[0];
|
var el = $("#btnDocRespuesta")[0];
|
||||||
el.style.display = (item.IdDocumento == null) ? 'none' : 'block';
|
el.style.display = (item.IdDocumento == null) ? 'none' : 'block';
|
||||||
respuestaForo = $("#ucVisualizar").html();
|
respuestaForo = $("#ucVisualizar").html();
|
||||||
CargarDocumentosForoRespuesta(item.IdDocumento);
|
CargarDocumentosForoRespuesta(item.IdDocumento);
|
||||||
|
|
@ -1046,14 +1045,59 @@ this.VerDetalleAporte = function (IdComentario, IdTipoComentario) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.EditarAporte = function (IdComentario, IdTipoComentario) {
|
||||||
|
|
||||||
|
var comentario = $.grep(model.ProyectoNormativo.ComentariosProyecto, function (data) {
|
||||||
|
return data.IdComentarioProyecto == IdComentario;
|
||||||
|
})[0];
|
||||||
|
|
||||||
|
IDComentarioProyecto = IdComentario;
|
||||||
|
|
||||||
|
if (IdTipoComentario == Comentarios.Foro.Codigo) {
|
||||||
|
$("#divRespuesta").empty();
|
||||||
|
$("#lblcomentario").text("Comentario");
|
||||||
|
$("#txtAsunto").val(comentario.Asunto);
|
||||||
|
$("#txtComentario").val(comentario.Comentario);
|
||||||
|
$('#modalDiscusion-footer').css("display", "none");
|
||||||
|
$('#modalDiscusion').modal('show');
|
||||||
|
$("#txtAsunto").val(comentario.Asunto);
|
||||||
|
$('#btnVerAdjuntosForo').prop("disabled", true);
|
||||||
|
CargarDocumentosForo(comentario.IdDocumento);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IdTipoComentario == Comentarios.Matriz.Codigo) {
|
||||||
|
$("#divRespuestaMatriz").empty();
|
||||||
|
$("#lblAsuntoM").text("Asunto");
|
||||||
|
$("#lblCapitulo").text("Capítulo");
|
||||||
|
$("#lblApartado").text("Apartado");
|
||||||
|
$("#lblTextoOriginal").text("Texto Original");
|
||||||
|
$("#lblComentarioMatriz").text("Comentario");
|
||||||
|
$("#txtAsuntoMatriz").val(comentario.Asunto);
|
||||||
|
$("#txtComentarioMatriz").val(comentario.Comentario);
|
||||||
|
$("#txtCapituloMatriz").val(comentario.Capitulo);
|
||||||
|
$("#txtApartadoMatriz").val(comentario.Apartado);
|
||||||
|
$("#txtTextoOriginal").val(comentario.TextoOriginal);
|
||||||
|
$("#txtTextoPropuesto").val(comentario.TextoPropuesto);
|
||||||
|
$('#modalElemento-footer').css("display", "block");
|
||||||
|
$('#modalElemento').modal('show');
|
||||||
|
$('#btnVerAdjuntosMatriz').prop("disabled", false);
|
||||||
|
$('#txtAsuntoMatriz').attr('readonly', false);
|
||||||
|
$('#txtCapituloMatriz').attr('readonly', false);
|
||||||
|
$('#txtApartadoMatriz').attr('readonly', false);
|
||||||
|
$('#txtTextoOriginal').attr('readonly', false);
|
||||||
|
$('#txtTextoPropuesto').attr('readonly', false);
|
||||||
|
CargarDocumentosMatriz(comentario.IdDocumento);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
//MATRIZ
|
//MATRIZ
|
||||||
this.CargarMatriz = function () {
|
this.CargarMatriz = function () {
|
||||||
|
|
||||||
var tableMatriz = $('#tableMatriz').DataTable();
|
var tableMatriz = $('#tableMatriz').DataTable();
|
||||||
tableMatriz.clear().draw();
|
tableMatriz.clear().draw();
|
||||||
|
|
||||||
var listaComentarios = $.grep(model.ProyectoNormativo.ComentariosProyecto, function (data) {
|
var listaComentarios = $.grep(model.ProyectoNormativo.ComentariosProyecto, function (data) {
|
||||||
return data.IdTipoComentario == Comentarios.Matriz.Codigo && data.Respuesta == null;
|
return data.IdTipoComentario == Comentarios.Matriz.Codigo && data.Respuesta == null;
|
||||||
});
|
});
|
||||||
|
|
||||||
$.each(listaComentarios, function (key, item) {
|
$.each(listaComentarios, function (key, item) {
|
||||||
|
|
@ -1068,6 +1112,16 @@ this.CargarMatriz = function () {
|
||||||
var btnResponder = $("#ucbtResponderMatriz").html();
|
var btnResponder = $("#ucbtResponderMatriz").html();
|
||||||
btnResponder = replaceAll("[$IdComentario]", item.IdComentarioProyecto, btnResponder);
|
btnResponder = replaceAll("[$IdComentario]", item.IdComentarioProyecto, btnResponder);
|
||||||
|
|
||||||
|
var btnEditar = $("#ucbtEditar").html();
|
||||||
|
|
||||||
|
if (UsuarioSistema == Promotor) {
|
||||||
|
btnEditar = replaceAll("[$IdComentario]", item.IdComentarioProyecto, btnEditar);
|
||||||
|
btnEditar = replaceAll("[$IdTipoComentario]", item.IdTipoComentario, btnEditar);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
btnEditar = "";
|
||||||
|
}
|
||||||
|
|
||||||
var respuestas = $.grep(listaComentarios, function (data) {
|
var respuestas = $.grep(listaComentarios, function (data) {
|
||||||
return data.Respuesta == item.IdComentarioProyecto;
|
return data.Respuesta == item.IdComentarioProyecto;
|
||||||
});
|
});
|
||||||
|
|
@ -1076,7 +1130,8 @@ this.CargarMatriz = function () {
|
||||||
btnComentario,
|
btnComentario,
|
||||||
btnRespuesta,
|
btnRespuesta,
|
||||||
item.UsuarioSistema,
|
item.UsuarioSistema,
|
||||||
btnResponder]).draw();
|
btnResponder,
|
||||||
|
btnEditar]).draw();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1101,6 +1156,7 @@ this.GuardarComentarioMatriz = function () {
|
||||||
var uri = SinortWCF + '/api/GuardarComentarioProyectoNormativo';
|
var uri = SinortWCF + '/api/GuardarComentarioProyectoNormativo';
|
||||||
|
|
||||||
model.Comentario = {
|
model.Comentario = {
|
||||||
|
IdComentarioProyecto: IDComentarioProyecto != null ? IDComentarioProyecto : null,
|
||||||
IdProyectoNormativo: model.ProyectoNormativo.IdProyectoNormativo,
|
IdProyectoNormativo: model.ProyectoNormativo.IdProyectoNormativo,
|
||||||
Asunto: $("#txtAsuntoMatriz").val(),
|
Asunto: $("#txtAsuntoMatriz").val(),
|
||||||
Capitulo: $("#txtCapituloMatriz").val(),
|
Capitulo: $("#txtCapituloMatriz").val(),
|
||||||
|
|
@ -1114,7 +1170,7 @@ this.GuardarComentarioMatriz = function () {
|
||||||
IdDocumento: Iddoc
|
IdDocumento: Iddoc
|
||||||
}
|
}
|
||||||
|
|
||||||
AjaxPostData(uri, model, false, true, ComentarioMatrizGuardado, null, null);
|
AjaxPostData(uri, model, false, false, ComentarioMatrizGuardado, null, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1260,7 +1316,7 @@ this.CargarTablaDocumentosAuxiliares = function (data) {
|
||||||
option2 = replaceAll("[$nombre]", "'" + item.RutaDescarga + "'", option2);
|
option2 = replaceAll("[$nombre]", "'" + item.RutaDescarga + "'", option2);
|
||||||
option2 = replaceAll("[$id]", item.IdDocumentoAdjunto, option2);
|
option2 = replaceAll("[$id]", item.IdDocumentoAdjunto, option2);
|
||||||
option2 = replaceAll("[$usuario]", "'" + item.UsuarioCreacion + "'", option2);
|
option2 = replaceAll("[$usuario]", "'" + item.UsuarioCreacion + "'", option2);
|
||||||
|
|
||||||
var ext = item.TipoArchivo.toLowerCase();
|
var ext = item.TipoArchivo.toLowerCase();
|
||||||
switch (ext) {
|
switch (ext) {
|
||||||
case 'pdf':
|
case 'pdf':
|
||||||
|
|
@ -1347,9 +1403,9 @@ this.CargarTablaListaDocumentosAuxiliares = function (data) {
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.CopiarAdjunto = function (titulo,nombre) {
|
this.CopiarAdjunto = function (titulo, nombre) {
|
||||||
if (!confirm("¿Desea agregar el documento en el expediente?")) return;
|
if (!confirm("¿Desea agregar el documento en el expediente?")) return;
|
||||||
|
|
||||||
var separador = "/";
|
var separador = "/";
|
||||||
var arregloDeSubCadenas = nombre.split(separador);
|
var arregloDeSubCadenas = nombre.split(separador);
|
||||||
var nombreactual = arregloDeSubCadenas[arregloDeSubCadenas.length - 1]
|
var nombreactual = arregloDeSubCadenas[arregloDeSubCadenas.length - 1]
|
||||||
|
|
@ -1414,7 +1470,7 @@ this.CargarTablaDocumentosExpediente = function (data) {
|
||||||
var option2 = $("#ucEliminarDocumento").html();
|
var option2 = $("#ucEliminarDocumento").html();
|
||||||
option2 = replaceAll("[$nombre]", "'" + item.RutaDescarga + "'", option2);
|
option2 = replaceAll("[$nombre]", "'" + item.RutaDescarga + "'", option2);
|
||||||
option2 = replaceAll("[$id]", item.IdDocumentoAdjunto, option2);
|
option2 = replaceAll("[$id]", item.IdDocumentoAdjunto, option2);
|
||||||
option2 = replaceAll("[$usuario]", "'" + item.UsuarioCreacion + "'", option2);
|
option2 = replaceAll("[$usuario]", "'" + item.UsuarioCreacion + "'", option2);
|
||||||
var ext = item.TipoArchivo.toLowerCase();
|
var ext = item.TipoArchivo.toLowerCase();
|
||||||
switch (ext) {
|
switch (ext) {
|
||||||
case 'pdf':
|
case 'pdf':
|
||||||
|
|
@ -1452,33 +1508,33 @@ this.CargarTablaDocumentosExpediente = function (data) {
|
||||||
});
|
});
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
this.AbrirDocAdjuntos = function (ruta){
|
this.AbrirDocAdjuntos = function (ruta) {
|
||||||
window.open(ruta);
|
window.open(ruta);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.RemoverAdjunto = function (nombre,id,usuario) {
|
this.RemoverAdjunto = function (nombre, id, usuario) {
|
||||||
if (Estado != "11"){
|
if (Estado != "11") {
|
||||||
if (!confirm("¿Desea eliminar el documento?")) return;
|
if (!confirm("¿Desea eliminar el documento?")) return;
|
||||||
|
|
||||||
if (UsuarioSistema == usuario){
|
if (UsuarioSistema == usuario) {
|
||||||
|
|
||||||
var separador = "/";
|
var separador = "/";
|
||||||
var arregloDeSubCadenas = nombre.split(separador);
|
var arregloDeSubCadenas = nombre.split(separador);
|
||||||
var nombredoc = arregloDeSubCadenas[arregloDeSubCadenas.length-1]
|
var nombredoc = arregloDeSubCadenas[arregloDeSubCadenas.length - 1]
|
||||||
|
|
||||||
|
|
||||||
var uri = SinortWCF + '/api/RemoverAdjunto';
|
var uri = SinortWCF + '/api/RemoverAdjunto';
|
||||||
IdDocumentoAdjunto = id;
|
IdDocumentoAdjunto = id;
|
||||||
var model = {
|
var model = {
|
||||||
Nombre: nombredoc,
|
Nombre: nombredoc,
|
||||||
Carpeta: RepositorioLocal
|
Carpeta: RepositorioLocal
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
AjaxPostData(uri, model, false, true, EliminarbaseAdjunto, null, null);
|
AjaxPostData(uri, model, false, true, EliminarbaseAdjunto, null, null);
|
||||||
} else {
|
} else {
|
||||||
toastr.warning(Message_NoGrants, Message_Warning);
|
toastr.warning(Message_NoGrants, Message_Warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
toastr.warning("No puede eliminar documentos en estado final", Message_Warning);
|
toastr.warning("No puede eliminar documentos en estado final", Message_Warning);
|
||||||
|
|
@ -1497,7 +1553,7 @@ this.EliminarbaseAdjunto = function (data) {
|
||||||
CargarDocumentosExpediente();
|
CargarDocumentosExpediente();
|
||||||
CargarDocumentosAuxiliares();
|
CargarDocumentosAuxiliares();
|
||||||
CargarListaDocumentosAuxiliares();
|
CargarListaDocumentosAuxiliares();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
|
|
@ -1520,7 +1576,7 @@ this.CargarDocumentosForoRespuesta = function (id) {
|
||||||
}
|
}
|
||||||
this.CargarTablaDocumentosForoRespuesta = function (data) {
|
this.CargarTablaDocumentosForoRespuesta = function (data) {
|
||||||
|
|
||||||
|
|
||||||
var lista = data;
|
var lista = data;
|
||||||
|
|
||||||
$.each(lista, function (key, item) {
|
$.each(lista, function (key, item) {
|
||||||
|
|
@ -1554,7 +1610,7 @@ this.CargarTablaDocumentosForoRespuesta = function (data) {
|
||||||
|
|
||||||
respuestaForo = replaceAll("[$NombreDoc]", item.Nombre, respuestaForo);
|
respuestaForo = replaceAll("[$NombreDoc]", item.Nombre, respuestaForo);
|
||||||
$('#hiddenRutaDoc').val(item.RutaDescarga)
|
$('#hiddenRutaDoc').val(item.RutaDescarga)
|
||||||
|
|
||||||
});
|
});
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
|
|
@ -1802,9 +1858,9 @@ this.AbrirAdjuntos = function (id) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#hiddenSubTipoDocumento').val(id);
|
$('#hiddenSubTipoDocumento').val(id);
|
||||||
if (EsForo) {
|
if (EsForo) {
|
||||||
DescTipoproyecto = Proyectos.Foro.Descripcion;
|
DescTipoproyecto = Proyectos.Foro.Descripcion;
|
||||||
|
|
@ -1852,8 +1908,8 @@ this.AbrirAdjuntos = function (id) {
|
||||||
$('#modalDocumentosAuxiliares').modal('show');
|
$('#modalDocumentosAuxiliares').modal('show');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#cboxDocAux').change(function () {
|
$('#cboxDocAux').change(function () {
|
||||||
|
|
@ -1871,10 +1927,10 @@ $('#cboxDocAux').change(function () {
|
||||||
|
|
||||||
$("#drpTipoExpediente").change(function () {
|
$("#drpTipoExpediente").change(function () {
|
||||||
EstadoExpediente = this.value;
|
EstadoExpediente = this.value;
|
||||||
if (EstadoExpediente == 0 ) {
|
if (EstadoExpediente == 0) {
|
||||||
TipoExp = 'Versión final'
|
TipoExp = 'Versión final'
|
||||||
}
|
}
|
||||||
if (EstadoExpediente == 1 ) {
|
if (EstadoExpediente == 1) {
|
||||||
TipoExp = 'Informe de cierre'
|
TipoExp = 'Informe de cierre'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -1884,7 +1940,7 @@ this.GuardarAdjuntos = function (nombre) {
|
||||||
var uri = SinortWCF + '/api/GuardarAdjuntos';
|
var uri = SinortWCF + '/api/GuardarAdjuntos';
|
||||||
var ruta;
|
var ruta;
|
||||||
var nombredoc = replaceAll(" ", "_", nombre);
|
var nombredoc = replaceAll(" ", "_", nombre);
|
||||||
|
|
||||||
var Idetipoproyecto;
|
var Idetipoproyecto;
|
||||||
var DesTipoProyecto;
|
var DesTipoProyecto;
|
||||||
var cheched = $("#cboxDocAux").prop("checked") ? true : false
|
var cheched = $("#cboxDocAux").prop("checked") ? true : false
|
||||||
|
|
@ -2009,7 +2065,7 @@ this.CargarGridComentario = function (data) {
|
||||||
lista.RutaDescarga]).draw();
|
lista.RutaDescarga]).draw();
|
||||||
|
|
||||||
$('#btnVerAdjuntosEvento').prop("disabled", true);
|
$('#btnVerAdjuntosEvento').prop("disabled", true);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -2024,7 +2080,7 @@ function ActualizarUpload() {
|
||||||
|
|
||||||
|
|
||||||
$('#fileupload').fileupload({
|
$('#fileupload').fileupload({
|
||||||
|
|
||||||
url: FileUploadHandler + '/FileUploadHandler.ashx?tipo=' + FechaDocumentos + '&id=' + model.ProyectoNormativo.IdProyectoNormativo + '&carpeta=' + SubTipoproyecto,
|
url: FileUploadHandler + '/FileUploadHandler.ashx?tipo=' + FechaDocumentos + '&id=' + model.ProyectoNormativo.IdProyectoNormativo + '&carpeta=' + SubTipoproyecto,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
|
||||||
|
|
@ -2062,7 +2118,7 @@ function ActualizarUpload() {
|
||||||
$('#progress .progress-bar').css(
|
$('#progress .progress-bar').css(
|
||||||
'width', '0%');
|
'width', '0%');
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
|
|
||||||
$('#modalDocumentosAuxiliares').modal('hide');
|
$('#modalDocumentosAuxiliares').modal('hide');
|
||||||
toastr.success("Acción completada con exito", Message_Success);
|
toastr.success("Acción completada con exito", Message_Success);
|
||||||
},
|
},
|
||||||
|
|
@ -2085,7 +2141,7 @@ function ActualizarUpload() {
|
||||||
this.ActualizarEstadoProyecto = function () {
|
this.ActualizarEstadoProyecto = function () {
|
||||||
|
|
||||||
|
|
||||||
model.ProyectoNormativo.IdEstado = Estados.Final.Codigo;
|
model.ProyectoNormativo.IdEstado = Estados.Final.Codigo;
|
||||||
model.ProyectoNormativo.Estado = Estados.Final.Descripcion;
|
model.ProyectoNormativo.Estado = Estados.Final.Descripcion;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2095,11 +2151,11 @@ this.ActualizarEstadoProyecto = function () {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Calendario
|
//Calendario
|
||||||
this.ReenviarEvento = function () {
|
this.ReenviarEvento = function () {
|
||||||
|
|
||||||
$('#modalReenviarEvento').modal('show');
|
$('#modalReenviarEvento').modal('show');
|
||||||
$('#modalReenviarEvento').on('shown.bs.modal', function (e) {
|
$('#modalReenviarEvento').on('shown.bs.modal', function (e) {
|
||||||
$("#txtFechaReenviar").datepicker();
|
$("#txtFechaReenviar").datepicker();
|
||||||
|
|
@ -2118,7 +2174,7 @@ this.GuardarReenviarEvento = function () {
|
||||||
toastr.warning("Debe seleccionar una fecha", Message_Warning);
|
toastr.warning("Debe seleccionar una fecha", Message_Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tableDocEvento = $('#tableDocEvento').DataTable();
|
tableDocEvento = $('#tableDocEvento').DataTable();
|
||||||
var Iddoc;
|
var Iddoc;
|
||||||
|
|
@ -2191,12 +2247,12 @@ this.EventoGuardado = function (data) {
|
||||||
|
|
||||||
$('#calendar').fullCalendar('removeEvents');
|
$('#calendar').fullCalendar('removeEvents');
|
||||||
$('#calendar').fullCalendar('addEventSource', model.EventosJSON);
|
$('#calendar').fullCalendar('addEventSource', model.EventosJSON);
|
||||||
|
|
||||||
CargarForo();
|
CargarForo();
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ModalEvento = function (inicio,fin) {
|
this.ModalEvento = function (inicio, fin) {
|
||||||
$('#modalEvento').modal('show');
|
$('#modalEvento').modal('show');
|
||||||
|
|
||||||
LimpiarModalevento();
|
LimpiarModalevento();
|
||||||
|
|
@ -2231,7 +2287,7 @@ this.ModalEventoPopUp = function (evento) {
|
||||||
$('#modalEvento').modal('show');
|
$('#modalEvento').modal('show');
|
||||||
|
|
||||||
LimpiarModalevento();
|
LimpiarModalevento();
|
||||||
|
|
||||||
$("#txtTituloEvento").val(miEvento[0].Titulo);
|
$("#txtTituloEvento").val(miEvento[0].Titulo);
|
||||||
$("#txtDescripcionEvento").val(miEvento[0].Descripcion);
|
$("#txtDescripcionEvento").val(miEvento[0].Descripcion);
|
||||||
$("#txtUbicacion").val($("#txtNombreProyecto").val());
|
$("#txtUbicacion").val($("#txtNombreProyecto").val());
|
||||||
|
|
@ -2265,11 +2321,11 @@ this.Calendario = function (data) {
|
||||||
ModalEventoPopUp(event);
|
ModalEventoPopUp(event);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
selectable: true,
|
selectable: true,
|
||||||
eventLimit: true,
|
eventLimit: true,
|
||||||
events:data,
|
events: data,
|
||||||
select: function (startDate, endDate) {
|
select: function (startDate, endDate) {
|
||||||
ModalEvento(startDate.format(), endDate.format());
|
ModalEvento(startDate.format(), endDate.format());
|
||||||
|
|
||||||
|
|
@ -2284,7 +2340,7 @@ this.Calendario = function (data) {
|
||||||
// $('#calendar').fullCalendar('render');
|
// $('#calendar').fullCalendar('render');
|
||||||
//})
|
//})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2323,7 +2379,7 @@ this.Export2Doc = function (element, filename) {
|
||||||
}
|
}
|
||||||
|
|
||||||
document.body.removeChild(downloadLink);
|
document.body.removeChild(downloadLink);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EliminarConvocatoriaProyectoNormativo = function (usuario) {
|
this.EliminarConvocatoriaProyectoNormativo = function (usuario) {
|
||||||
|
|
@ -2334,7 +2390,7 @@ this.EliminarConvocatoriaProyectoNormativo = function (usuario) {
|
||||||
IdProyectoNormativo: model.ProyectoNormativo.IdProyectoNormativo
|
IdProyectoNormativo: model.ProyectoNormativo.IdProyectoNormativo
|
||||||
}
|
}
|
||||||
model.Convocado = {
|
model.Convocado = {
|
||||||
UsuarioSistema : usuario
|
UsuarioSistema: usuario
|
||||||
}
|
}
|
||||||
|
|
||||||
AjaxPostData(uri, model, false, true, null, null, null);
|
AjaxPostData(uri, model, false, true, null, null, null);
|
||||||
|
|
@ -2364,17 +2420,17 @@ $('#tableDiscusion').on('click', 'button', function () {
|
||||||
EliminarConvocatoriaProyectoNormativo(data[0]);
|
EliminarConvocatoriaProyectoNormativo(data[0]);
|
||||||
ActualizarConvocados();
|
ActualizarConvocados();
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
this.ExportarDocumento = function (TipoComentario, filename) {
|
this.ExportarDocumento = function (TipoComentario, filename) {
|
||||||
|
|
||||||
if(EsPromotor == true || ValidarPermisos('Administrador Funcional').length > 0){
|
if (EsPromotor == true || ValidarPermisos('Administrador Funcional').length > 0) {
|
||||||
if (TipoComentario == 'Matriz') {
|
if (TipoComentario == 'Matriz') {
|
||||||
ExportarAExcel(TipoComentario, filename);
|
ExportarAExcel(TipoComentario, filename);
|
||||||
} else {
|
} else {
|
||||||
ExportarADoc(TipoComentario, filename);
|
ExportarADoc(TipoComentario, filename);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toastr.warning(Message_NoGrants, Message_Warning);
|
toastr.warning(Message_NoGrants, Message_Warning);
|
||||||
}
|
}
|
||||||
|
|
@ -2382,27 +2438,27 @@ this.ExportarDocumento = function (TipoComentario, filename) {
|
||||||
this.ExportarADoc = function (TipoComentario, filename) {
|
this.ExportarADoc = function (TipoComentario, filename) {
|
||||||
|
|
||||||
var preHtml;
|
var preHtml;
|
||||||
|
|
||||||
preHtml = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:w='urn:schemas-microsoft-com:office:word' xmlns='http://www.w3.org/TR/REC-html40'><head><meta charset='utf-8'><title>SINORT</title></head><body>";
|
preHtml = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:w='urn:schemas-microsoft-com:office:word' xmlns='http://www.w3.org/TR/REC-html40'><head><meta charset='utf-8'><title>SINORT</title></head><body>";
|
||||||
|
|
||||||
|
|
||||||
var postHtml = "</body></html>";
|
var postHtml = "</body></html>";
|
||||||
var html = preHtml;
|
var html = preHtml;
|
||||||
|
|
||||||
html = html + '<p><center><img src="' + RutaLogoSINORT + 'bannersinort.png" style="margin: 0 auto;" align="middle" width="300"></center></p>';
|
html = html + '<p><center><img src="' + RutaLogoSINORT + 'bannersinort.png" style="margin: 0 auto;" align="middle" width="300"></center></p>';
|
||||||
html = html + '<br/>'
|
html = html + '<br/>'
|
||||||
html = html + '<center><h1>SISTEMA DE NORMATIVA Y REGLAMENTACION TECNICA</h1></center>'
|
html = html + '<center><h1>SISTEMA DE NORMATIVA Y REGLAMENTACION TECNICA</h1></center>'
|
||||||
html = html + '<br/>'
|
html = html + '<br/>'
|
||||||
html = html + '<h1>' + ((TipoComentario == 'Matriz') ? 'MATRIZ' : 'FORO') + '</h1>' +
|
html = html + '<h1>' + ((TipoComentario == 'Matriz') ? 'MATRIZ' : 'FORO') + '</h1>' +
|
||||||
'<p>PROYECTO NORMATIVO N. ' + model.ProyectoNormativo.IdProyectoNormativo + ' NOMBRE: ' + model.ProyectoNormativo.NombreProyectoNormativo + '</p>' ;
|
'<p>PROYECTO NORMATIVO N. ' + model.ProyectoNormativo.IdProyectoNormativo + ' NOMBRE: ' + model.ProyectoNormativo.NombreProyectoNormativo + '</p>';
|
||||||
|
|
||||||
html = html + '<hr/>'
|
html = html + '<hr/>'
|
||||||
|
|
||||||
var listaComentariosMatriz = $.grep(model.ProyectoNormativo.ComentariosProyecto, function (data) {
|
var listaComentariosMatriz = $.grep(model.ProyectoNormativo.ComentariosProyecto, function (data) {
|
||||||
return data.IdTipoComentario == ((TipoComentario == 'Matriz') ? Comentarios.Matriz.Codigo : Comentarios.Foro.Codigo) && data.Respuesta == null;
|
return data.IdTipoComentario == ((TipoComentario == 'Matriz') ? Comentarios.Matriz.Codigo : Comentarios.Foro.Codigo) && data.Respuesta == null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$.each(listaComentariosMatriz, function (key, item) {
|
$.each(listaComentariosMatriz, function (key, item) {
|
||||||
html = html + '<p><img src="' + RutaImagenes + 'chatbubble-working.png" style="margin: 0 auto;" height="30" width="30"><font face="verdana" color="green">ASUNTO :' + item.Asunto + '</font></p>'
|
html = html + '<p><img src="' + RutaImagenes + 'chatbubble-working.png" style="margin: 0 auto;" height="30" width="30"><font face="verdana" color="green">ASUNTO :' + item.Asunto + '</font></p>'
|
||||||
html = html + '<p><img src="' + RutaImagenes + 'chatbubbles.png" style="margin: 0 auto;" height="30" width="30">Comentario : ' + item.Comentario + '</p>';
|
html = html + '<p><img src="' + RutaImagenes + 'chatbubbles.png" style="margin: 0 auto;" height="30" width="30">Comentario : ' + item.Comentario + '</p>';
|
||||||
|
|
@ -2424,7 +2480,7 @@ this.ExportarADoc = function (TipoComentario, filename) {
|
||||||
html = html + postHtml;
|
html = html + postHtml;
|
||||||
|
|
||||||
ExportarAMsWord(html, filename);
|
ExportarAMsWord(html, filename);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -2433,7 +2489,7 @@ this.ExportarAExcel = function (TipoComentario, filename) {
|
||||||
var preHtml;
|
var preHtml;
|
||||||
|
|
||||||
preHtml = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:w='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'><head><meta charset='utf-8'><title>SINORT</title></head><body>";
|
preHtml = "<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:w='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'><head><meta charset='utf-8'><title>SINORT</title></head><body>";
|
||||||
|
|
||||||
|
|
||||||
var postHtml = "</body></html>";
|
var postHtml = "</body></html>";
|
||||||
var html = preHtml;
|
var html = preHtml;
|
||||||
|
|
@ -2462,7 +2518,7 @@ this.ExportarAExcel = function (TipoComentario, filename) {
|
||||||
'<th> Comentario/Observación/Justificación </th>' +
|
'<th> Comentario/Observación/Justificación </th>' +
|
||||||
'<th> Respuestas </th>' +
|
'<th> Respuestas </th>' +
|
||||||
'</tr>' +
|
'</tr>' +
|
||||||
'</thead>' +
|
'</thead>' +
|
||||||
'<tbody>'
|
'<tbody>'
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2483,11 +2539,11 @@ this.ExportarAExcel = function (TipoComentario, filename) {
|
||||||
html = html + '<td>'
|
html = html + '<td>'
|
||||||
$.each(listaRespuestasComentariosMatriz, function (lstkey, lstitem) {
|
$.each(listaRespuestasComentariosMatriz, function (lstkey, lstitem) {
|
||||||
html = html + lstitem.Comentario
|
html = html + lstitem.Comentario
|
||||||
if(listaRespuestasComentariosMatriz.length-1 != lstkey)
|
if (listaRespuestasComentariosMatriz.length - 1 != lstkey)
|
||||||
html = html + ', '
|
html = html + ', '
|
||||||
|
|
||||||
//html = html + '<p><img src="' + RutaImagenes + 'ios7-contact-outline.png" style="margin: 0 auto;" height="30" width="30">' + lstitem.UsuarioSistema + ' - ' + lstitem.FechaCreacion + '</p>'
|
//html = html + '<p><img src="' + RutaImagenes + 'ios7-contact-outline.png" style="margin: 0 auto;" height="30" width="30">' + lstitem.UsuarioSistema + ' - ' + lstitem.FechaCreacion + '</p>'
|
||||||
|
|
||||||
});
|
});
|
||||||
html = html + '</td>'
|
html = html + '</td>'
|
||||||
html = html + '</tr>'
|
html = html + '</tr>'
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
<button id="btnIniciar" type="button" class="btn btn-primary" style="margin-top: 5px; margin-left: 215px; background-color: #4673d1 !important; text-transform: none !important; font-size: 13px !important;" onclick="validarFormulario();">
|
<button id="btnIniciar" type="button" class="btn btn-primary" style="margin-top: 5px; margin-left: 215px; background-color: #4673d1 !important; text-transform: none !important; font-size: 13px !important;" onclick="validarFormulario();">
|
||||||
Iniciar sesión
|
Iniciar sesión
|
||||||
</button>
|
</button>
|
||||||
<strong><a id="linkRecuperar" href="#" style="float:right; margin-top: 15px;">Recuperar contraseña</a></strong>
|
<strong><a id="linkRecuperar" href="#" role="button" style="float:right; margin-top: 15px;">Recuperar contraseña</a></strong>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,7 @@ background-image:url(http://AYA-VSRV-APPTT:2525/dist/img/ajax-loader.gif);backgr
|
||||||
<th>Respuestas</th>
|
<th>Respuestas</th>
|
||||||
<th class="col-sm-4">Creado Por</th>
|
<th class="col-sm-4">Creado Por</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -503,6 +504,12 @@ background-image:url(http://AYA-VSRV-APPTT:2525/dist/img/ajax-loader.gif);backgr
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="ucbtEditar" style=" display:none;">
|
||||||
|
<button type="button" id="btnEditar" class="btn btn-default btn-xs" title="Editar" onclick="EditarAporte([$IdComentario], [$IdTipoComentario])">
|
||||||
|
<i class="fa fa-edit"></i> Editar
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="ucbtResponder" style=" display:none;">
|
<div id="ucbtResponder" style=" display:none;">
|
||||||
<button type="button" id="btnResponder" class="btn btn-default btn-xs" title="Responder" onclick="ResponderComentario([$IdComentario])">
|
<button type="button" id="btnResponder" class="btn btn-default btn-xs" title="Responder" onclick="ResponderComentario([$IdComentario])">
|
||||||
<i class=" fa fa-share">
|
<i class=" fa fa-share">
|
||||||
|
|
|
||||||
|
|
@ -17,22 +17,39 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
|
|
||||||
public ProyectoNormativoJSON GuardarComentariosProyectoNormativo(ProyectoNormativoJSON model)
|
public ProyectoNormativoJSON GuardarComentariosProyectoNormativo(ProyectoNormativoJSON model)
|
||||||
{
|
{
|
||||||
|
ComentariosProyecto Actual = new ComentariosProyecto();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (SinortContex Conn = new SinortContex())
|
using (SinortContex Conn = new SinortContex())
|
||||||
{
|
{
|
||||||
int? Next_id = Conn.ComentariosProyecto.Max(t => (int?)t.IdComentarioProyecto);
|
Actual = Conn.ComentariosProyecto.Where(x => x.IdComentarioProyecto == model.Comentario.IdComentarioProyecto).FirstOrDefault();
|
||||||
model.Comentario.IdComentarioProyecto = (Next_id == null) ? 1 : Next_id.Value + 1;
|
|
||||||
model.Comentario.UsuarioSistema = model.UserName;
|
if (Actual == null)
|
||||||
model.Comentario.UsuarioCreacion = model.UserName;
|
{
|
||||||
model.Comentario.FechaCreacion = DateTime.Now;
|
int? Next_id = Conn.ComentariosProyecto.Max(t => (int?)t.IdComentarioProyecto);
|
||||||
Conn.ComentariosProyecto.Add(model.Comentario);
|
model.Comentario.IdComentarioProyecto = (Next_id == null) ? 1 : Next_id.Value + 1;
|
||||||
|
model.Comentario.UsuarioSistema = model.UserName;
|
||||||
|
model.Comentario.UsuarioCreacion = model.UserName;
|
||||||
|
model.Comentario.FechaCreacion = DateTime.Now;
|
||||||
|
Conn.ComentariosProyecto.Add(model.Comentario);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
model.Comentario.FechaModificacion = DateTime.Now;
|
||||||
|
model.Comentario.FechaCreacion = Actual.FechaCreacion;
|
||||||
|
model.Comentario.UsuarioCreacion = Actual.UsuarioCreacion;
|
||||||
|
model.Comentario.UsuarioSistema = Actual.UsuarioSistema;
|
||||||
|
Conn.Entry(Actual).State = System.Data.Entity.EntityState.Detached;
|
||||||
|
Conn.ComentariosProyecto.Attach(model.Comentario);
|
||||||
|
Conn.Entry(model.Comentario).State = System.Data.Entity.EntityState.Modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Conn.SaveChanges();
|
Conn.SaveChanges();
|
||||||
Conn.Commit();
|
Conn.Commit();
|
||||||
|
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
|
||||||
|
|
||||||
if (model.ProyectoNormativo.ComentariosProyecto != null)
|
if (model.ProyectoNormativo.ComentariosProyecto != null)
|
||||||
model.ProyectoNormativo.ComentariosProyecto.Add(model.Comentario);
|
model.ProyectoNormativo.ComentariosProyecto.Add(model.Comentario);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
|
|
||||||
return usuario;
|
return usuario;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CatalogosPostJSON InsertarUsuarioExterno(CatalogosPostJSON model)
|
public CatalogosPostJSON InsertarUsuarioExterno(CatalogosPostJSON model)
|
||||||
{
|
{
|
||||||
Encriptar encriptar = new Encriptar();
|
Encriptar encriptar = new Encriptar();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue