<?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.html.twig */
class __TwigTemplate_947b17636a57a8312c00c0a479a70245 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;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "suivi_ind/suivi_list.html.twig"));

        $this->parent = $this->load("@AdminLTE/layout/suiodd-layout.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_title"));

        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("suivi.indicateur.title", [], "messages");
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 6
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content"));

        // line 7
        yield "    ";
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 8
            yield "
    ";
        } elseif ((($tmp =         // line 9
(isset($context["etat"]) || array_key_exists("etat", $context) ? $context["etat"] : (function () { throw new RuntimeError('Variable "etat" does not exist.', 9, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 10
            yield "            <div class=\"row\">
                <div class=\"col-sm-12\">
                    <div class=\"text-right\">
                        <button type=\"button\" class=\"mb-2 mr-2 btn-shadow  btn btn-danger text-right\" data-toggle=\"modal\" data-target=\"#valideModal\">
                            <i class=\"fa fa-check\"></i> ";
            // line 14
            yield (((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_FOCAL")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("Soumettre") : ("Valider"));
            yield "
                        </button>
                    </div>
                </div>
            </div>
    ";
        }
        // line 20
        yield "    

    ";
        // line 22
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 23
            yield "    ";
            yield             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 23, $this->source); })()), 'form_start');
            yield "
            ";
            // line 24
            yield from $this->load("suivi_ind/suivi_list.html.twig", 24, "808618743")->unwrap()->yield($context);
            // line 29
            yield "    ";
        }
        // line 30
        yield "     
        ";
        // line 31
        if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["indicators"]) || array_key_exists("indicators", $context) ? $context["indicators"] : (function () { throw new RuntimeError('Variable "indicators" does not exist.', 31, $this->source); })())) > 0)) {
            // line 32
            yield "        ";
            yield from $this->load("suivi_ind/suivi_list.html.twig", 32, "484319212")->unwrap()->yield($context);
            // line 78
            yield "  
        ";
        }
        // line 80
        yield "
    ";
        // line 81
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield "          
    ";
            // line 82
            yield             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 82, $this->source); })()), 'form_end');
            yield "
    ";
        }
        // line 84
        yield "
        <!-- Valide Modal -->
        <div class=\"modal fade\" id=\"valideModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myLargeModalLabel\" aria-hidden=\"true\">
            <div class=\"modal-dialog modal-lg\">
                <div class=\"modal-content\">
                    <div class=\"modal-header\">
                        <h5 class=\"modal-title h4\" id=\"myLargeModalLabel\">";
        // line 90
        yield (((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_FOCAL")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("Soumission") : ("Validation"));
        yield " des données de ";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 90, $this->source); })()), "session", [], "any", false, false, false, 90), "get", ["_year"], "method", false, false, false, 90), "html", null, true);
        yield "</h5>
                        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
                        <span aria-hidden=\"true\">&times;</span>
                        </button>
                    </div>
                    <form action=\"";
        // line 95
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_ministere_validation");
        yield "\" method=\"post\" enctype=\"multipart/form-data\">
                    <div class=\"modal-body\">
                           Vous êtes sur le point de ";
        // line 97
        yield (((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_FOCAL")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("soumettre") : ("valider"));
        yield " vos données. Vous ne pouvez plus les modifier.
                    </div>
                    <div class=\"modal-footer\">
                        <button type=\"button\" class=\"btn btn-primary\" data-dismiss=\"modal\">Annuler</button>
                        <button type=\"submit\" class=\"btn btn-success\">";
        // line 101
        yield (((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_FOCAL")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("Soumettre") : ("Valider"));
        yield "</button>
                    </div>
                    </form>
                </div>
            </div>   
        </div>

";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 110
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));

        // line 111
        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 204
        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 205
        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>

";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 209
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_stylesheets(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));

        // line 210
        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 "\">
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  326 => 210,  316 => 209,  305 => 205,  301 => 204,  206 => 111,  196 => 110,  180 => 101,  173 => 97,  168 => 95,  158 => 90,  150 => 84,  145 => 82,  141 => 81,  138 => 80,  134 => 78,  131 => 32,  129 => 31,  126 => 30,  123 => 29,  121 => 24,  116 => 23,  114 => 22,  110 => 20,  101 => 14,  95 => 10,  93 => 9,  90 => 8,  87 => 7,  77 => 6,  60 => 3,  43 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/suiodd-layout.html.twig' %}

{% block page_title %}{% trans %}suivi.indicateur.title{% endtrans %}{% endblock %}


{% block page_content %}
    {% if(is_granted('ROLE_MANAGER'))  %}

    {% elseif (etat) %}
            <div class=\"row\">
                <div class=\"col-sm-12\">
                    <div class=\"text-right\">
                        <button type=\"button\" class=\"mb-2 mr-2 btn-shadow  btn btn-danger text-right\" data-toggle=\"modal\" data-target=\"#valideModal\">
                            <i class=\"fa fa-check\"></i> {{ is_granted('ROLE_FOCAL') ? 'Soumettre' : 'Valider' }}
                        </button>
                    </div>
                </div>
            </div>
    {% endif %}
    

    {% if(is_granted('ROLE_MANAGER'))  %}
    {{ form_start(form) }}
            {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
                {% block box_body %}
                    {{ form_widget(form) }}
                {% endblock %}
            {% endembed %}
    {% endif %}
     
        {% if indicators|length > 0 %}
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_body %}
                <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\">
                                {% for i in 4..0 %}
                                <div class=\"col-2 float-left text-center\">{{ year - i }}</div>
                                {% endfor %}
                                <div class=\"col-2 float-left text-center\">Val. cible</div>
                            </div>
                            
                            <div class=\"col-1 text-center\"></div>
                        </div>
                    </th>
                </thead>

                {% for indicator in indicators %}
                <tr>
                    <td>
                        <div class=\"row mt-2 mb-2\">
                            <div class=\"col-2\">{{ indicator.target }}</div>
                            <div class=\"col-3\">{{ indicator }}</div>
                            <div class=\"col-6\">
                                {% for i in 4..0 %}
                                <div class=\"col-2 float-left text-center\">{{ suivis[indicator.id][year - i] ? suivis[indicator.id][year - i] : '-' }}</div>
                                {% endfor %}
                                <div class=\"col-2 float-left text-center\"><b>{{ indicator.maxValue }}</b></div>
                                
                                <div class=\"col-12 float-left\"><hr>{{suivis[indicator.id]['observation'] | raw}}</div>
                            </div>
                            
                            <div class=\"col-1 text-center\">
                            {#% if (is_granted('ROLE_MANAGER')) %#}
                                <a href=\"{{ path('app_indice_edit', { 'id': indicator.id}) }}\" class=\"btn btn-sm btn-secondary\">{% trans %}basics.update{% endtrans %}</a>
                            {#% endif %#}
                            </div>
                        </div>
                    </td>
                </tr>
                {% endfor %}
                </table>
            {% endblock %}
        {% endembed %}  
        {% endif %}

    {% if(is_granted('ROLE_MANAGER'))  %}          
    {{ form_end(form) }}
    {% endif %}

        <!-- Valide Modal -->
        <div class=\"modal fade\" id=\"valideModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myLargeModalLabel\" aria-hidden=\"true\">
            <div class=\"modal-dialog modal-lg\">
                <div class=\"modal-content\">
                    <div class=\"modal-header\">
                        <h5 class=\"modal-title h4\" id=\"myLargeModalLabel\">{{ is_granted('ROLE_FOCAL') ? 'Soumission' : 'Validation' }} des données de {{app.session.get('_year')}}</h5>
                        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
                        <span aria-hidden=\"true\">&times;</span>
                        </button>
                    </div>
                    <form action=\"{{ path('app_ministere_validation') }}\" method=\"post\" enctype=\"multipart/form-data\">
                    <div class=\"modal-body\">
                           Vous êtes sur le point de {{ is_granted('ROLE_FOCAL') ? 'soumettre' : 'valider' }} vos données. Vous ne pouvez plus les modifier.
                    </div>
                    <div class=\"modal-footer\">
                        <button type=\"button\" class=\"btn btn-primary\" data-dismiss=\"modal\">Annuler</button>
                        <button type=\"submit\" class=\"btn btn-success\">{{ is_granted('ROLE_FOCAL') ? 'Soumettre' : 'Valider' }}</button>
                    </div>
                    </form>
                </div>
            </div>   
        </div>

{% endblock %}

{% block javascripts %}
    <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=\"{{ asset('plugins/datatables/jquery.dataTables.js') }}\"></script>
    <script src=\"{{ asset('plugins/datatables-bs4/js/dataTables.bootstrap4.js') }}\"></script>

{% endblock %}

{% block stylesheets %}
    <link rel=\"stylesheet\" href=\"{{ asset('plugins/datatables-bs4/css/dataTables.bootstrap4.css') }}\">
{% endblock %}", "suivi_ind/suivi_list.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/suivi_ind/suivi_list.html.twig");
    }
}


/* suivi_ind/suivi_list.html.twig */
class __TwigTemplate_947b17636a57a8312c00c0a479a70245___808618743 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 24
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "suivi_ind/suivi_list.html.twig"));

        $this->parent = $this->load("@AdminLTE/Widgets/box-widget.html.twig", 24);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    // line 25
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "box_body"));

        // line 26
        yield "                    ";
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 26, $this->source); })()), 'widget');
        yield "
                ";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  627 => 26,  617 => 25,  600 => 24,  326 => 210,  316 => 209,  305 => 205,  301 => 204,  206 => 111,  196 => 110,  180 => 101,  173 => 97,  168 => 95,  158 => 90,  150 => 84,  145 => 82,  141 => 81,  138 => 80,  134 => 78,  131 => 32,  129 => 31,  126 => 30,  123 => 29,  121 => 24,  116 => 23,  114 => 22,  110 => 20,  101 => 14,  95 => 10,  93 => 9,  90 => 8,  87 => 7,  77 => 6,  60 => 3,  43 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/suiodd-layout.html.twig' %}

