{% extends 'base.html.twig' %}
{% block js_document_ready %}
//defino variable para fecha actual
function addZeroBefore(n) {
return (n < 10 ? '0' : '') + n;
}
//defino variable para fecha actual
var currentdate = new Date();
var datetime = "Extraído el: " + currentdate.getDate() + "/"
+ addZeroBefore((currentdate.getMonth()+1)) + "/"
+ currentdate.getFullYear() + " "
+ addZeroBefore(currentdate.getHours()) + ":"
+ addZeroBefore(currentdate.getMinutes()) + ":"
+ addZeroBefore(currentdate.getSeconds());
var url_excel = "{{ path('generar_excel', {idView: tomaExamenFecha.idView}) }}";
var excelButton = {
text: 'Descargar Excel',
action: function (e, dt, node, config) {
$.ajax({
url: url_excel,
method: 'GET',
data: {
},
success: function (data, textStatus, jqXHR) {
// Descargar el archivo
var a = document.createElement('a');
a.href = url_excel;
a.download = 'inscripciones.xlsx';
document.body.appendChild(a);
a.click();
setTimeout(function () {
document.body.removeChild(a);
}, 0);
},
error: function (jqXHR, textStatus, errorThrown) {
console.log(errorThrown);
}
});
}
};
$('#datatable').dataTable({
pageLength: 25,
dom: 'Bfrtip',
buttons: [
excelButton
],
filter : false,
language: {
"url": "//cdn.datatables.net/plug-ins/1.10.16/i18n/Spanish.json"
},
aLengthMenu: "",
bAutoWidth: false,
"columns": [
{
"data": "foto",
render: function(data, type, row, meta) {
if (type === 'display') {
foto = [
'',
].join('');
return foto;
}
return data;
},
},
{ "data": "dni" },
{ "data": "nombre_apellido" },
{% if not is_granted('ROLE_COMUNICACIONES') %}
{ "data": "presentismo" },
{ "data": "resultado" },
{ "data": "nota" },
{ "data": "aprobadoRevision" },
{ "data": "notaRevision" },
{% if tomaExamenFecha.tomaExamen.convocatoriaExamen1.convocatoria.tipoEximicion != constant('App\\Entity\\Convocatorias\\Convocatoria::TIPO_ACTAS') %}
{ "data": "resolucion" },
{% endif %}
{% else %}
{ "data": "email" },
{ "data": "telefono" },
{% endif %}
],
order: [[ 1, 'desc' ]],
columnDefs: [
// These are the column name variables that will be sent to the server
{
"name": "foto",
"searchable": false,
"orderable": false,
"targets": 0
},
{
"name": "dp.dni",
"targets": 1
},
{
"name": "dp.nombres",
"searchable": false,
"orderable": false,
"targets": 2
},
{% if not is_granted('ROLE_COMUNICACIONES') %}
{
"name": "e.presente",
"targets": 3
},
{
"name": "resultado",
"searchable": false,
"orderable": false,
"targets": 4
},
{
"name": "e.nota",
"targets": 5
},
{
"name": "e.aprobadoRevision",
"searchable": false,
"orderable": false,
"targets": 6
},
{
"name": "e.notaRevision",
"searchable": false,
"orderable": false,
"targets": 7
},
{% if tomaExamenFecha.tomaExamen.convocatoriaExamen1.convocatoria.tipoEximicion != constant('App\\Entity\\Convocatorias\\Convocatoria::TIPO_ACTAS') %}
{
"name": "e.resolucion",
"searchable": false,
"orderable": false,
"targets": 8
},
{% endif %}
{% else %}
{
"name": "dp.email",
"searchable": false,
"orderable": false,
"targets": 3
},
{
"name": "dp.telefono",
"searchable": false,
"orderable": false,
"targets": 4
},
{% endif %}
],
"displayStart": {{ app.session.get(constant('App\\Controller\\Inscripciones\\InscripcionController::FORM_CONSULTA_INSCRIPCION_STAR')) ?? 0 }},
serverSide: true,
processing: true,
ajax: {
url: '{{ path('examenes_examinandos_datos', {'tomaExamenFecha': tomaExamenFecha.id}) }}',
type: 'POST'
}
{% if is_granted('ROLE_COMUNICACIONES') %}
,
fnDrawCallback: function( oSettings ) {
// Ocultar columnas si es rol comunicaciones
$('#datatable tbody tr').each(function() {
{# var fechaCell1 = $(this).find('td:eq(3)'); // Columna del presentismo en la tabla
var fechaCell2 = $(this).find('td:eq(4)'); // Columna de aprobacion en la tabla
var fechaCell3 = $(this).find('td:eq(5)'); // Columna de la nota en la tabla
var fechaCell4 = $(this).find('td:eq(6)'); // Columna de la nota en la tabla
var fechaCell5 = $(this).find('td:eq(7)'); // Columna de la nota en la tabla
var fechaCell6 = $(this).find('td:eq(8)'); // Columna de la nota en la tabla
fechaCell1.hide();
fechaCell2.hide();
fechaCell3.hide();
fechaCell4.hide();
fechaCell5.hide();
fechaCell6.hide(); #}
});
}
{% else %}
,
fnDrawCallback: function( oSettings ) {
// Ocultar columnas si es rol comunicaciones
$('#datatable tbody tr').each(function() {
{# var fechaCell1 = $(this).find('td:eq(9)'); // Columna del email en la tabla
var fechaCell2 = $(this).find('td:eq(10)'); // Columna de telefono en la tabla
fechaCell1.hide();
fechaCell2.hide(); #}
});
}
{% endif %}
});
// the "href" attribute of the modal trigger must specify the modal ID that wants to be triggered
$('select').formSelect();
var select = $('select');
$('.limpiar').click(function(){
$("input[type=text]").val("");
select.prop('selectedIndex', 0); //Sets the first option as selected
select.material_select(); //Update material select
form.submit();
});
{% endblock %}
{% block breadcrumb %}
Territorio: {{tomaExamenFecha.territorialidad|join(", ") }}
{% endif %}place {{tomaExamenFecha.lugar|capitalize}}
{{ salaExaminadora.examinador.persona.apellidos ~ ', ' ~ salaExaminadora.examinador.persona.nombres ~ ' - ' ~ salaExaminadora.examinador.estamento|upper }} {% if tomaExamenFecha.numeroActa is not null %} {% if salaExaminadora.presente == true %} (Presente) {% else %} (Ausente) {% endif %} {% endif %}
{% else %} Sin Definir {% endfor %}{{ examenAcademico.academico.persona.apellidos ~ ', ' ~ examenAcademico.academico.persona.nombres }} {% if tomaExamenFecha.numeroActa is not null %} {% if examenAcademico.presente == true %} (Presente) {% else %} (Ausente) {% endif %} {% endif %}
{% else %} Sin Definir {% endfor %}Nombre y Apellido | {% if not is_granted('ROLE_COMUNICACIONES') %} {% if tomaExamenFecha.tomaExamen.convocatoriaExamen1.convocatoria.tipoEximicion != constant('App\\Entity\\Convocatorias\\Convocatoria::TIPO_ACTAS') %} {% endif %} {% else %} {% endif %}|
---|---|
{% if not is_granted('ROLE_COMUNICACIONES') %} {% if tomaExamenFecha.tomaExamen.convocatoriaExamen1.convocatoria.tipoEximicion != constant('App\\Entity\\Convocatorias\\Convocatoria::TIPO_ACTAS') %} {% endif %} {% else %} |
info_outline Aún no fueron cargados los examinandos correspondientes a este examen.