parent
b819ad6eb3
commit
8d5aa412cc
10 changed files with 446 additions and 55 deletions
|
|
@ -31,6 +31,7 @@ namespace AYA.SlnSinort.Controllers
|
||||||
ViewBag.RepositorioVirtual = RepositorioVirtual;
|
ViewBag.RepositorioVirtual = RepositorioVirtual;
|
||||||
ViewBag.RepositorioLocal = RepositorioLocal;
|
ViewBag.RepositorioLocal = RepositorioLocal;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1621,7 +1621,31 @@ this.AjaxResponse = function (n, t, i, r, u) {
|
||||||
return i != null && f ? i(n) : ENDREQUEST(),
|
return i != null && f ? i(n) : ENDREQUEST(),
|
||||||
n
|
n
|
||||||
};
|
};
|
||||||
|
ObtenerCantidadTareasPendientes = function () {
|
||||||
|
|
||||||
|
var uri = SinortWCF + '/api/ObtenerCantidadTareasPendientes';
|
||||||
|
|
||||||
|
var model = {
|
||||||
|
codigo : 'kcascante'
|
||||||
|
}
|
||||||
|
AjaxPostData(uri, model, true, false, DibujarTareasPendientes, null, null);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
DibujarTareasPendientes = function (data) {
|
||||||
|
var tareas;
|
||||||
|
tareas = $("#ucTareasPendientes").html();
|
||||||
|
tareas = replaceAll('[$0]', data.TareasPendientes, tareas);
|
||||||
|
$('#numTareasPendientes').empty();
|
||||||
|
$('#numTareasPendientes').append(tareas);
|
||||||
|
|
||||||
|
tareas = $("#ucTareasPendientesHeader").html();
|
||||||
|
tareas = replaceAll('[$0]', data.TareasPendientes, tareas);
|
||||||
|
$('#numTareasPendientesHeader').empty();
|
||||||
|
$('#numTareasPendientesHeader').append("Tienes " + tareas + " tareas(s) pendiente(s)");
|
||||||
|
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
ObtenerPantallas = function () {
|
ObtenerPantallas = function () {
|
||||||
|
|
||||||
if ($("#hiddenMenuCreado").val() !== 1) {
|
if ($("#hiddenMenuCreado").val() !== 1) {
|
||||||
|
|
@ -1631,6 +1655,7 @@ ObtenerPantallas = function () {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CrearMenu = function (data) {
|
CrearMenu = function (data) {
|
||||||
|
|
||||||
var principales = $.grep(data, function (option) {
|
var principales = $.grep(data, function (option) {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ var NombreDocumento;
|
||||||
var DescTipoproyecto;
|
var DescTipoproyecto;
|
||||||
var SubTipoproyecto;
|
var SubTipoproyecto;
|
||||||
var respuestaForo;
|
var respuestaForo;
|
||||||
|
var IdPropuestaNormativa;
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
|
|
@ -53,7 +54,7 @@ jQuery(document).ready(function () {
|
||||||
model.ProyectoNormativo = {
|
model.ProyectoNormativo = {
|
||||||
IdProyectoNormativo: ROT47(IDPropuesta.toString())
|
IdProyectoNormativo: ROT47(IDPropuesta.toString())
|
||||||
};
|
};
|
||||||
|
IdPropuestaNormativa = ROT47(IDPropuesta.toString());
|
||||||
getDataModel();
|
getDataModel();
|
||||||
ObtenerPropuesta();
|
ObtenerPropuesta();
|
||||||
});
|
});
|
||||||
|
|
@ -228,18 +229,25 @@ this.CargarGridUsuarios = function (data) {
|
||||||
|
|
||||||
this.CargarConvocados = function () {
|
this.CargarConvocados = function () {
|
||||||
var tableParticipantes = $('#tableParticipantes').DataTable();
|
var tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
|
tableParticipantes.clear().draw();
|
||||||
$.each(model.ProyectoNormativo.Convocatoria, function (key, item) {
|
$.each(model.ProyectoNormativo.Convocatoria, function (key, item) {
|
||||||
|
|
||||||
var option = $("#ucbtnRemoverParticipante").html();
|
var option = $("#ucbtnRemoverParticipante").html();
|
||||||
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)
|
if (item.Participante !== true && item.Justificacion == null){
|
||||||
participanteConfirmado = replaceAll("[$state_color]", "muted", participanteConfirmado);
|
participanteConfirmado = replaceAll("[$state_color]", "muted", participanteConfirmado);
|
||||||
else
|
}
|
||||||
|
if (item.Participante !== true && item.Justificacion !== null)
|
||||||
|
participanteConfirmado = replaceAll("[$state_color]", "danger", participanteConfirmado);
|
||||||
|
else
|
||||||
participanteConfirmado = replaceAll("[$state_color]", "success", participanteConfirmado);
|
participanteConfirmado = replaceAll("[$state_color]", "success", participanteConfirmado);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tableParticipantes.row.add(
|
tableParticipantes.row.add(
|
||||||
[participanteConfirmado,
|
[participanteConfirmado,
|
||||||
item.UsuarioSistema,
|
item.UsuarioSistema,
|
||||||
|
|
@ -314,22 +322,105 @@ this.AgregarUsuario = function () {
|
||||||
var option = $("#ucbtnRemoverParticipante").html();
|
var option = $("#ucbtnRemoverParticipante").html();
|
||||||
var participanteConfirmado = $("#ucItemsIcon").html();
|
var participanteConfirmado = $("#ucItemsIcon").html();
|
||||||
|
|
||||||
participanteConfirmado = replaceAll("[$icon]", "fa-check-circle", participanteConfirmado);
|
|
||||||
participanteConfirmado = replaceAll("[$state_color]", "muted", participanteConfirmado);
|
|
||||||
|
|
||||||
tableParticipantes.row.add(
|
var ArrayParticipantes = [];
|
||||||
[participanteConfirmado,
|
|
||||||
$("#hiddenUsuario").val(),
|
Convocatoria = {
|
||||||
$("#txtUsuario").val(),
|
UsuarioSistema: $("#hiddenUsuario").val(),
|
||||||
moment().format('DD-MM-YYYY'),
|
IdProyectoNormativo: IdPropuestaNormativa,
|
||||||
option])
|
}
|
||||||
.draw();
|
ArrayParticipantes.push(Convocatoria);
|
||||||
|
|
||||||
|
|
||||||
|
var uri = SinortWCF + '/api/GuardarConvocatoriaProyectoNormativo';
|
||||||
|
var model = {
|
||||||
|
ListaConvocatoria: ArrayParticipantes
|
||||||
|
};
|
||||||
|
|
||||||
|
AjaxPostData(uri, model, false, true, GuardarTareasPendientes, null, null);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//participanteConfirmado = replaceAll("[$icon]", "fa-check-circle", participanteConfirmado);
|
||||||
|
//participanteConfirmado = replaceAll("[$state_color]", "muted", participanteConfirmado);
|
||||||
|
|
||||||
|
//tableParticipantes.row.add(
|
||||||
|
// [participanteConfirmado,
|
||||||
|
// $("#hiddenUsuario").val(),
|
||||||
|
// $("#txtUsuario").val(),
|
||||||
|
// moment().format('DD-MM-YYYY'),
|
||||||
|
// option])
|
||||||
|
// .draw();
|
||||||
|
|
||||||
|
//toastr.success(Message_Default, Message_Success);
|
||||||
|
|
||||||
toastr.success(Message_Default, Message_Success);
|
|
||||||
$('#hiddenUsuario').val('');
|
|
||||||
$('#txtUsuario').val('');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.GuardarTareasPendientes = function () {
|
||||||
|
|
||||||
|
var ArrayConvocados = [];
|
||||||
|
|
||||||
|
TareaPendiente
|
||||||
|
= {
|
||||||
|
Descripcion: 'Convocatoria para el proceso de consulta para el proyecto normativo :' + $("#txtNombreProyecto").val(),
|
||||||
|
ContenidoRelacionado: 'Propuesta normativa ' + $("#txtNombreProyecto").val(),
|
||||||
|
Respuesta: false,
|
||||||
|
FechaVencimiento: $("#txtFechaMaxima").DateFormatWCF(),
|
||||||
|
TipoTareaPendiente: 'Convocatoria',
|
||||||
|
UsuarioAsignado: $("#hiddenUsuario").val(),
|
||||||
|
IdProyectoNormativo: IdPropuestaNormativa,
|
||||||
|
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||||
|
PromotorProyectoNormativo: $("#txtPromotorProyecto").val()
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayConvocados.push(TareaPendiente);
|
||||||
|
|
||||||
|
|
||||||
|
var uri = SinortWCF + '/api/InsertarActualizarTareasPendientes';
|
||||||
|
var model = {
|
||||||
|
ListaTareasPendientes: ArrayConvocados
|
||||||
|
};
|
||||||
|
|
||||||
|
AjaxPostData(uri, model, false, false, null, null, null);
|
||||||
|
EnviarCorreo();
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.EnviarCorreo = function () {
|
||||||
|
|
||||||
|
var ArrayParticipante = [];
|
||||||
|
|
||||||
|
Convocatoria = {
|
||||||
|
UsuarioSistema: $("#hiddenUsuario").val()
|
||||||
|
}
|
||||||
|
ArrayParticipante.push(Convocatoria);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var PropuestaNormativa
|
||||||
|
= {
|
||||||
|
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||||
|
PromotorProyecto: $("#txtPromotorProyecto").val(),
|
||||||
|
FechaMaximaConfirmarParticipacion: $("#txtFechaMaxima").DateFormatWCF()
|
||||||
|
}
|
||||||
|
|
||||||
|
var Plantilla
|
||||||
|
= {
|
||||||
|
NombrePlatilla: 'Correo Convocados'
|
||||||
|
}
|
||||||
|
var uri = SinortWCF + '/api/EnviarCorreo';
|
||||||
|
model.ProyectoNormativo = PropuestaNormativa;
|
||||||
|
model.ListaConvocatoria = ArrayParticipante;
|
||||||
|
model.PlantillaEmail = Plantilla;
|
||||||
|
AjaxPostData(uri, model, false, true, null, null, null);
|
||||||
|
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.GuardarComentario = function () {
|
this.GuardarComentario = function () {
|
||||||
|
|
||||||
if (!$("#formDiscusion").valid()) {
|
if (!$("#formDiscusion").valid()) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
var model = {};
|
var model = {};
|
||||||
|
var IdPropuestaNormativa;
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -153,7 +153,7 @@ this.GuardarConvocadosForo = function (data) {
|
||||||
if (data.CodigoRespuesta == "EXITOSO") {
|
if (data.CodigoRespuesta == "EXITOSO") {
|
||||||
|
|
||||||
tableParticipantes = $('#tableParticipantes').DataTable();
|
tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
var IdPropuestaNormativa = data.ProyectoNormativo.IdProyectoNormativo;
|
IdPropuestaNormativa = data.ProyectoNormativo.IdProyectoNormativo;
|
||||||
var ArrayParticipantes = [];
|
var ArrayParticipantes = [];
|
||||||
var data = tableParticipantes
|
var data = tableParticipantes
|
||||||
.rows()
|
.rows()
|
||||||
|
|
@ -174,13 +174,52 @@ this.GuardarConvocadosForo = function (data) {
|
||||||
ListaConvocatoria: ArrayParticipantes
|
ListaConvocatoria: ArrayParticipantes
|
||||||
};
|
};
|
||||||
|
|
||||||
AjaxPostData(uri, model, false, true, null, null, null);
|
AjaxPostData(uri, model, false, true, GuardarTareasPendientes, null, null);
|
||||||
EnviarCorreo();
|
|
||||||
LimpiarForo();
|
|
||||||
ENDREQUEST();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.GuardarTareasPendientes = function () {
|
||||||
|
|
||||||
|
tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
|
|
||||||
|
var ArrayConvocados = [];
|
||||||
|
var data = tableParticipantes
|
||||||
|
.rows()
|
||||||
|
.data();
|
||||||
|
|
||||||
|
$.each(data, function (key, item) {
|
||||||
|
|
||||||
|
TareaPendiente
|
||||||
|
= {
|
||||||
|
Descripcion: 'Convocatoria para el proceso de consulta para el proyecto normativo :' + $("#txtNombreProyecto").val(),
|
||||||
|
ContenidoRelacionado: 'Propuesta normativa ' + $("#txtNombreProyecto").val(),
|
||||||
|
Respuesta: false,
|
||||||
|
FechaVencimiento: $("#txtFechaMaximaConfirmarParticipacion").DateFormatWCF(),
|
||||||
|
TipoTareaPendiente: 'Convocatoria',
|
||||||
|
UsuarioAsignado: item[0],
|
||||||
|
IdProyectoNormativo: IdPropuestaNormativa,
|
||||||
|
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||||
|
PromotorProyectoNormativo: $("#txtPromotorProyecto").val()
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayConvocados.push(TareaPendiente);
|
||||||
|
});
|
||||||
|
|
||||||
|
var uri = SinortWCF + '/api/InsertarActualizarTareasPendientes';
|
||||||
|
var model = {
|
||||||
|
ListaTareasPendientes: ArrayConvocados
|
||||||
|
};
|
||||||
|
|
||||||
|
AjaxPostData(uri, model, false, false, null, null, null);
|
||||||
|
|
||||||
|
EnviarCorreo();
|
||||||
|
LimpiarForo();
|
||||||
|
ENDREQUEST();
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
|
||||||
this.LeerFormulario = function () {
|
this.LeerFormulario = function () {
|
||||||
|
|
||||||
var Foro
|
var Foro
|
||||||
|
|
@ -232,12 +271,15 @@ this.EnviarCorreo = function () {
|
||||||
PromotorProyecto: $("#txtPromotorProyecto").val(),
|
PromotorProyecto: $("#txtPromotorProyecto").val(),
|
||||||
FechaMaximaConfirmarParticipacion: $("#txtFechaMaximaConfirmarParticipacion").DateFormatWCF()
|
FechaMaximaConfirmarParticipacion: $("#txtFechaMaximaConfirmarParticipacion").DateFormatWCF()
|
||||||
}
|
}
|
||||||
|
var Plantilla
|
||||||
|
= {
|
||||||
|
NombrePlatilla: 'Correo Proyecto Normativo',
|
||||||
|
}
|
||||||
|
|
||||||
var uri = SinortWCF + '/api/EnviarCorreo';
|
var uri = SinortWCF + '/api/EnviarCorreo';
|
||||||
model.ProyectoNormativo = PropuestaNormativa;
|
model.ProyectoNormativo = PropuestaNormativa;
|
||||||
model.ListaConvocatoria = ArrayParticipantes;
|
model.ListaConvocatoria = ArrayParticipantes;
|
||||||
|
model.PlantillaEmail = Plantilla;
|
||||||
AjaxPostData(uri, model, false, false, null, null, null);
|
AjaxPostData(uri, model, false, false, null, null, null);
|
||||||
|
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
var SelectedCatalog = '';
|
var SelectedCatalog = '';
|
||||||
var model = {};
|
var model = {};
|
||||||
var Nombre;
|
var Nombre;
|
||||||
|
var IdPropuestaNormativa;
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
getDataModel();
|
getDataModel();
|
||||||
|
|
@ -286,7 +288,8 @@ this.GuardarConvocadosPropuestaNormativa = function (data) {
|
||||||
if (data.CodigoRespuesta == "EXITOSO") {
|
if (data.CodigoRespuesta == "EXITOSO") {
|
||||||
|
|
||||||
tableParticipantes = $('#tableParticipantes').DataTable();
|
tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
var IdPropuestaNormativa = data.ProyectoNormativo.IdProyectoNormativo;
|
IdPropuestaNormativa = data.ProyectoNormativo.IdProyectoNormativo;
|
||||||
|
|
||||||
var ArrayParticipantes = [];
|
var ArrayParticipantes = [];
|
||||||
var data = tableParticipantes
|
var data = tableParticipantes
|
||||||
.rows()
|
.rows()
|
||||||
|
|
@ -307,13 +310,54 @@ this.GuardarConvocadosPropuestaNormativa = function (data) {
|
||||||
ListaConvocatoria: ArrayParticipantes
|
ListaConvocatoria: ArrayParticipantes
|
||||||
};
|
};
|
||||||
|
|
||||||
AjaxPostData(uri, model, false, true, null, null, null);
|
AjaxPostData(uri, model, false, true, GuardarTareasPendientes, null, null);
|
||||||
EnviarCorreo();
|
|
||||||
LimpiarPropuesta();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.GuardarTareasPendientes = function () {
|
||||||
|
|
||||||
|
tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
|
|
||||||
|
var ArrayConvocados = [];
|
||||||
|
var data = tableParticipantes
|
||||||
|
.rows()
|
||||||
|
.data();
|
||||||
|
|
||||||
|
$.each(data, function (key, item) {
|
||||||
|
|
||||||
|
TareaPendiente
|
||||||
|
= {
|
||||||
|
Descripcion: 'Convocatoria para el proceso de consulta para el proyecto normativo :' + $("#txtNombreProyecto").val(),
|
||||||
|
ContenidoRelacionado: 'Propuesta normativa ' + $("#txtNombreProyecto").val(),
|
||||||
|
Respuesta: false,
|
||||||
|
FechaVencimiento: $("#txtFechaMaximaConfirmarParticipacion").DateFormatWCF(),
|
||||||
|
TipoTareaPendiente: 'Convocatoria',
|
||||||
|
UsuarioAsignado: item[0],
|
||||||
|
IdProyectoNormativo: IdPropuestaNormativa,
|
||||||
|
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||||
|
PromotorProyectoNormativo: $("#txtPromotorProyecto").val()
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayConvocados.push(TareaPendiente);
|
||||||
|
});
|
||||||
|
|
||||||
|
var uri = SinortWCF + '/api/InsertarActualizarTareasPendientes';
|
||||||
|
var model = {
|
||||||
|
ListaTareasPendientes: ArrayConvocados
|
||||||
|
};
|
||||||
|
|
||||||
|
AjaxPostData(uri, model, false, false, null, null, null);
|
||||||
|
|
||||||
|
EnviarCorreo();
|
||||||
|
LimpiarPropuesta();
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.LeerFormulario = function () {
|
this.LeerFormulario = function () {
|
||||||
|
|
||||||
var PropuestaNormativa
|
var PropuestaNormativa
|
||||||
|
|
@ -375,11 +419,14 @@ this.EnviarCorreo = function () {
|
||||||
FechaMaximaConfirmarParticipacion : $("#txtFechaMaximaConfirmarParticipacion").DateFormatWCF()
|
FechaMaximaConfirmarParticipacion : $("#txtFechaMaximaConfirmarParticipacion").DateFormatWCF()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var Plantilla
|
||||||
|
= {
|
||||||
|
NombrePlatilla: 'Correo Proyecto Normativo',
|
||||||
|
}
|
||||||
var uri = SinortWCF + '/api/EnviarCorreo';
|
var uri = SinortWCF + '/api/EnviarCorreo';
|
||||||
model.ProyectoNormativo = PropuestaNormativa;
|
model.ProyectoNormativo = PropuestaNormativa;
|
||||||
model.ListaConvocatoria = ArrayParticipantes;
|
model.ListaConvocatoria = ArrayParticipantes;
|
||||||
|
model.PlantillaEmail = Plantilla;
|
||||||
AjaxPostData(uri, model, false, false, null, null, null);
|
AjaxPostData(uri, model, false, false, null, null, null);
|
||||||
|
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,36 @@
|
||||||
|
|
||||||
var Item = {};
|
var model = {};
|
||||||
|
var InfoIdTareasPendientes;
|
||||||
|
var InfoIDescripcion;
|
||||||
|
var InfoIContenidoRelacionado;
|
||||||
|
var InfoIFechaVencimiento;
|
||||||
|
var InfoITipoTareaPendiente;
|
||||||
|
var InfoIUsuarioAsignado;
|
||||||
|
var InfoIdProyectoNormativo;
|
||||||
|
var InfoNombreProyectoNormativo;
|
||||||
|
var EstadoParticipacion = -1;
|
||||||
|
var InfoPromotor;
|
||||||
|
var InfoNombrePlantilla;
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
CargarTareasPendientes();
|
|
||||||
$('#tableTareasPendientes').TableInit(0, false, true, true, false, null, null);
|
$('#tableTareasPendientes').TableInit(0, false, true, true, false, null, null);
|
||||||
$('#tableTareasPendientes').DataTable().column(0).visible(false);
|
$('#tableTareasPendientes').DataTable().column(0).visible(false);
|
||||||
$('#tableTareasPendientes').DataTable().column(5).visible(false);
|
$('#tableTareasPendientes').DataTable().column(5).visible(false);
|
||||||
});
|
$('#tableTareasPendientes').DataTable().column(6).visible(false);
|
||||||
|
$('#tableTareasPendientes').DataTable().column(7).visible(false);
|
||||||
|
$('#tableTareasPendientes').DataTable().column(8).visible(false);
|
||||||
|
$('#tableTareasPendientes').DataTable().column(9).visible(false);
|
||||||
|
getDataModel();
|
||||||
|
|
||||||
|
});
|
||||||
|
this.getDataModel = function () {
|
||||||
|
CargarTareasPendientes();
|
||||||
|
$("#btnGuardarRespuesta").unbind("click");
|
||||||
|
$("#btnGuardarRespuesta").click(function () {
|
||||||
|
GuardarRespuesta();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.CargarTareasPendientes = function () {
|
this.CargarTareasPendientes = function () {
|
||||||
|
|
||||||
|
|
@ -34,19 +58,41 @@ this.CargarTablaTareasPendientes = function (data) {
|
||||||
tableTareasPendientes.row.add([item.IdTareasPendientes,
|
tableTareasPendientes.row.add([item.IdTareasPendientes,
|
||||||
item.Descripcion,
|
item.Descripcion,
|
||||||
item.ContenidoRelacionado,
|
item.ContenidoRelacionado,
|
||||||
DateFormatNoTime(item.FechaVencimiento),
|
DateFormatNoTime(item.FechaVencimiento),
|
||||||
option,
|
option,
|
||||||
item.TipoTareaPendiente]).draw();
|
item.TipoTareaPendiente,
|
||||||
|
item.IdProyectoNormativo,
|
||||||
|
item.NombreProyectoNormativo,
|
||||||
|
item.PromotorProyectoNormativo,
|
||||||
|
item.FechaVencimiento]).draw();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#tableTareasPendientes').on('click', 'button', function () {
|
$('#tableTareasPendientes').on('click', 'button', function () {
|
||||||
|
|
||||||
var data = $('#tableTareasPendientes').DataTable().row($(this).parents('tr')).data();
|
var data = $('#tableTareasPendientes').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
||||||
if (data[5] == "Convocatoria") {
|
InfoIdTareasPendientes = data[0];
|
||||||
|
InfoIDescripcion = data[1];
|
||||||
|
InfoIContenidoRelacionado = data[2];
|
||||||
|
InfoIFechaVencimiento = data[9];
|
||||||
|
InfoITipoTareaPendiente = data[5];
|
||||||
|
InfoIUsuarioAsignado = "kcascante";
|
||||||
|
InfoIdProyectoNormativo = data[6];
|
||||||
|
InfoNombreProyectoNormativo = data[7];
|
||||||
|
InfoPromotor = data[8];
|
||||||
|
|
||||||
|
if (InfoITipoTareaPendiente == "Convocatoria") {
|
||||||
|
|
||||||
|
var proyecto = $("#ucProyecto").html();
|
||||||
|
proyecto = replaceAll('[$Propuesta]', InfoNombreProyectoNormativo, proyecto);
|
||||||
|
$('#propuesta').empty();
|
||||||
|
$('#propuesta').append(proyecto);
|
||||||
|
|
||||||
$('#modalConvocatoria').modal('show');
|
$('#modalConvocatoria').modal('show');
|
||||||
|
|
||||||
var instrucciones = "Convocatoria de participantes a propuesta normativa iniciado por cuenta del sistema en " + DateFormatNoTime(data[3]) + ". \nComentario :Confirme su participación en el proceso de consulta."
|
var instrucciones = "Convocatoria de participantes a propuesta normativa iniciado por cuenta del sistema en " + DateFormatNoTime(data[3]) + ". \nComentario :Confirme su participación en el proceso de consulta."
|
||||||
|
|
@ -59,8 +105,110 @@ $('#tableTareasPendientes').on('click', 'button', function () {
|
||||||
|
|
||||||
|
|
||||||
$("#drpParticipo").change(function () {
|
$("#drpParticipo").change(function () {
|
||||||
var estado = this.value;
|
EstadoParticipacion = this.value;
|
||||||
var el = $('#divJustificacion')[0];
|
var el = $('#divJustificacion')[0];
|
||||||
el.style.display = (estado == 0) ? 'none' : 'block';
|
el.style.display = (EstadoParticipacion == 1 || EstadoParticipacion == -1) ? 'none' : 'block';
|
||||||
|
InfoNombrePlantilla = (EstadoParticipacion == 0) ? 'Correo Analista No Confirmada' : 'Correo Analista Confirmada';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.GuardarRespuesta = function () {
|
||||||
|
var justificacion = $('#txtJustificacion').val();
|
||||||
|
if (EstadoParticipacion == -1) {
|
||||||
|
toastr.warning("Debe seleccionar una opción de participación.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (EstadoParticipacion == 0 && justificacion == '') {
|
||||||
|
toastr.warning("Debe digitar una justificación de no participación.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var uri = SinortWCF + '/api/InsertarActualizarTareasPendientes';
|
||||||
|
|
||||||
|
LeerFormulario();
|
||||||
|
AjaxPostData(uri, model, false, false, ActualizarConvocado, null, null);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.ActualizarConvocado = function (data) {
|
||||||
|
|
||||||
|
if (data.CodigoRespuesta == "EXITOSO") {
|
||||||
|
|
||||||
|
var ArrayParticipantes = [];
|
||||||
|
var Convocatoria = {
|
||||||
|
UsuarioSistema: InfoIUsuarioAsignado,
|
||||||
|
IdProyectoNormativo: InfoIdProyectoNormativo,
|
||||||
|
Participante: (EstadoParticipacion == 0) ? false : true,
|
||||||
|
Justificacion: $('#txtJustificacion').val()
|
||||||
|
}
|
||||||
|
ArrayParticipantes.push(Convocatoria);
|
||||||
|
var uri = SinortWCF + '/api/GuardarConvocatoriaProyectoNormativo';
|
||||||
|
|
||||||
|
var model = {
|
||||||
|
ListaConvocatoria: ArrayParticipantes
|
||||||
|
};
|
||||||
|
|
||||||
|
AjaxPostData(uri, model, false, true, null, null, null);
|
||||||
|
EnviarCorreo();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.EnviarCorreo = function () {
|
||||||
|
|
||||||
|
var Plantilla
|
||||||
|
= {
|
||||||
|
NombrePlatilla: InfoNombrePlantilla,
|
||||||
|
}
|
||||||
|
var Convocatoria
|
||||||
|
= {
|
||||||
|
Justificacion: $('#txtJustificacion').val()
|
||||||
|
}
|
||||||
|
var uri = SinortWCF + '/api/EnviarCorreo';
|
||||||
|
|
||||||
|
model.PlantillaEmail = Plantilla;
|
||||||
|
model.Convocado = Convocatoria;
|
||||||
|
|
||||||
|
AjaxPostData(uri, model, false, true, null, null, null);
|
||||||
|
$('#modalConvocatoria').modal('hide');
|
||||||
|
if ($('.modal-backdrop').is(':visible')) {
|
||||||
|
$('body').removeClass('modal-open');
|
||||||
|
$('.modal-backdrop').remove();
|
||||||
|
};
|
||||||
|
$('#txtJustificacion').val('');
|
||||||
|
$('#divJustificacion').css('display', 'none');
|
||||||
|
$("#drpParticipo").val('-1');
|
||||||
|
ENDREQUEST();
|
||||||
|
location.reload();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.LeerFormulario = function () {
|
||||||
|
|
||||||
|
|
||||||
|
var ArrayTareasPendientes = [];
|
||||||
|
|
||||||
|
|
||||||
|
var TareaPendiente
|
||||||
|
= {
|
||||||
|
IdTareasPendientes: InfoIdTareasPendientes,
|
||||||
|
Descripcion: InfoIDescripcion,
|
||||||
|
ContenidoRelacionado: InfoIContenidoRelacionado,
|
||||||
|
Respuesta: 1,
|
||||||
|
FechaVencimiento : InfoIFechaVencimiento,
|
||||||
|
TipoTareaPendiente: InfoITipoTareaPendiente,
|
||||||
|
UsuarioAsignado: InfoIUsuarioAsignado,
|
||||||
|
IdProyectoNormativo: InfoIdProyectoNormativo,
|
||||||
|
NombreProyectoNormativo: InfoNombreProyectoNormativo,
|
||||||
|
PromotorProyectoNormativo: InfoPromotor
|
||||||
|
}
|
||||||
|
ArrayTareasPendientes.push(TareaPendiente);
|
||||||
|
|
||||||
|
model = {
|
||||||
|
ListaTareasPendientes: ArrayTareasPendientes
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -20,6 +20,10 @@
|
||||||
<th class="col-sm-3">Fecha de vencimiento</th>
|
<th class="col-sm-3">Fecha de vencimiento</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -35,7 +39,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<div id="ucProyecto" style="display:none;">
|
||||||
|
<span>
|
||||||
|
[$Propuesta]
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
@section Modals{
|
@section Modals{
|
||||||
|
|
||||||
@*---------------------Responder Convocatoria ---------------------------------------------------------*@
|
@*---------------------Responder Convocatoria ---------------------------------------------------------*@
|
||||||
|
|
@ -63,17 +71,10 @@
|
||||||
<label class="col-sm-4 control-label ControlsForms" id="lblEnviarDocAux">Participación</label>
|
<label class="col-sm-4 control-label ControlsForms" id="lblEnviarDocAux">Participación</label>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<select name="drpParticipo" id="drpParticipo">
|
<select name="drpParticipo" id="drpParticipo">
|
||||||
<option value="">Seleccione una opción...</option>
|
<option value="-1">Seleccione una opción...</option>
|
||||||
<option value="1">Participo</option>
|
<option value="1">Participo</option>
|
||||||
<option value="0">No participo</option>
|
<option value="0">No participo</option>
|
||||||
</select>
|
</select>
|
||||||
@*<button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown">
|
|
||||||
<i class="fa fa-wrench"></i> Seleccione una opción <span class="caret"></span>
|
|
||||||
</button>
|
|
||||||
<ul class="dropdown-menu" role="menu">
|
|
||||||
<li><a href="javascript: EditarItem();"><i class="fa fa-check"></i> Participo</a></li>
|
|
||||||
<li><a href="javascript: toggleEnabledItem();"><i class="fa fa-times"></i> No participo</a></li>
|
|
||||||
</ul>*@
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@*---------------------Justificacion ---------------------------------------------------------*@
|
@*---------------------Justificacion ---------------------------------------------------------*@
|
||||||
|
|
@ -90,7 +91,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-success btn-sm" data-dismiss="modal">Guardar</button>
|
<button type="button" class="btn btn-success btn-sm" id="btnGuardarRespuesta" >Guardar</button>
|
||||||
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Cerrar</button>
|
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Cerrar</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -78,12 +78,12 @@
|
||||||
|
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
<i class="glyphicon glyphicon-tint"></i>
|
<i class="glyphicon glyphicon-tint"></i>
|
||||||
<span class="label label-success">4</span>
|
<span class="label label-success">0</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li class="header">Tienes 4 meensajes </li>
|
<li class="header">Tienes 0 notificaciones </li>
|
||||||
|
|
||||||
<li class="footer"><a href="#">Ver todos los mensajes </a></li>
|
<li class="footer"><a href="#">Ver todas las notificaciones </a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
@ -92,12 +92,12 @@
|
||||||
|
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
<i class="glyphicon glyphicon-bell"></i>
|
<i class="glyphicon glyphicon-bell"></i>
|
||||||
<span class="label label-warning">1</span>
|
<span class="label label-warning" id="numTareasPendientes">[$0]</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li class="header">Tienes 1 tarea pendiente</li>
|
<li class="header" id="numTareasPendientesHeader">[$0]</li>
|
||||||
|
|
||||||
<li class="footer"><a href="@Url.Action("TareasPendientes", "Home")"> Ver todos </a></li>
|
<li class="footer"><a href="@Url.Action("TareasPendientes", "Home")"> Ver tareas pendientes </a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
@ -231,6 +231,19 @@
|
||||||
<input type="hidden" id="hiddenFileUploadHandler" value="@ViewBag.FileUploadHandler" />
|
<input type="hidden" id="hiddenFileUploadHandler" value="@ViewBag.FileUploadHandler" />
|
||||||
<input type="hidden" id="hiddenRepositorioVirtual" value="@ViewBag.RepositorioVirtual" />
|
<input type="hidden" id="hiddenRepositorioVirtual" value="@ViewBag.RepositorioVirtual" />
|
||||||
<input type="hidden" id="hiddenRepositorioLocal" value="@ViewBag.RepositorioLocal" />
|
<input type="hidden" id="hiddenRepositorioLocal" value="@ViewBag.RepositorioLocal" />
|
||||||
|
|
||||||
|
<div id="ucTareasPendientes" style="display:none;">
|
||||||
|
<span>
|
||||||
|
[$0]
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div id="ucTareasPendientesHeader" style="display:none;">
|
||||||
|
<span>
|
||||||
|
|
||||||
|
[$0]
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -244,3 +257,8 @@
|
||||||
ObtenerPantallas();
|
ObtenerPantallas();
|
||||||
});
|
});
|
||||||
</script>*@
|
</script>*@
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
ObtenerCantidadTareasPendientes();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ namespace AYA.SlnSinortModel.Entidades
|
||||||
public List<Convocatoria> ListaConvocatoria { get; set; }
|
public List<Convocatoria> ListaConvocatoria { get; set; }
|
||||||
public Calendario Evento { get; set; }
|
public Calendario Evento { get; set; }
|
||||||
public List<EventosJSON> EventosJSON { get; set; }
|
public List<EventosJSON> EventosJSON { get; set; }
|
||||||
|
public PlantillaEmail PlantillaEmail { get; set; }
|
||||||
|
public TareasPendientes TareasPendientes { get; set; }
|
||||||
|
public List<TareasPendientes> ListaTareasPendientes { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AdjuntosJSON : BaseJson
|
public class AdjuntosJSON : BaseJson
|
||||||
|
|
@ -37,5 +40,12 @@ namespace AYA.SlnSinortModel.Entidades
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class NotificacionesJSON : BaseJson
|
||||||
|
{
|
||||||
|
public int TareasPendientes { get; set; }
|
||||||
|
public int GotitasInformativas { get; set; }
|
||||||
|
public string codigo { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,14 @@ namespace AYA.SlnSinortModel.Sinort
|
||||||
[StringLength(200)]
|
[StringLength(200)]
|
||||||
public string UsuarioAsignado { get; set; }
|
public string UsuarioAsignado { get; set; }
|
||||||
|
|
||||||
|
public int? IdProyectoNormativo { get; set; }
|
||||||
|
|
||||||
|
[StringLength(200)]
|
||||||
|
public string NombreProyectoNormativo { get; set; }
|
||||||
|
|
||||||
|
[StringLength(200)]
|
||||||
|
public string PromotorProyectoNormativo { get; set; }
|
||||||
|
|
||||||
public DateTime? FechaCreacion { get; set; }
|
public DateTime? FechaCreacion { get; set; }
|
||||||
|
|
||||||
[StringLength(200)]
|
[StringLength(200)]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue