<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;

/* suivi_ind/suivi_list_old.html.twig */
class __TwigTemplate_a890c0de9ab6dcbdc36adf62e614aaf0 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'page_title' => [$this, 'block_page_title'],
            'page_content' => [$this, 'block_page_content'],
            'javascripts' => [$this, 'block_javascripts'],
            'stylesheets' => [$this, 'block_stylesheets'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 1
        return "@AdminLTE/layout/suiodd-layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/layout/suiodd-layout.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("suivi.indicateur.title", [], "messages");
        yield from [];
    }

    // line 6
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 7
        yield "    ";
        yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_start');
        yield "
  
        ";
        // line 9
        yield from $this->load("suivi_ind/suivi_list_old.html.twig", 9, 589407529)->unwrap()->yield($context);
        // line 14
        yield "     
        ";
        // line 15
        if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["indicators"] ?? null)) > 0)) {
            // line 16
            yield "        ";
            yield from $this->load("suivi_ind/suivi_list_old.html.twig", 16, 1901804443)->unwrap()->yield($context);
            // line 63
            yield "        ";
        }
        // line 64
        yield "              
    ";
        // line 65
        yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_end');
        yield "

";
        yield from [];
    }

    // line 69
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 70
        yield "    <script>
        
        \$(document).on('change', '#evaluation_ministry, #evaluation_programm', function () {
            let \$ministry = \$('#evaluation_ministry')
            let \$form = \$(this).closest('form')

            let data = {}
            data[\$ministry.attr('name')] = \$ministry.val()
            data[\$(this).attr('name')] = \$(this).val()
            
            let \$field = \$(this).attr('id')
            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    if (\$field == 'evaluation_ministry') {
                        \$('#evaluation_programm').replaceWith(
                            \$(html).find('#evaluation_programm')
                        )
                        \$('#evaluation_action').replaceWith(
                            \$(html).find('#evaluation_action')
                        )
                    }
                    if (\$field == 'evaluation_programm') {
                        \$('#evaluation_action').replaceWith(
                            \$(html).find('#evaluation_action')
                        )
                    }
                }
            });
        });

        \$(function () {
            \$(\"#planAppreciationTable\").DataTable({
                \"searching\": false,
                \"pageLength\": 25,
                \"lengthChange\": false,
                \"columnDefs\": [
                  { \"orderable\": false, \"targets\": -1 }
                ]
            });
        });
        
        \$(document).ready(function() {
            // Setup - add a text input to each footer cell
            /*\$('#planAppreciationTable thead tr').clone(true).appendTo( '#planAppreciationTable thead' );
            \$('#planAppreciationTable thead tr:eq(1) th').each( function (i) {
                var title = \$(this).text();
                \$(this).html( '<input type=\"text\" placeholder=\"Search '+title+'\" />' );
        
                \$( 'input', this ).on( 'keyup change', function () {
                    if ( table.column(i).search() !== this.value ) {
                        table
                            .column(i)
                            .search( this.value )
                            .draw();
                    }
                } );
            } );
        
            var table = \$('#planAppreciationTable').DataTable( {
                orderCellsTop: true,
                fixedHeader: true
            } );*/

            \$('#planAppreciationTables').DataTable( {
        initComplete: function () {
            this.api().columns().every( function () {
                var column = this;
                var select = \$('<select><option value=\"\"></option></select>')
                    .appendTo( \$(column.header()).empty() )
                    .on( 'change', function () {
                        var val = \$.fn.dataTable.util.escapeRegex(
                            \$(this).val()
                        );
 
                        column
                            .search( val ? '^'+val+'\$' : '', true, false )
                            .draw();
                    } );
 
                column.data().unique().sort().each( function ( d, j ) {
                    select.append( '<option value=\"'+d+'\">'+d+'</option>' )
                } );
            } );
        }
    } );

        } );

    </script>

    <script src=\"";
        // line 163
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables/jquery.dataTables.js"), "html", null, true);
        yield "\"></script>
    <script src=\"";
        // line 164
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables-bs4/js/dataTables.bootstrap4.js"), "html", null, true);
        yield "\"></script>

";
        yield from [];
    }

    // line 168
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_stylesheets(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 169
        yield "    <link rel=\"stylesheet\" href=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables-bs4/css/dataTables.bootstrap4.css"), "html", null, true);
        yield "\">
";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "suivi_ind/suivi_list_old.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  223 => 169,  216 => 168,  208 => 164,  204 => 163,  109 => 70,  102 => 69,  94 => 65,  91 => 64,  88 => 63,  85 => 16,  83 => 15,  80 => 14,  78 => 9,  72 => 7,  65 => 6,  54 => 3,  43 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "suivi_ind/suivi_list_old.html.twig", "/var/www/html/templates/suivi_ind/suivi_list_old.html.twig");
    }
}


