{% extends 'base.html.twig' %} {% block breadcrumb %} {% endblock %} {% block titulo_body %}
today {% set fecha = cronograma.fechaEntrevista %}

Entrevista del {{ fecha|format_datetime(pattern='EEEE', timezone='America/Argentina/Buenos_Aires')|capitalize ~ ' ' ~ fecha|date('d/m/Y') }} {% set color = constant('App\\Entity\\Entrevistas\\CronogramaEntrevistas::VIEW_ESTADO')[cronograma.estado]['color'] %} { {{ constant('App\\Entity\\Entrevistas\\CronogramaEntrevistas::VIEW_ESTADO')[cronograma.estado]['show_name'] }} }

{{ cronograma.cargo }} {% if cronograma.territorialidad is not null %} - {{ cronograma.territorialidad }}
{% endif %}


{% endblock %} {% block titulo_acciones_body %} {% endblock %} {% block javascripts_base %} function clickEliminar(e) { $url_eliminar=e.currentTarget.dataset.url; swal({ title: "Eliminar", text: "¿Está seguro que quiere eliminar este detalle de Entrevista?", icon: "warning", buttons: true, }) .then((aceptar) => { if (aceptar) { window.location.href = $url_eliminar; } }); } function clickEliminarPrimero(e) { $url_eliminar_primero=e.currentTarget.dataset.url; swal({ title: "Eliminar", text: "¿Está seguro que quiere eliminar este detalle de Entrevista? En consecuencia se eliminarán las demás notas cargadas para el postulante", icon: "warning", buttons: true, }) .then((aceptar) => { if (aceptar) { window.location.href = $url_eliminar_primero; } }); } {% endblock %} {% block js_document_ready %} {% if cronograma.estado == 'ResultadosPublicados' %} swal({ title: "Edición de Resultado", text: "Si quiere continuar y editar el Resultado del Cronograma tiene que despublicarlo previamente.", icon: "warning", buttons: { cancel: "Cancelar", confirm: "Despublicar y Modificar" } }) .then((aceptar) => { if (aceptar) { window.location.href = "{{ path('cronograma_entrevistas_resultado_despublicar', {'id': cronograma.id }) }}"; } else { window.location.href = "{{ path('cronograma_entrevistas') }}"; } }); {% endif %} $('.btn-presente').click(function (e) { // Encuentra el input (puede ser un conjunto de radio buttons o una lista desplegable) var input = $(this).find("input[type='radio']:checked"); // Obtén el valor del radio button seleccionado var radioValue = input.val(); // Encuentra el icono, el botón y el campo de nota dentro del contenedor var icon = $(this).find('i')[0]; var boton = $(this)[0]; var notaField = $(this).closest('tr').next().find('input[type="text"]'); {# var notaField = $('#resultado_nota'); #} {# var notaField = $(this).closest('td').find('#resultado_nota'); console.log(notaField); #} // Determina el próximo estado del checkbox y el valor asociado var nextState; var tooltipText; if (radioValue == 2 ) { nextState = 'true'; tooltipText = 'Presente'; } else if (radioValue == 0 ) { nextState = 'false'; tooltipText = 'Ausente'; } else { nextState = 'null'; tooltipText = 'Sin definir'; } // Code for updating the checked state // Aplica los estilos según el valor del radio button actual if (nextState === 'true') { debugger; icon.textContent = 'check_circle_outline'; boton.classList.remove('grey', 'red'); boton.classList.add('teal'); notaField.prop('disabled', false); {# console.log('Selected Radio Value Before:', $(this).find("input[name='resultado[presente]']:checked").val()); #} // Encuentra el radio button con value="true" y hazlo checked $(this).find("#resultado_presente_0").prop('checked', true); {# console.log('esta chequeado el radio button verde de presente: ', $(this).find("#resultado_presente_0").prop("checked")); #} // Desmarca el radio button con value="null" $(this).find("#resultado_presente_2").prop('checked', false); {# console.log('esta chequeado el radio button gris de aun no cargó el dato: ', $(this).find("#resultado_presente_2").prop("checked")); console.log('Selected Radio Value After:', $(this).find("input[type='radio']:checked").val()); #} $(this).attr('data-tooltip', tooltipText); } else if (nextState === 'false') { icon.textContent = 'highlight_off'; boton.classList.remove('teal', 'grey'); boton.classList.add('red'); notaField.prop('disabled', true); // Encuentro el radio button con value="false" y hazlo checked $(this).find("#resultado_presente_1").prop('checked', true); {# console.log('esta chequeado el radio button rojo de presente: ', $(this).find("#resultado_presente_1").prop("checked")); #} // Desmarca el radio button con value="true" $(this).find("#resultado_presente_0").prop('checked', false); {# console.log('esta chequeado el radio button verde : ', $(this).find("#resultado_presente_0").prop("checked")); #} $(this).attr('data-tooltip', tooltipText); } else { icon.textContent = 'remove_circle_outline'; boton.classList.remove('teal', 'red'); boton.classList.add('grey'); notaField.prop('disabled', true); // Encuentra el radio button con value="null" y hazlo checked $(this).find("#resultado_presente_2").prop('checked', true); // Desmarca el radio button con value="false" $(this).find("#resultado_presente_1").prop('checked', false); $(this).attr('data-tooltip', tooltipText); } }); $('.btn-aprobado').click(function (e) { // Encuentra el input (puede ser un conjunto de radio buttons o una lista desplegable) var input = $(this).find("input[type='radio']:checked"); // Obtén el valor del radio button seleccionado var radioValue = input.val(); // Encuentra el icono, el botón y el campo de nota dentro del contenedor var icon = $(this).find('i')[0]; var boton = $(this)[0]; // Determina el próximo estado del checkbox y el valor asociado var nextState; if (radioValue == 2 ) { nextState = 'true'; tooltipText = 'Aprobado'; } else if (radioValue == 0 ) { nextState = 'false'; tooltipText = 'Desaprobado'; } else { nextState = 'null'; tooltipText = 'Sin definir'; } // Code for updating the checked state // Aplica los estilos según el valor del radio button actual if (nextState === 'true') { icon.textContent = 'how_to_reg'; boton.classList.remove('grey', 'red'); boton.classList.add('teal'); // Encuentra el radio button con value="true" y hazlo checked $(this).find("#resultado_aprobado_0").prop('checked', true); // Desmarca el radio button con value="null" $(this).find("#resultado_aprobado_2").prop('checked', false); $(this).attr('data-tooltip', tooltipText); } else if (nextState === 'false') { icon.textContent = 'how_to_reg'; boton.classList.remove('teal', 'grey'); boton.classList.add('red'); // Encuentro el radio button con value="false" y hazlo checked $(this).find("#resultado_aprobado_1").prop('checked', true); // Desmarca el radio button con value="true" $(this).find("#resultado_aprobado_0").prop('checked', false); $(this).attr('data-tooltip', tooltipText); } else { icon.textContent = 'remove_circle_outline'; boton.classList.remove('teal', 'red'); boton.classList.add('grey'); // Encuentra el radio button con value="null" y hazlo checked $(this).find("#resultado_aprobado_2").prop('checked', true); // Desmarca el radio button con value="false" $(this).find("#resultado_aprobado_1").prop('checked', false); $(this).attr('data-tooltip', tooltipText); } }); {% endblock %} {% block javascripts %} {{ parent()}} {% endblock %} {% block body %}
{% for postulante in postulantes %} {{form_start(postulante['form'])}} {% if error and postulante['form'].children.presente.vars.data is null %} {% else %} {% endif %} {# Foto de perfil #} {# Nombre y Apellido #} {# DNI #} {# Presente #} {# Nota #} {# Aprobado #} {# Url entrevista #} {# Acciones #} {% set detalles = postulante['form'].vars.data.detalleResultados %} {% for key,detalle in detalles %} {% if key == 0 %} {% if error and postulante['form'].children.presente.vars.data is null %} {% else %} {% endif %} {# #} {# Cargo #} {# Nota #} {# Aprobado #} {% else %} {% endif %} {% else %} {% if error and postulante['form'].children.presente.vars.data is null %} {% else %} {% endif %} {# #} {# Cargo #} {# Nota #} {# Aprobado #} {% endfor %} {{form_end(postulante['form'])}} {% endfor %}
Nombre y Apellido DNI Presente Nota Aprobado Entrevista Agregar Nota
Foto de perfil {{postulante['presentacionAntecedentes'].datosPersonales.nombres|capitalize}} {{postulante['presentacionAntecedentes'].datosPersonales.apellidos|capitalize}} {{postulante['presentacionAntecedentes'].datosPersonales.dni}} {% set presenteValue = postulante['form'].presente.vars.data %} {% set isPresenteChecked = presenteValue == '1' or presenteValue == true %} {# Si el valor es '1' o true #} {% set icon = isPresenteChecked ? 'check_circle_outline' : 'highlight_off' %} {% set colorClass = isPresenteChecked ? 'teal' : 'red' %} {% set dataTooltip = isPresenteChecked ? 'Presente' : 'Ausente' %} {% if presenteValue is null %} {% set icon = 'remove_circle_outline' %} {% set colorClass = 'grey' %} {% set dataTooltip = 'Sin definir' %} {% endif %} {{ icon }} {{ form_widget(postulante['form'].presente) }}
{{ form_row(postulante['form'].enlaceGrabacion) }}
{{cronograma.cargo}}
{{ form_row( postulante['form'].nota, {'attr': {'disabled': postulante['form'].presente.vars.data == 'true' ? false : true}} ) }}
{% set aprobadoValue = postulante['form'].aprobado.vars.data %} {% set isAprobadoChecked = aprobadoValue == '1' or aprobadoValue == true %} {# {% set icon = isAprobadoChecked ? 'check_circle_outline' : 'highlight_off' %} #} {% set icon = 'how_to_reg' %} {% set colorClass = isAprobadoChecked ? 'teal' : 'red' %} {% set dataTooltip = isAprobadoChecked ? 'Aprobado' : 'Desaprobado' %} {% if aprobadoValue is null %} {% set icon = 'remove_circle_outline' %} {% set colorClass = 'grey' %} {% set dataTooltip = 'Sin definir' %} {% endif %} {{ icon }} {{ form_widget(postulante['form'].aprobado) }} {% if is_granted('ROLE_ENTREVISTAS_ADMIN') %} {% set presenteValue = postulante['form'].presente.vars.data %} {% if presenteValue is not null %} {% endif %} {% endif %}
{{detalle.cargo}} Nota: {{detalle.nota}} {{detalle.aprobado ? ' how_to_reg ': ' how_to_reg '}}
{{cronograma.cargo}}
{{ form_row( postulante['form'].nota, {'attr': {'disabled': postulante['form'].presente.vars.data == 'true' ? false : true, 'class': 'sin-margenes'}} ) }}
{% set aprobadoValue = postulante['form'].aprobado.vars.data %} {% set isAprobadoChecked = aprobadoValue == '1' or aprobadoValue == true %} {# {% set icon = isAprobadoChecked ? 'check_circle_outline' : 'highlight_off' %} #} {% set icon = 'how_to_reg' %} {% set colorClass = isAprobadoChecked ? 'teal' : 'red' %} {% set dataToolip = isAprobadoChecked ? 'Aprobado' : 'Desaprobado' %} {% if aprobadoValue is null %} {% set icon = 'remove_circle_outline' %} {% set colorClass = 'grey' %} {% set dataToolip = 'Sin definir' %} {% endif %} {{ icon }} {{ form_widget(postulante['form'].aprobado) }} {% if is_granted('ROLE_ENTREVISTAS_ADMIN') %} {% set presenteValue = postulante['form'].presente.vars.data %} {% if presenteValue is not null %} {% endif %} {% endif %}
{% if (cronograma.estado == 'Borrador' or cronograma.estado == 'Publicado') %} Publicar Resultado publish {% endif %} Volver undo
{% endblock %}