<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* pages/Operario/index.html.twig */
class __TwigTemplate_b454112c627e05954a6007e15e591ca46f9f3db581574d30b9268bac42ee0c78 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'body' => [$this, 'block_body'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base_operario.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/Operario/index.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/Operario/index.html.twig"));
$this->parent = $this->loadTemplate("base_operario.html.twig", "pages/Operario/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 2
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 3
echo "
<div class=\"d-flex flex-center flex-column-fluid\">
<!--begin::Signin-->
<div class=\"login-form login-signin\">
<!--begin::Form-->
<div class=\"bg-white rounded p-10\">
<div class=\"d-flex flex-column h-100 justify-content-center text-center\">
<div class=\"pt-lg-0 pt-5 text-center\">
<div class=\"text-center mb-10\" >
<img class=\"p-3\" width=\"100%\" src=\"/imagenes/logos/logo-javier-ramos-ret.png\" alt=\"\" />
</div>
</div>
</div>
<!--begin::Card-->
<div class=\"card card-custom card-fit card-border\">
<div class=\"card-body mt-5\">
<div class=\"form-group\">
<label for=\"codigo\" class=\"required\">
Código de producción:
</label>
<input type=\"text\" id=\"codigo\" name=\"codigo\" required=\"required\" maxlength=\"255\" class=\"form-control codigo\">
</div>
<!--end::Form group-->
<!--begin::Action-->
<div class=\"pb-lg-0 pb-5 text-center\">
<button id=\"buscar_cod\" name=\"buscar_cod\" class=\"btn btn-twitter btn buscar_cod\" data_icon_before=\"fas fa-search\">
<span class=\"fas fa-search\"></span>
Buscar
</button>
</div>
</div>
</div>
<!--end::Card-->
</div>
<!--end::Form-->
</div>
<!--end::Signin-->
</div>
";
// line 43
echo "<div class=\"modal fade\" id=\"exampleModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\" data-backdrop=\"false\" data-keyboard=\"false\">
<div class=\"modal-dialog modal-xl\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-body\">
</div>
</div>
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 54
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 55
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script>
var modal_loader = '";
// line 58
echo twig_include($this->env, $context, "includes/partials/_loader_css_js.html.twig", ["loader_id" => "loader_animation", "loader_text" => "Cargando...", "loader_class" => "text-center m-4"]);
echo "';
\$(document).ready(function(){
// Capturar el cambio de código
\$('.buscar_cod').on('click', function(e){
e.preventDefault();
var codigo = \$('.codigo').val();
//console.log('Código del proceso: '+codigo);
\$.ajax({
type : \"POST\",
url : Routing.generate('ajax_regprofase_search_code', {'codigo' : codigo}),
data : \$(this).serialize(),
dataType : \"json\",
cache : false,
beforeSend : function (obj) {
\$('#exampleModal .modal-header').remove();
\$('#exampleModal .modal_footer').remove();
\$('#loader_animation').removeClass('d-none');
\$('#exampleModal').modal('show');
\$('#exampleModal .modal-body').html(modal_loader);
},
success : function (obj) {
//console.log(obj);
\$('#loader_animation').addClass('d-none');
\$('#exampleModal').html(obj.html);
updateMinutosFase();
},
error : function (req, status, error) {
\$('#loader_animation').addClass('d-none');
\$('#exampleModal .modal-body').html('<div class=\"bg-danger p-3\"><h5 class=\"text-justify align-middle text-center\"> El código introducido no existe o no es válido. </h5></div>');
}
});
});
});
// Enviar el formulario al guardar
function enviarAjaxProceso(formulario, RegFase, codigo, fase){
\$.ajax({
type : \"POST\",
url : Routing.generate('ajax_regprofase_search_code', {'codigo' : codigo, 'fase' : fase, 'RegFase' : RegFase}),
data : formulario.serialize(),
dataType : \"json\",
cache : false,
success : function (obj) {
if(obj.cerrar_modal){
PNotify.success({
title: 'Éxito!',
text: 'Se han registrado correctamente las fases del proceso.'
});
\$(\"#exampleModal .close\").click();
\$('.fase_min').val(0);
location.reload();
}else{
\$('#exampleModal').html(obj.html);
\$('.fase_min').val(0);
}
},
error : function (req, status, error) {
//console.log(error);
//console.log(req);
}
});
}
// Contador de minutos
function updateMinutosFase() {
var fase = \$('.registro_fase_id').val();
console.log(fase);
var minutos = Number(\$('.fase_min').val());
var min = minutos +1;
\$('.fase_min').val(min);
// Descontar del temporizador
var temp = Number(\$('.temp_top').val());
var new_temp = temp - 1;
\$('.temp_top').val(new_temp);
console.log(new_temp);
// Cambiar el color del input
if(new_temp <= 0){
\$('.temp_top').removeClass('bg-success');
\$('.temp_top').addClass('bg-danger');
}
\$.ajax({
type : \"POST\",
url : Routing.generate('ajax_regprofase_update_minutes', {'fase' : fase, 'minutos' : min}),
data : \$(this).serialize(),
dataType: \"json\",
cache : false,
timeout : 60000,
complete : function (obj) {
setTimeout(updateMinutosFase, 60000);
},
error : function (req, status, error) {
//console.log(error + req + status);
setTimeout(updateMinutosFase, 60000);
}
});
};
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "pages/Operario/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 145 => 58, 139 => 55, 129 => 54, 110 => 43, 69 => 3, 59 => 2, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base_operario.html.twig' %}
{% block body %}
<div class=\"d-flex flex-center flex-column-fluid\">
<!--begin::Signin-->
<div class=\"login-form login-signin\">
<!--begin::Form-->
<div class=\"bg-white rounded p-10\">
<div class=\"d-flex flex-column h-100 justify-content-center text-center\">
<div class=\"pt-lg-0 pt-5 text-center\">
<div class=\"text-center mb-10\" >
<img class=\"p-3\" width=\"100%\" src=\"/imagenes/logos/logo-javier-ramos-ret.png\" alt=\"\" />
</div>
</div>
</div>
<!--begin::Card-->
<div class=\"card card-custom card-fit card-border\">
<div class=\"card-body mt-5\">
<div class=\"form-group\">
<label for=\"codigo\" class=\"required\">
Código de producción:
</label>
<input type=\"text\" id=\"codigo\" name=\"codigo\" required=\"required\" maxlength=\"255\" class=\"form-control codigo\">
</div>
<!--end::Form group-->
<!--begin::Action-->
<div class=\"pb-lg-0 pb-5 text-center\">
<button id=\"buscar_cod\" name=\"buscar_cod\" class=\"btn btn-twitter btn buscar_cod\" data_icon_before=\"fas fa-search\">
<span class=\"fas fa-search\"></span>
Buscar
</button>
</div>
</div>
</div>
<!--end::Card-->
</div>
<!--end::Form-->
</div>
<!--end::Signin-->
</div>
{#} Modal {#}
<div class=\"modal fade\" id=\"exampleModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\" data-backdrop=\"false\" data-keyboard=\"false\">
<div class=\"modal-dialog modal-xl\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-body\">
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script>
var modal_loader = '{{ include('includes/partials/_loader_css_js.html.twig', {'loader_id' : 'loader_animation','loader_text' : 'Cargando...', 'loader_class' : 'text-center m-4'}) }}';
\$(document).ready(function(){
// Capturar el cambio de código
\$('.buscar_cod').on('click', function(e){
e.preventDefault();
var codigo = \$('.codigo').val();
//console.log('Código del proceso: '+codigo);
\$.ajax({
type : \"POST\",
url : Routing.generate('ajax_regprofase_search_code', {'codigo' : codigo}),
data : \$(this).serialize(),
dataType : \"json\",
cache : false,
beforeSend : function (obj) {
\$('#exampleModal .modal-header').remove();
\$('#exampleModal .modal_footer').remove();
\$('#loader_animation').removeClass('d-none');
\$('#exampleModal').modal('show');
\$('#exampleModal .modal-body').html(modal_loader);
},
success : function (obj) {
//console.log(obj);
\$('#loader_animation').addClass('d-none');
\$('#exampleModal').html(obj.html);
updateMinutosFase();
},
error : function (req, status, error) {
\$('#loader_animation').addClass('d-none');
\$('#exampleModal .modal-body').html('<div class=\"bg-danger p-3\"><h5 class=\"text-justify align-middle text-center\"> El código introducido no existe o no es válido. </h5></div>');
}
});
});
});
// Enviar el formulario al guardar
function enviarAjaxProceso(formulario, RegFase, codigo, fase){
\$.ajax({
type : \"POST\",
url : Routing.generate('ajax_regprofase_search_code', {'codigo' : codigo, 'fase' : fase, 'RegFase' : RegFase}),
data : formulario.serialize(),
dataType : \"json\",
cache : false,
success : function (obj) {
if(obj.cerrar_modal){
PNotify.success({
title: 'Éxito!',
text: 'Se han registrado correctamente las fases del proceso.'
});
\$(\"#exampleModal .close\").click();
\$('.fase_min').val(0);
location.reload();
}else{
\$('#exampleModal').html(obj.html);
\$('.fase_min').val(0);
}
},
error : function (req, status, error) {
//console.log(error);
//console.log(req);
}
});
}
// Contador de minutos
function updateMinutosFase() {
var fase = \$('.registro_fase_id').val();
console.log(fase);
var minutos = Number(\$('.fase_min').val());
var min = minutos +1;
\$('.fase_min').val(min);
// Descontar del temporizador
var temp = Number(\$('.temp_top').val());
var new_temp = temp - 1;
\$('.temp_top').val(new_temp);
console.log(new_temp);
// Cambiar el color del input
if(new_temp <= 0){
\$('.temp_top').removeClass('bg-success');
\$('.temp_top').addClass('bg-danger');
}
\$.ajax({
type : \"POST\",
url : Routing.generate('ajax_regprofase_update_minutes', {'fase' : fase, 'minutos' : min}),
data : \$(this).serialize(),
dataType: \"json\",
cache : false,
timeout : 60000,
complete : function (obj) {
setTimeout(updateMinutosFase, 60000);
},
error : function (req, status, error) {
//console.log(error + req + status);
setTimeout(updateMinutosFase, 60000);
}
});
};
</script>
{% endblock %}", "pages/Operario/index.html.twig", "/var/www/vhosts/apunts.es/jramos.apunts.es/templates/pages/Operario/index.html.twig");
}
}