{% block page_title %}{% trans %}suivi.indicateur.title{% endtrans %}{% endblock %}


{% block page_content %}
    {% if(is_granted('ROLE_MANAGER'))  %}

    {% elseif (etat) %}
            <div class=\"row\">
                <div class=\"col-sm-12\">
                    <div class=\"text-right\">
                        <button type=\"button\" class=\"mb-2 mr-2 btn-shadow  btn btn-danger text-right\" data-toggle=\"modal\" data-target=\"#valideModal\">
                            <i class=\"fa fa-check\"></i> {{ is_granted('ROLE_FOCAL') ? 'Soumettre' : 'Valider' }}
                        </button>
                    </div>
                </div>
            </div>
    {% endif %}
    

    {% if(is_granted('ROLE_MANAGER'))  %}
    {{ form_start(form) }}
            {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
                {% block box_body %}
                    {{ form_widget(form) }}
                {% endblock %}
            {% endembed %}
    {% endif %}
     
        {% if indicators|length > 0 %}
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_body %}
                <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\">
                                {% for i in 4..0 %}
                                <div class=\"col-2 float-left text-center\">{{ year - i }}</div>
                                {% endfor %}
                                <div class=\"col-2 float-left text-center\">Val. cible</div>
                            </div>
                            
                            <div class=\"col-1 text-center\"></div>
                        </div>
                    </th>
                </thead>

                {% for indicator in indicators %}
                <tr>
                    <td>
                        <div class=\"row mt-2 mb-2\">
                            <div class=\"col-2\">{{ indicator.target }}</div>
                            <div class=\"col-3\">{{ indicator }}</div>
                            <div class=\"col-6\">
                                {% for i in 4..0 %}
                                <div class=\"col-2 float-left text-center\">{{ suivis[indicator.id][year - i] ? suivis[indicator.id][year - i] : '-' }}</div>
                                {% endfor %}
                                <div class=\"col-2 float-left text-center\"><b>{{ indicator.maxValue }}</b></div>
                                
                                <div class=\"col-12 float-left\"><hr>{{suivis[indicator.id]['observation'] | raw}}</div>
                            </div>
                            
                            <div class=\"col-1 text-center\">
                            {#% if (is_granted('ROLE_MANAGER')) %#}
                                <a href=\"{{ path('app_indice_edit', { 'id': indicator.id}) }}\" class=\"btn btn-sm btn-secondary\">{% trans %}basics.update{% endtrans %}</a>
                            {#% endif %#}
                            </div>
                        </div>
                    </td>
                </tr>
                {% endfor %}
                </table>
            {% endblock %}
        {% endembed %}  
        {% endif %}

    {% if(is_granted('ROLE_MANAGER'))  %}          
    {{ form_end(form) }}
    {% endif %}

        <!-- Valide Modal -->
        <div class=\"modal fade\" id=\"valideModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myLargeModalLabel\" aria-hidden=\"true\">
            <div class=\"modal-dialog modal-lg\">
                <div class=\"modal-content\">
                    <div class=\"modal-header\">
                        <h5 class=\"modal-title h4\" id=\"myLargeModalLabel\">{{ is_granted('ROLE_FOCAL') ? 'Soumission' : 'Validation' }} des données de {{app.session.get('_year')}}</h5>
                        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
                        <span aria-hidden=\"true\">&times;</span>
                        </button>
                    </div>
                    <form action=\"{{ path('app_ministere_validation') }}\" method=\"post\" enctype=\"multipart/form-data\">
                    <div class=\"modal-body\">
                           Vous êtes sur le point de {{ is_granted('ROLE_FOCAL') ? 'soumettre' : 'valider' }} vos données. Vous ne pouvez plus les modifier.
                    </div>
                    <div class=\"modal-footer\">
                        <button type=\"button\" class=\"btn btn-primary\" data-dismiss=\"modal\">Annuler</button>
                        <button type=\"submit\" class=\"btn btn-success\">{{ is_granted('ROLE_FOCAL') ? 'Soumettre' : 'Valider' }}</button>
                    </div>
                    </form>
                </div>
            </div>   
        </div>

{% endblock %}

{% block javascripts %}
    <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=\"{{ asset('plugins/datatables/jquery.dataTables.js') }}\"></script>
    <script src=\"{{ asset('plugins/datatables-bs4/js/dataTables.bootstrap4.js') }}\"></script>

{% endblock %}

{% block stylesheets %}
    <link rel=\"stylesheet\" href=\"{{ asset('plugins/datatables-bs4/css/dataTables.bootstrap4.css') }}\">
{% endblock %}", "suivi_ind/suivi_list.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/suivi_ind/suivi_list.html.twig");
    }
}