/* suivi_ind/suivi_list_old.html.twig */
class __TwigTemplate_a890c0de9ab6dcbdc36adf62e614aaf0___589407529 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'box_body' => [$this, 'block_box_body'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 9
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/Widgets/box-widget.html.twig", 9);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 10
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 11
        yield "                ";
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'widget');
        yield "
            ";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "suivi_ind/suivi_list_old.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  302 => 11,  295 => 10,  284 => 9,  223 => 169,  216 => 168,  208 => 164,  204 => 163,  109 => 70,  102 => 69,  94 => 65,  91 => 64,  88 => 63,  85 => 16,  83 => 15,  80 => 14,  78 => 9,  72 => 7,  65 => 6,  54 => 3,  43 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "suivi_ind/suivi_list_old.html.twig", "/var/www/html/templates/suivi_ind/suivi_list_old.html.twig");
    }
}


/* suivi_ind/suivi_list_old.html.twig */
class __TwigTemplate_a890c0de9ab6dcbdc36adf62e614aaf0___1901804443 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'box_body' => [$this, 'block_box_body'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 16
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/Widgets/box-widget.html.twig", 16);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 17
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 18
        yield "                <table id=\"suiviIndicateurTable\" class=\"table table-striped\">
                <thead>
                    <th>
                        <div class=\"row mt-2 mb-2\">
                            <div class=\"col-2\">Cible</div>
                            <div class=\"col-3\">Indicateur</div>
                            <div class=\"col-6\">
                                ";
        // line 25
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(range(4, 0));
        foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
            // line 26
            yield "                                <div class=\"col-2 float-left text-center\">";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($context["year"] ?? null) - $context["i"]), "html", null, true);
            yield "</div>
                                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['i'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 28
        yield "                                <div class=\"col-2 float-left text-center\">Val. cible</div>
                            </div>
                            
                            <div class=\"col-1 text-center\"></div>
                        </div>
                    </th>
                </thead>

                ";
        // line 36
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["indicators"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["indicator"]) {
            // line 37
            yield "                <tr>
                    <td>
                        <div class=\"row mt-2 mb-2\">
                            <div class=\"col-2\">";
            // line 40
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "target", [], "any", false, false, false, 40), "html", null, true);
            yield "</div>
                            <div class=\"col-3\">";
            // line 41
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["indicator"], "html", null, true);
            yield "</div>
                            <div class=\"col-6\">
                                ";
            // line 43
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(range(4, 0));
            foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
                // line 44
                yield "                                <div class=\"col-2 float-left text-center\">";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v0 = (($_v1 = ($context["suivis"] ?? null)) && is_array($_v1) || $_v1 instanceof ArrayAccess ? ($_v1[CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 44)] ?? null) : null)) && is_array($_v0) || $_v0 instanceof ArrayAccess ? ($_v0[(($context["year"] ?? null) - $context["i"])] ?? null) : null), "html", null, true);
                yield "</div>
                                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_key'], $context['i'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 46
            yield "                                <div class=\"col-2 float-left text-center\"><b>";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "maxValue", [], "any", false, false, false, 46), "html", null, true);
            yield "</b></div>
                                
                                <div class=\"col-12 float-left\"><hr><i>";
            // line 48
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v2 = (($_v3 = ($context["suivis"] ?? null)) && is_array($_v3) || $_v3 instanceof ArrayAccess ? ($_v3[CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 48)] ?? null) : null)) && is_array($_v2) || $_v2 instanceof ArrayAccess ? ($_v2["observation"] ?? null) : null), "html", null, true);
            yield "</i></div>
                            </div>
                            
                            <div class=\"col-1 text-center\">
                            ";
            // line 53
            yield "                                <a href=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_indice_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 53)]), "html", null, true);
            yield "\" class=\"btn btn-sm btn-secondary\">";
            yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.update", [], "messages");
            yield "</a>
                            ";
            // line 55
            yield "                            </div>
                        </div>
                    </td>
                </tr>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['indicator'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 60
        yield "                </table>
            ";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "suivi_ind/suivi_list_old.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  474 => 60,  464 => 55,  457 => 53,  450 => 48,  444 => 46,  435 => 44,  431 => 43,  426 => 41,  422 => 40,  417 => 37,  413 => 36,  403 => 28,  394 => 26,  390 => 25,  381 => 18,  374 => 17,  363 => 16,  302 => 11,  295 => 10,  284 => 9,  223 => 169,  216 => 168,  208 => 164,  204 => 163,  109 => 70,  102 => 69,  94 => 65,  91 => 64,  88 => 63,  85 => 16,  83 => 15,  80 => 14,  78 => 9,  72 => 7,  65 => 6,  54 => 3,  43 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "suivi_ind/suivi_list_old.html.twig", "/var/www/html/templates/suivi_ind/suivi_list_old.html.twig");
    }
}