/* suivi_ind/suivi_list.html.twig */
class __TwigTemplate_947b17636a57a8312c00c0a479a70245___484319212 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 32
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "suivi_ind/suivi_list.html.twig"));

        $this->parent = $this->load("@AdminLTE/Widgets/box-widget.html.twig", 32);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    // line 33
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "box_body"));

        // line 34
        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 41
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(range(4, 0));
        foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
            // line 42
            yield "                                <div class=\"col-2 float-left text-center\">";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((isset($context["year"]) || array_key_exists("year", $context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.', 42, $this->source); })()) - $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 44
        yield "                                <div class=\"col-2 float-left text-center\">Val. cible</div>
                            </div>
                            
                            <div class=\"col-1 text-center\"></div>
                        </div>
                    </th>
                </thead>

                ";
        // line 52
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable((isset($context["indicators"]) || array_key_exists("indicators", $context) ? $context["indicators"] : (function () { throw new RuntimeError('Variable "indicators" does not exist.', 52, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["indicator"]) {
            // line 53
            yield "                <tr>
                    <td>
                        <div class=\"row mt-2 mb-2\">
                            <div class=\"col-2\">";
            // line 56
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "target", [], "any", false, false, false, 56), "html", null, true);
            yield "</div>
                            <div class=\"col-3\">";
            // line 57
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["indicator"], "html", null, true);
            yield "</div>
                            <div class=\"col-6\">
                                ";
            // line 59
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(range(4, 0));
            foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
                // line 60
                yield "                                <div class=\"col-2 float-left text-center\">";
                yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["suivis"]) || array_key_exists("suivis", $context) ? $context["suivis"] : (function () { throw new RuntimeError('Variable "suivis" does not exist.', 60, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 60), [], "array", false, false, false, 60), ((isset($context["year"]) || array_key_exists("year", $context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.', 60, $this->source); })()) - $context["i"]), [], "array", false, false, false, 60)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["suivis"]) || array_key_exists("suivis", $context) ? $context["suivis"] : (function () { throw new RuntimeError('Variable "suivis" does not exist.', 60, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 60), [], "array", false, false, false, 60), ((isset($context["year"]) || array_key_exists("year", $context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.', 60, $this->source); })()) - $context["i"]), [], "array", false, false, false, 60), "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 62
            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, 62), "html", null, true);
            yield "</b></div>
                                
                                <div class=\"col-12 float-left\"><hr>";
            // line 64
            yield CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["suivis"]) || array_key_exists("suivis", $context) ? $context["suivis"] : (function () { throw new RuntimeError('Variable "suivis" does not exist.', 64, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 64), [], "array", false, false, false, 64), "observation", [], "array", false, false, false, 64);
            yield "</div>
                            </div>
                            
                            <div class=\"col-1 text-center\">
                            ";
            // line 69
            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, 69)]), "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 71
            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 76
        yield "                </table>
            ";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  1021 => 76,  1011 => 71,  1004 => 69,  997 => 64,  991 => 62,  982 => 60,  978 => 59,  973 => 57,  969 => 56,  964 => 53,  960 => 52,  950 => 44,  941 => 42,  937 => 41,  928 => 34,  918 => 33,  901 => 32,  627 => 26,  617 => 25,  600 => 24,  326 => 210,  316 => 209,  305 => 205,  301 => 204,  206 => 111,  196 => 110,  180 => 101,  173 => 97,  168 => 95,  158 => 90,  150 => 84,  145 => 82,  141 => 81,  138 => 80,  134 => 78,  131 => 32,  129 => 31,  126 => 30,  123 => 29,  121 => 24,  116 => 23,  114 => 22,  110 => 20,  101 => 14,  95 => 10,  93 => 9,  90 => 8,  87 => 7,  77 => 6,  60 => 3,  43 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/suiodd-layout.html.twig' %}

{% block page_title %}{% trans %}suivi.indicateur.title{% endtrans %}{% endblock %}


{% block page_content %}
    {% if(is_granted('ROLE_MANAGER'))  %}

    {% elseif (etat) %}
            <div class=\"row\">
                <div class=\"col-sm-12\">
                    <div class=\"text-right\">
                        <button type=\"button\" class=\"mb-2 mr-2 btn-shadow  btn btn-danger text-right\" data-toggle=\"modal\" data-target=\"#valideModal\">
                            <i class=\"fa fa-check\"></i> {{ is_granted('ROLE_FOCAL') ? 'Soumettre' : 'Valider' }}
                        </button>
                    </div>
                </div>
            </div>
    {% endif %}
    

    {% if(is_granted('ROLE_MANAGER'))  %}
    {{ form_start(form) }}
            {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
                {% block box_body %}
                    {{ form_widget(form) }}
                {% endblock %}
            {% endembed %}
    {% endif %}
     
        {% if indicators|length > 0 %}
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_body %}
                <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\">
                                {% for i in 4..0 %}
                                <div class=\"col-2 float-left text-center\">{{ year - i }}</div>
                                {% endfor %}
                                <div class=\"col-2 float-left text-center\">Val. cible</div>
                            </div>
                            
                            <div class=\"col-1 text-center\"></div>
                        </div>
                    </th>
                </thead>

                {% for indicator in indicators %}
                <tr>
                    <td>
                        <div class=\"row mt-2 mb-2\">
                            <div class=\"col-2\">{{ indicator.target }}</div>
                            <div class=\"col-3\">{{ indicator }}</div>
                            <div class=\"col-6\">
                                {% for i in 4..0 %}
                                <div class=\"col-2 float-left text-center\">{{ suivis[indicator.id][year - i] ? suivis[indicator.id][year - i] : '-' }}</div>
                                {% endfor %}
                                <div class=\"col-2 float-left text-center\"><b>{{ indicator.maxValue }}</b></div>
                                
                                <div class=\"col-12 float-left\"><hr>{{suivis[indicator.id]['observation'] | raw}}</div>
                            </div>
                            
                            <div class=\"col-1 text-center\">
                            {#% if (is_granted('ROLE_MANAGER')) %#}
                                <a href=\"{{ path('app_indice_edit', { 'id': indicator.id}) }}\" class=\"btn btn-sm btn-secondary\">{% trans %}basics.update{% endtrans %}</a>
                            {#% endif %#}
                            </div>
                        </div>
                    </td>
                </tr>
                {% endfor %}
                </table>
            {% endblock %}
        {% endembed %}  
        {% endif %}

    {% if(is_granted('ROLE_MANAGER'))  %}          
    {{ form_end(form) }}
    {% endif %}

        <!-- Valide Modal -->
        <div class=\"modal fade\" id=\"valideModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myLargeModalLabel\" aria-hidden=\"true\">
            <div class=\"modal-dialog modal-lg\">
                <div class=\"modal-content\">
                    <div class=\"modal-header\">
                        <h5 class=\"modal-title h4\" id=\"myLargeModalLabel\">{{ is_granted('ROLE_FOCAL') ? 'Soumission' : 'Validation' }} des données de {{app.session.get('_year')}}</h5>
                        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
                        <span aria-hidden=\"true\">&times;</span>
                        </button>
                    </div>
                    <form action=\"{{ path('app_ministere_validation') }}\" method=\"post\" enctype=\"multipart/form-data\">
                    <div class=\"modal-body\">
                           Vous êtes sur le point de {{ is_granted('ROLE_FOCAL') ? 'soumettre' : 'valider' }} vos données. Vous ne pouvez plus les modifier.
                    </div>
                    <div class=\"modal-footer\">
                        <button type=\"button\" class=\"btn btn-primary\" data-dismiss=\"modal\">Annuler</button>
                        <button type=\"submit\" class=\"btn btn-success\">{{ is_granted('ROLE_FOCAL') ? 'Soumettre' : 'Valider' }}</button>
                    </div>
                    </form>
                </div>
            </div>   
        </div>

{% endblock %}

{% block javascripts %}
    <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=\"{{ asset('plugins/datatables/jquery.dataTables.js') }}\"></script>
    <script src=\"{{ asset('plugins/datatables-bs4/js/dataTables.bootstrap4.js') }}\"></script>

{% endblock %}

{% block stylesheets %}
    <link rel=\"stylesheet\" href=\"{{ asset('plugins/datatables-bs4/css/dataTables.bootstrap4.css') }}\">
{% endblock %}", "suivi_ind/suivi_list.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/suivi_ind/suivi_list.html.twig");
    }
}
