<?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;

/* setting/mesodd_dashboard.html.twig */
class __TwigTemplate_aa5220badc316192c4f674486466f063 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'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 1
        return "@AdminLTE/layout/mesodd-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", "setting/mesodd_dashboard.html.twig"));

        $this->parent = $this->load("@AdminLTE/layout/mesodd-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("dashboard.title", [], "messages");
        yield " MesODD  ";
        if ((($tmp = (isset($context["ministry"]) || array_key_exists("ministry", $context) ? $context["ministry"] : (function () { throw new RuntimeError('Variable "ministry" does not exist.', 3, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield " - ";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ministry"]) || array_key_exists("ministry", $context) ? $context["ministry"] : (function () { throw new RuntimeError('Variable "ministry" does not exist.', 3, $this->source); })()), "name", [], "any", false, false, false, 3), "html", null, true);
            yield " ";
        }
        yield " ";
        if ((($tmp = (isset($context["departement"]) || array_key_exists("departement", $context) ? $context["departement"] : (function () { throw new RuntimeError('Variable "departement" does not exist.', 3, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield " - ";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["departement"]) || array_key_exists("departement", $context) ? $context["departement"] : (function () { throw new RuntimeError('Variable "departement" does not exist.', 3, $this->source); })()), "name", [], "any", false, false, false, 3), "html", null, true);
            yield " ";
        }
        yield "  ";
        if ((($tmp = (isset($context["commune"]) || array_key_exists("commune", $context) ? $context["commune"] : (function () { throw new RuntimeError('Variable "commune" does not exist.', 3, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield "  - ";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["commune"]) || array_key_exists("commune", $context) ? $context["commune"] : (function () { throw new RuntimeError('Variable "commune" does not exist.', 3, $this->source); })()), "name", [], "any", false, false, false, 3), "html", null, true);
            yield " ";
        }
        yield " ";
        
        $__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 (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD"))) {
            // line 8
            yield "        <div class=\"card card-default\">
            <div class=\"card-body\">
                ";
            // line 10
            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.', 10, $this->source); })()), 'form_start');
            yield "
                    <div class=\"form-group row\">
                        ";
            // line 12
            if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 13
                yield "                            <div class=\"col-sm-4\">
                                ";
                // line 14
                yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 14, $this->source); })()), "type", [], "any", false, false, false, 14), 'label', ["label_attr" => ["class" => "col-sm-12"]]);
                yield "
                                ";
                // line 15
                yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 15, $this->source); })()), "type", [], "any", false, false, false, 15), 'widget');
                yield "
                            </div>
                            <div class=\"col-sm-8\">
                                ";
                // line 18
                yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 18, $this->source); })()), "entite", [], "any", false, false, false, 18), 'label', ["label_attr" => ["class" => "col-sm-12"]]);
                yield "
                                ";
                // line 19
                yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 19, $this->source); })()), "entite", [], "any", false, false, false, 19), 'widget');
                yield "
                            </div>
                        ";
            } else {
                // line 22
                yield "                            <div class=\"col-sm-12\">
                                ";
                // line 23
                yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 23, $this->source); })()), "entite", [], "any", false, false, false, 23), 'label', ["label_attr" => ["class" => "col-sm-12"]]);
                yield "
                                ";
                // line 24
                yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 24, $this->source); })()), "entite", [], "any", false, false, false, 24), 'widget');
                yield "
                            </div>
                        ";
            }
            // line 27
            yield "                    </div>
                ";
            // line 28
            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.', 28, $this->source); })()), 'form_end');
            yield "  
            </div>
        </div>
    ";
        }
        // line 32
        yield "        
    <!-- Info boxes -->
    <div class=\"row\">
        <div class=\"col-12 col-sm-6 col-md-3\">
        ";
        // line 36
        yield from $this->load("setting/mesodd_dashboard.html.twig", 36, "1009993748")->unwrap()->yield(CoreExtension::merge($context, ["color" => "info", "icon" => "fas fa-cog"]));
        // line 44
        yield "        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        ";
        // line 47
        yield from $this->load("setting/mesodd_dashboard.html.twig", 47, "493482299")->unwrap()->yield(CoreExtension::merge($context, ["color" => "danger", "icon" => "fas fa-thumbs-up"]));
        // line 55
        yield "        </div>

        <div class=\"clearfix hidden-md-up\"></div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        ";
        // line 60
        yield from $this->load("setting/mesodd_dashboard.html.twig", 60, "1509576213")->unwrap()->yield(CoreExtension::merge($context, ["color" => "success", "icon" => "fas fa-shopping-cart"]));
        // line 68
        yield "        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        ";
        // line 71
        yield from $this->load("setting/mesodd_dashboard.html.twig", 71, "1854172944")->unwrap()->yield(CoreExtension::merge($context, ["color" => "warning", "icon" => "fas fa-users"]));
        // line 79
        yield "        </div>
    </div>

    <div class=\"row\">
        <div class=\"col-md-12\">
        ";
        // line 84
        yield from $this->load("setting/mesodd_dashboard.html.twig", 84, "1820404360")->unwrap()->yield($context);
        // line 154
        yield "      
       
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 158
    /**
     * @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 159
        yield "
    <script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>


    <script>
        \$(function () {
            var barChartData = {
                labels: ";
        // line 186
        yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 186, $this->source); })()), "labels", [], "array", false, false, false, 186));
        yield ",
                datasets: [
                    {
                        backgroundColor     : ";
        // line 189
        yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 189, $this->source); })()), "bgColor", [], "array", false, false, false, 189));
        yield ",
                        borderColor         : ";
        // line 190
        yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 190, $this->source); })()), "bgColor", [], "array", false, false, false, 190));
        yield ",
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : ";
        // line 197
        yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 197, $this->source); })()), "values", [], "array", false, false, false, 197));
        yield "
                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        color: 'white',
                        font: {
                            weight: 'bold',
                            size: 12,
                        },
                        align: 'start',
\t\t\t\t\t\tanchor: 'end'
                    }
                }
            }
        
            var barChart = new Chart(barChartCanvas, {
                type: 'bar', 
                data: barChartData,
                options: barChartOptions
            })
      
        })
    </script>

    <script src=\"";
        // line 241
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/chart.js/Chart.min.js"), "html", null, true);
        yield "\"></script>
    <script src=\"";
        // line 242
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js"), "html", null, true);
        yield "\"></script>
    
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  325 => 242,  321 => 241,  274 => 197,  264 => 190,  260 => 189,  254 => 186,  225 => 159,  215 => 158,  205 => 154,  203 => 84,  196 => 79,  194 => 71,  189 => 68,  187 => 60,  180 => 55,  178 => 47,  173 => 44,  171 => 36,  165 => 32,  158 => 28,  155 => 27,  149 => 24,  145 => 23,  142 => 22,  136 => 19,  132 => 18,  126 => 15,  122 => 14,  119 => 13,  117 => 12,  112 => 10,  108 => 8,  105 => 7,  95 => 6,  59 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/mesodd-layout.html.twig' %}

{% block page_title %}{% trans %}dashboard.title{% endtrans %} MesODD  {% if ministry %} - {{ministry.name}} {% endif %} {% if departement %} - {{departement.name}} {% endif %}  {% if commune %}  - {{commune.name}} {% endif %} {% endblock %}


{% block page_content %}
    {% if is_granted('ROLE_MANAGER') or is_granted('ROLE_DDD')  %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        {% if is_granted('ROLE_MANAGER') %}
                            <div class=\"col-sm-4\">
                                {{ form_label(form.type, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.type) }}
                            </div>
                            <div class=\"col-sm-8\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% else %}
                            <div class=\"col-sm-12\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% endif %}
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}
        
    <!-- Info boxes -->
    <div class=\"row\">
        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'info',
            'icon'  : 'fas fa-cog',
        }%}
            {% block box_text %}Programmes{% endblock %}
            {% block box_number %}{{ totalProgramm }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'danger',
            'icon'  : 'fas fa-thumbs-up',
        }%}
            {% block box_text %}Actions{% endblock %}
            {% block box_number %}{{ totalAction }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"clearfix hidden-md-up\"></div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'success',
            'icon'  : 'fas fa-shopping-cart',
        }%}
            {% block box_text %}Activités{% endblock %}
            {% block box_number %}{{ nbActivityTotal }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'warning',
            'icon'  : 'fas fa-users',
        }%}
            {% block box_text %}Montant{% endblock %}
            {% block box_number %}{{ amount|number_format(0, ',', ' ') }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>
    </div>

    <div class=\"row\">
        <div class=\"col-md-12\">
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_title %}
                <label class=\"col-sm-12 col-form-label\"><span style=\"color:red\">Sensibilité globale : {{global|number_format(2, ',', ' ')}} %</span></label>
            {% endblock %}
            {% block box_tools %}{% endblock %}
            {% block box_body %}
                <div class=\"row\">
                    <div class=\"col-md-8\">
                        <p class=\"text-center\">
                            <strong>Sensibilité par ODD</strong>
                        </p>
                        <div class=\"chart\">
                            <canvas id=\"barChart\" height=\"250\" style=\"height: 250px;\"></canvas>
                        </div>
                    </div>
                   
                    <div class=\"col-md-4\">
                        <p class=\"text-center\">
                            <strong>Natures d’activités</strong>
                        </p>
  
                        <div class=\"progress-group\">
                            Actions
                            <span class=\"float-right\"><b>{{ totalActionTreated }}</b>/{{ totalAction }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if totalAction %}{{ (totalActionTreated / totalAction) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>
  
                        <div class=\"progress-group\">
                            Activités
                            <span class=\"float-right\"><b>{{ nbActivityTreated }}</b>/{{ nbActivityTotal }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if nbActivityTotal %}{{ (nbActivityTreated / nbActivityTotal) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>

                        <!--div class=\"progress-group\">
                            <span class=\"progress-text\">Visit Premium Page</span>
                            <span class=\"float-right\"><b>480</b>/800</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 60%\"></div>
                            </div>
                        </div>

                        <div class=\"progress-group\">
                            Send Inquiries
                            <span class=\"float-right\"><b>250</b>/500</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 50%\"></div>
                            </div>
                        </div-->
                    </div>
                </div>
            {% endblock %}

            {% block box_footer %}
                <div class=\"row\">
                    {% for nature in natures %}
                    <div class=\"col-sm-3 col-6\">
                        <div class=\"description-block border-right\">
                            <span class=\"description-text\">{{ nature.name }}</span>
                            <h5 class=\"description-header\">{{ nature.amount|number_format(0, ',', ' ') }} F</h5>
                            <span class=\"description-percentage text-success\">{% if amount %} {{ (nature.amount / amount * 100)|number_format(2, ',', ' ') }}% {% endif %}</span>
                        </div>
                    </div>
                    {% endfor %}
                </div>
            {% endblock %}
        {% endembed %}
      
       
{% endblock %}

{% block javascripts %}

    <script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>


    <script>
        \$(function () {
            var barChartData = {
                labels: {{ barChart['labels']|json_encode()|raw }},
                datasets: [
                    {
                        backgroundColor     : {{ barChart['bgColor']|json_encode()|raw }},
                        borderColor         : {{ barChart['bgColor']|json_encode()|raw }},
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : {{ barChart['values']|json_encode()|raw }}
                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        color: 'white',
                        font: {
                            weight: 'bold',
                            size: 12,
                        },
                        align: 'start',
\t\t\t\t\t\tanchor: 'end'
                    }
                }
            }
        
            var barChart = new Chart(barChartCanvas, {
                type: 'bar', 
                data: barChartData,
                options: barChartOptions
            })
      
        })
    </script>

    <script src=\"{{ asset('plugins/chart.js/Chart.min.js') }}\"></script>
    <script src=\"{{ asset('plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js') }}\"></script>
    
{% endblock %}", "setting/mesodd_dashboard.html.twig", "C:\\Users\\dev29\\Documents\\code source mes odd\\httpdocs\\templates\\setting\\mesodd_dashboard.html.twig");
    }
}


/* setting/mesodd_dashboard.html.twig */
class __TwigTemplate_aa5220badc316192c4f674486466f063___1009993748 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_text' => [$this, 'block_box_text'],
            'box_number' => [$this, 'block_box_number'],
            'progress_description' => [$this, 'block_progress_description'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 36
        return "@AdminLTE/Widgets/infobox-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", "setting/mesodd_dashboard.html.twig"));

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

    }

    // line 40
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_text(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_text"));

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

        yield from [];
    }

    // line 41
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_number(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_number"));

        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["totalProgramm"]) || array_key_exists("totalProgramm", $context) ? $context["totalProgramm"] : (function () { throw new RuntimeError('Variable "totalProgramm" does not exist.', 41, $this->source); })()), "html", null, true);
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 42
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_progress_description(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", "progress_description"));

        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  685 => 42,  668 => 41,  651 => 40,  634 => 36,  325 => 242,  321 => 241,  274 => 197,  264 => 190,  260 => 189,  254 => 186,  225 => 159,  215 => 158,  205 => 154,  203 => 84,  196 => 79,  194 => 71,  189 => 68,  187 => 60,  180 => 55,  178 => 47,  173 => 44,  171 => 36,  165 => 32,  158 => 28,  155 => 27,  149 => 24,  145 => 23,  142 => 22,  136 => 19,  132 => 18,  126 => 15,  122 => 14,  119 => 13,  117 => 12,  112 => 10,  108 => 8,  105 => 7,  95 => 6,  59 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/mesodd-layout.html.twig' %}

{% block page_title %}{% trans %}dashboard.title{% endtrans %} MesODD  {% if ministry %} - {{ministry.name}} {% endif %} {% if departement %} - {{departement.name}} {% endif %}  {% if commune %}  - {{commune.name}} {% endif %} {% endblock %}


{% block page_content %}
    {% if is_granted('ROLE_MANAGER') or is_granted('ROLE_DDD')  %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        {% if is_granted('ROLE_MANAGER') %}
                            <div class=\"col-sm-4\">
                                {{ form_label(form.type, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.type) }}
                            </div>
                            <div class=\"col-sm-8\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% else %}
                            <div class=\"col-sm-12\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% endif %}
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}
        
    <!-- Info boxes -->
    <div class=\"row\">
        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'info',
            'icon'  : 'fas fa-cog',
        }%}
            {% block box_text %}Programmes{% endblock %}
            {% block box_number %}{{ totalProgramm }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'danger',
            'icon'  : 'fas fa-thumbs-up',
        }%}
            {% block box_text %}Actions{% endblock %}
            {% block box_number %}{{ totalAction }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"clearfix hidden-md-up\"></div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'success',
            'icon'  : 'fas fa-shopping-cart',
        }%}
            {% block box_text %}Activités{% endblock %}
            {% block box_number %}{{ nbActivityTotal }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'warning',
            'icon'  : 'fas fa-users',
        }%}
            {% block box_text %}Montant{% endblock %}
            {% block box_number %}{{ amount|number_format(0, ',', ' ') }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>
    </div>

    <div class=\"row\">
        <div class=\"col-md-12\">
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_title %}
                <label class=\"col-sm-12 col-form-label\"><span style=\"color:red\">Sensibilité globale : {{global|number_format(2, ',', ' ')}} %</span></label>
            {% endblock %}
            {% block box_tools %}{% endblock %}
            {% block box_body %}
                <div class=\"row\">
                    <div class=\"col-md-8\">
                        <p class=\"text-center\">
                            <strong>Sensibilité par ODD</strong>
                        </p>
                        <div class=\"chart\">
                            <canvas id=\"barChart\" height=\"250\" style=\"height: 250px;\"></canvas>
                        </div>
                    </div>
                   
                    <div class=\"col-md-4\">
                        <p class=\"text-center\">
                            <strong>Natures d’activités</strong>
                        </p>
  
                        <div class=\"progress-group\">
                            Actions
                            <span class=\"float-right\"><b>{{ totalActionTreated }}</b>/{{ totalAction }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if totalAction %}{{ (totalActionTreated / totalAction) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>
  
                        <div class=\"progress-group\">
                            Activités
                            <span class=\"float-right\"><b>{{ nbActivityTreated }}</b>/{{ nbActivityTotal }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if nbActivityTotal %}{{ (nbActivityTreated / nbActivityTotal) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>

                        <!--div class=\"progress-group\">
                            <span class=\"progress-text\">Visit Premium Page</span>
                            <span class=\"float-right\"><b>480</b>/800</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 60%\"></div>
                            </div>
                        </div>

                        <div class=\"progress-group\">
                            Send Inquiries
                            <span class=\"float-right\"><b>250</b>/500</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 50%\"></div>
                            </div>
                        </div-->
                    </div>
                </div>
            {% endblock %}

            {% block box_footer %}
                <div class=\"row\">
                    {% for nature in natures %}
                    <div class=\"col-sm-3 col-6\">
                        <div class=\"description-block border-right\">
                            <span class=\"description-text\">{{ nature.name }}</span>
                            <h5 class=\"description-header\">{{ nature.amount|number_format(0, ',', ' ') }} F</h5>
                            <span class=\"description-percentage text-success\">{% if amount %} {{ (nature.amount / amount * 100)|number_format(2, ',', ' ') }}% {% endif %}</span>
                        </div>
                    </div>
                    {% endfor %}
                </div>
            {% endblock %}
        {% endembed %}
      
       
{% endblock %}

{% block javascripts %}

    <script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>


    <script>
        \$(function () {
            var barChartData = {
                labels: {{ barChart['labels']|json_encode()|raw }},
                datasets: [
                    {
                        backgroundColor     : {{ barChart['bgColor']|json_encode()|raw }},
                        borderColor         : {{ barChart['bgColor']|json_encode()|raw }},
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : {{ barChart['values']|json_encode()|raw }}
                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        color: 'white',
                        font: {
                            weight: 'bold',
                            size: 12,
                        },
                        align: 'start',
\t\t\t\t\t\tanchor: 'end'
                    }
                }
            }
        
            var barChart = new Chart(barChartCanvas, {
                type: 'bar', 
                data: barChartData,
                options: barChartOptions
            })
      
        })
    </script>

    <script src=\"{{ asset('plugins/chart.js/Chart.min.js') }}\"></script>
    <script src=\"{{ asset('plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js') }}\"></script>
    
{% endblock %}", "setting/mesodd_dashboard.html.twig", "C:\\Users\\dev29\\Documents\\code source mes odd\\httpdocs\\templates\\setting\\mesodd_dashboard.html.twig");
    }
}


/* setting/mesodd_dashboard.html.twig */
class __TwigTemplate_aa5220badc316192c4f674486466f063___493482299 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_text' => [$this, 'block_box_text'],
            'box_number' => [$this, 'block_box_number'],
            'progress_description' => [$this, 'block_progress_description'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 47
        return "@AdminLTE/Widgets/infobox-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", "setting/mesodd_dashboard.html.twig"));

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

    }

    // line 51
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_text(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_text"));

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

        yield from [];
    }

    // line 52
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_number(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_number"));

        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["totalAction"]) || array_key_exists("totalAction", $context) ? $context["totalAction"] : (function () { throw new RuntimeError('Variable "totalAction" does not exist.', 52, $this->source); })()), "html", null, true);
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 53
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_progress_description(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", "progress_description"));

        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  1050 => 53,  1033 => 52,  1016 => 51,  999 => 47,  685 => 42,  668 => 41,  651 => 40,  634 => 36,  325 => 242,  321 => 241,  274 => 197,  264 => 190,  260 => 189,  254 => 186,  225 => 159,  215 => 158,  205 => 154,  203 => 84,  196 => 79,  194 => 71,  189 => 68,  187 => 60,  180 => 55,  178 => 47,  173 => 44,  171 => 36,  165 => 32,  158 => 28,  155 => 27,  149 => 24,  145 => 23,  142 => 22,  136 => 19,  132 => 18,  126 => 15,  122 => 14,  119 => 13,  117 => 12,  112 => 10,  108 => 8,  105 => 7,  95 => 6,  59 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/mesodd-layout.html.twig' %}

{% block page_title %}{% trans %}dashboard.title{% endtrans %} MesODD  {% if ministry %} - {{ministry.name}} {% endif %} {% if departement %} - {{departement.name}} {% endif %}  {% if commune %}  - {{commune.name}} {% endif %} {% endblock %}


{% block page_content %}
    {% if is_granted('ROLE_MANAGER') or is_granted('ROLE_DDD')  %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        {% if is_granted('ROLE_MANAGER') %}
                            <div class=\"col-sm-4\">
                                {{ form_label(form.type, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.type) }}
                            </div>
                            <div class=\"col-sm-8\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% else %}
                            <div class=\"col-sm-12\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% endif %}
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}
        
    <!-- Info boxes -->
    <div class=\"row\">
        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'info',
            'icon'  : 'fas fa-cog',
        }%}
            {% block box_text %}Programmes{% endblock %}
            {% block box_number %}{{ totalProgramm }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'danger',
            'icon'  : 'fas fa-thumbs-up',
        }%}
            {% block box_text %}Actions{% endblock %}
            {% block box_number %}{{ totalAction }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"clearfix hidden-md-up\"></div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'success',
            'icon'  : 'fas fa-shopping-cart',
        }%}
            {% block box_text %}Activités{% endblock %}
            {% block box_number %}{{ nbActivityTotal }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'warning',
            'icon'  : 'fas fa-users',
        }%}
            {% block box_text %}Montant{% endblock %}
            {% block box_number %}{{ amount|number_format(0, ',', ' ') }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>
    </div>

    <div class=\"row\">
        <div class=\"col-md-12\">
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_title %}
                <label class=\"col-sm-12 col-form-label\"><span style=\"color:red\">Sensibilité globale : {{global|number_format(2, ',', ' ')}} %</span></label>
            {% endblock %}
            {% block box_tools %}{% endblock %}
            {% block box_body %}
                <div class=\"row\">
                    <div class=\"col-md-8\">
                        <p class=\"text-center\">
                            <strong>Sensibilité par ODD</strong>
                        </p>
                        <div class=\"chart\">
                            <canvas id=\"barChart\" height=\"250\" style=\"height: 250px;\"></canvas>
                        </div>
                    </div>
                   
                    <div class=\"col-md-4\">
                        <p class=\"text-center\">
                            <strong>Natures d’activités</strong>
                        </p>
  
                        <div class=\"progress-group\">
                            Actions
                            <span class=\"float-right\"><b>{{ totalActionTreated }}</b>/{{ totalAction }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if totalAction %}{{ (totalActionTreated / totalAction) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>
  
                        <div class=\"progress-group\">
                            Activités
                            <span class=\"float-right\"><b>{{ nbActivityTreated }}</b>/{{ nbActivityTotal }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if nbActivityTotal %}{{ (nbActivityTreated / nbActivityTotal) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>

                        <!--div class=\"progress-group\">
                            <span class=\"progress-text\">Visit Premium Page</span>
                            <span class=\"float-right\"><b>480</b>/800</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 60%\"></div>
                            </div>
                        </div>

                        <div class=\"progress-group\">
                            Send Inquiries
                            <span class=\"float-right\"><b>250</b>/500</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 50%\"></div>
                            </div>
                        </div-->
                    </div>
                </div>
            {% endblock %}

            {% block box_footer %}
                <div class=\"row\">
                    {% for nature in natures %}
                    <div class=\"col-sm-3 col-6\">
                        <div class=\"description-block border-right\">
                            <span class=\"description-text\">{{ nature.name }}</span>
                            <h5 class=\"description-header\">{{ nature.amount|number_format(0, ',', ' ') }} F</h5>
                            <span class=\"description-percentage text-success\">{% if amount %} {{ (nature.amount / amount * 100)|number_format(2, ',', ' ') }}% {% endif %}</span>
                        </div>
                    </div>
                    {% endfor %}
                </div>
            {% endblock %}
        {% endembed %}
      
       
{% endblock %}

{% block javascripts %}

    <script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>


    <script>
        \$(function () {
            var barChartData = {
                labels: {{ barChart['labels']|json_encode()|raw }},
                datasets: [
                    {
                        backgroundColor     : {{ barChart['bgColor']|json_encode()|raw }},
                        borderColor         : {{ barChart['bgColor']|json_encode()|raw }},
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : {{ barChart['values']|json_encode()|raw }}
                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        color: 'white',
                        font: {
                            weight: 'bold',
                            size: 12,
                        },
                        align: 'start',
\t\t\t\t\t\tanchor: 'end'
                    }
                }
            }
        
            var barChart = new Chart(barChartCanvas, {
                type: 'bar', 
                data: barChartData,
                options: barChartOptions
            })
      
        })
    </script>

    <script src=\"{{ asset('plugins/chart.js/Chart.min.js') }}\"></script>
    <script src=\"{{ asset('plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js') }}\"></script>
    
{% endblock %}", "setting/mesodd_dashboard.html.twig", "C:\\Users\\dev29\\Documents\\code source mes odd\\httpdocs\\templates\\setting\\mesodd_dashboard.html.twig");
    }
}


/* setting/mesodd_dashboard.html.twig */
class __TwigTemplate_aa5220badc316192c4f674486466f063___1509576213 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_text' => [$this, 'block_box_text'],
            'box_number' => [$this, 'block_box_number'],
            'progress_description' => [$this, 'block_progress_description'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 60
        return "@AdminLTE/Widgets/infobox-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", "setting/mesodd_dashboard.html.twig"));

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

    }

    // line 64
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_text(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_text"));

        yield "Activités";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 65
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_number(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_number"));

        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["nbActivityTotal"]) || array_key_exists("nbActivityTotal", $context) ? $context["nbActivityTotal"] : (function () { throw new RuntimeError('Variable "nbActivityTotal" does not exist.', 65, $this->source); })()), "html", null, true);
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 66
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_progress_description(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", "progress_description"));

        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  1415 => 66,  1398 => 65,  1381 => 64,  1364 => 60,  1050 => 53,  1033 => 52,  1016 => 51,  999 => 47,  685 => 42,  668 => 41,  651 => 40,  634 => 36,  325 => 242,  321 => 241,  274 => 197,  264 => 190,  260 => 189,  254 => 186,  225 => 159,  215 => 158,  205 => 154,  203 => 84,  196 => 79,  194 => 71,  189 => 68,  187 => 60,  180 => 55,  178 => 47,  173 => 44,  171 => 36,  165 => 32,  158 => 28,  155 => 27,  149 => 24,  145 => 23,  142 => 22,  136 => 19,  132 => 18,  126 => 15,  122 => 14,  119 => 13,  117 => 12,  112 => 10,  108 => 8,  105 => 7,  95 => 6,  59 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/mesodd-layout.html.twig' %}

{% block page_title %}{% trans %}dashboard.title{% endtrans %} MesODD  {% if ministry %} - {{ministry.name}} {% endif %} {% if departement %} - {{departement.name}} {% endif %}  {% if commune %}  - {{commune.name}} {% endif %} {% endblock %}


{% block page_content %}
    {% if is_granted('ROLE_MANAGER') or is_granted('ROLE_DDD')  %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        {% if is_granted('ROLE_MANAGER') %}
                            <div class=\"col-sm-4\">
                                {{ form_label(form.type, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.type) }}
                            </div>
                            <div class=\"col-sm-8\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% else %}
                            <div class=\"col-sm-12\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% endif %}
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}
        
    <!-- Info boxes -->
    <div class=\"row\">
        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'info',
            'icon'  : 'fas fa-cog',
        }%}
            {% block box_text %}Programmes{% endblock %}
            {% block box_number %}{{ totalProgramm }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'danger',
            'icon'  : 'fas fa-thumbs-up',
        }%}
            {% block box_text %}Actions{% endblock %}
            {% block box_number %}{{ totalAction }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"clearfix hidden-md-up\"></div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'success',
            'icon'  : 'fas fa-shopping-cart',
        }%}
            {% block box_text %}Activités{% endblock %}
            {% block box_number %}{{ nbActivityTotal }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'warning',
            'icon'  : 'fas fa-users',
        }%}
            {% block box_text %}Montant{% endblock %}
            {% block box_number %}{{ amount|number_format(0, ',', ' ') }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>
    </div>

    <div class=\"row\">
        <div class=\"col-md-12\">
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_title %}
                <label class=\"col-sm-12 col-form-label\"><span style=\"color:red\">Sensibilité globale : {{global|number_format(2, ',', ' ')}} %</span></label>
            {% endblock %}
            {% block box_tools %}{% endblock %}
            {% block box_body %}
                <div class=\"row\">
                    <div class=\"col-md-8\">
                        <p class=\"text-center\">
                            <strong>Sensibilité par ODD</strong>
                        </p>
                        <div class=\"chart\">
                            <canvas id=\"barChart\" height=\"250\" style=\"height: 250px;\"></canvas>
                        </div>
                    </div>
                   
                    <div class=\"col-md-4\">
                        <p class=\"text-center\">
                            <strong>Natures d’activités</strong>
                        </p>
  
                        <div class=\"progress-group\">
                            Actions
                            <span class=\"float-right\"><b>{{ totalActionTreated }}</b>/{{ totalAction }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if totalAction %}{{ (totalActionTreated / totalAction) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>
  
                        <div class=\"progress-group\">
                            Activités
                            <span class=\"float-right\"><b>{{ nbActivityTreated }}</b>/{{ nbActivityTotal }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if nbActivityTotal %}{{ (nbActivityTreated / nbActivityTotal) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>

                        <!--div class=\"progress-group\">
                            <span class=\"progress-text\">Visit Premium Page</span>
                            <span class=\"float-right\"><b>480</b>/800</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 60%\"></div>
                            </div>
                        </div>

                        <div class=\"progress-group\">
                            Send Inquiries
                            <span class=\"float-right\"><b>250</b>/500</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 50%\"></div>
                            </div>
                        </div-->
                    </div>
                </div>
            {% endblock %}

            {% block box_footer %}
                <div class=\"row\">
                    {% for nature in natures %}
                    <div class=\"col-sm-3 col-6\">
                        <div class=\"description-block border-right\">
                            <span class=\"description-text\">{{ nature.name }}</span>
                            <h5 class=\"description-header\">{{ nature.amount|number_format(0, ',', ' ') }} F</h5>
                            <span class=\"description-percentage text-success\">{% if amount %} {{ (nature.amount / amount * 100)|number_format(2, ',', ' ') }}% {% endif %}</span>
                        </div>
                    </div>
                    {% endfor %}
                </div>
            {% endblock %}
        {% endembed %}
      
       
{% endblock %}

{% block javascripts %}

    <script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>


    <script>
        \$(function () {
            var barChartData = {
                labels: {{ barChart['labels']|json_encode()|raw }},
                datasets: [
                    {
                        backgroundColor     : {{ barChart['bgColor']|json_encode()|raw }},
                        borderColor         : {{ barChart['bgColor']|json_encode()|raw }},
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : {{ barChart['values']|json_encode()|raw }}
                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        color: 'white',
                        font: {
                            weight: 'bold',
                            size: 12,
                        },
                        align: 'start',
\t\t\t\t\t\tanchor: 'end'
                    }
                }
            }
        
            var barChart = new Chart(barChartCanvas, {
                type: 'bar', 
                data: barChartData,
                options: barChartOptions
            })
      
        })
    </script>

    <script src=\"{{ asset('plugins/chart.js/Chart.min.js') }}\"></script>
    <script src=\"{{ asset('plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js') }}\"></script>
    
{% endblock %}", "setting/mesodd_dashboard.html.twig", "C:\\Users\\dev29\\Documents\\code source mes odd\\httpdocs\\templates\\setting\\mesodd_dashboard.html.twig");
    }
}


/* setting/mesodd_dashboard.html.twig */
class __TwigTemplate_aa5220badc316192c4f674486466f063___1854172944 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_text' => [$this, 'block_box_text'],
            'box_number' => [$this, 'block_box_number'],
            'progress_description' => [$this, 'block_progress_description'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 71
        return "@AdminLTE/Widgets/infobox-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", "setting/mesodd_dashboard.html.twig"));

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

    }

    // line 75
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_text(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_text"));

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

        yield from [];
    }

    // line 76
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_number(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_number"));

        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((isset($context["amount"]) || array_key_exists("amount", $context) ? $context["amount"] : (function () { throw new RuntimeError('Variable "amount" does not exist.', 76, $this->source); })()), 0, ",", " "), "html", null, true);
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 77
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_progress_description(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", "progress_description"));

        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  1780 => 77,  1763 => 76,  1746 => 75,  1729 => 71,  1415 => 66,  1398 => 65,  1381 => 64,  1364 => 60,  1050 => 53,  1033 => 52,  1016 => 51,  999 => 47,  685 => 42,  668 => 41,  651 => 40,  634 => 36,  325 => 242,  321 => 241,  274 => 197,  264 => 190,  260 => 189,  254 => 186,  225 => 159,  215 => 158,  205 => 154,  203 => 84,  196 => 79,  194 => 71,  189 => 68,  187 => 60,  180 => 55,  178 => 47,  173 => 44,  171 => 36,  165 => 32,  158 => 28,  155 => 27,  149 => 24,  145 => 23,  142 => 22,  136 => 19,  132 => 18,  126 => 15,  122 => 14,  119 => 13,  117 => 12,  112 => 10,  108 => 8,  105 => 7,  95 => 6,  59 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/mesodd-layout.html.twig' %}

{% block page_title %}{% trans %}dashboard.title{% endtrans %} MesODD  {% if ministry %} - {{ministry.name}} {% endif %} {% if departement %} - {{departement.name}} {% endif %}  {% if commune %}  - {{commune.name}} {% endif %} {% endblock %}


{% block page_content %}
    {% if is_granted('ROLE_MANAGER') or is_granted('ROLE_DDD')  %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        {% if is_granted('ROLE_MANAGER') %}
                            <div class=\"col-sm-4\">
                                {{ form_label(form.type, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.type) }}
                            </div>
                            <div class=\"col-sm-8\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% else %}
                            <div class=\"col-sm-12\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% endif %}
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}
        
    <!-- Info boxes -->
    <div class=\"row\">
        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'info',
            'icon'  : 'fas fa-cog',
        }%}
            {% block box_text %}Programmes{% endblock %}
            {% block box_number %}{{ totalProgramm }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'danger',
            'icon'  : 'fas fa-thumbs-up',
        }%}
            {% block box_text %}Actions{% endblock %}
            {% block box_number %}{{ totalAction }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"clearfix hidden-md-up\"></div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'success',
            'icon'  : 'fas fa-shopping-cart',
        }%}
            {% block box_text %}Activités{% endblock %}
            {% block box_number %}{{ nbActivityTotal }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'warning',
            'icon'  : 'fas fa-users',
        }%}
            {% block box_text %}Montant{% endblock %}
            {% block box_number %}{{ amount|number_format(0, ',', ' ') }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>
    </div>

    <div class=\"row\">
        <div class=\"col-md-12\">
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_title %}
                <label class=\"col-sm-12 col-form-label\"><span style=\"color:red\">Sensibilité globale : {{global|number_format(2, ',', ' ')}} %</span></label>
            {% endblock %}
            {% block box_tools %}{% endblock %}
            {% block box_body %}
                <div class=\"row\">
                    <div class=\"col-md-8\">
                        <p class=\"text-center\">
                            <strong>Sensibilité par ODD</strong>
                        </p>
                        <div class=\"chart\">
                            <canvas id=\"barChart\" height=\"250\" style=\"height: 250px;\"></canvas>
                        </div>
                    </div>
                   
                    <div class=\"col-md-4\">
                        <p class=\"text-center\">
                            <strong>Natures d’activités</strong>
                        </p>
  
                        <div class=\"progress-group\">
                            Actions
                            <span class=\"float-right\"><b>{{ totalActionTreated }}</b>/{{ totalAction }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if totalAction %}{{ (totalActionTreated / totalAction) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>
  
                        <div class=\"progress-group\">
                            Activités
                            <span class=\"float-right\"><b>{{ nbActivityTreated }}</b>/{{ nbActivityTotal }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if nbActivityTotal %}{{ (nbActivityTreated / nbActivityTotal) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>

                        <!--div class=\"progress-group\">
                            <span class=\"progress-text\">Visit Premium Page</span>
                            <span class=\"float-right\"><b>480</b>/800</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 60%\"></div>
                            </div>
                        </div>

                        <div class=\"progress-group\">
                            Send Inquiries
                            <span class=\"float-right\"><b>250</b>/500</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 50%\"></div>
                            </div>
                        </div-->
                    </div>
                </div>
            {% endblock %}

            {% block box_footer %}
                <div class=\"row\">
                    {% for nature in natures %}
                    <div class=\"col-sm-3 col-6\">
                        <div class=\"description-block border-right\">
                            <span class=\"description-text\">{{ nature.name }}</span>
                            <h5 class=\"description-header\">{{ nature.amount|number_format(0, ',', ' ') }} F</h5>
                            <span class=\"description-percentage text-success\">{% if amount %} {{ (nature.amount / amount * 100)|number_format(2, ',', ' ') }}% {% endif %}</span>
                        </div>
                    </div>
                    {% endfor %}
                </div>
            {% endblock %}
        {% endembed %}
      
       
{% endblock %}

{% block javascripts %}

    <script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>


    <script>
        \$(function () {
            var barChartData = {
                labels: {{ barChart['labels']|json_encode()|raw }},
                datasets: [
                    {
                        backgroundColor     : {{ barChart['bgColor']|json_encode()|raw }},
                        borderColor         : {{ barChart['bgColor']|json_encode()|raw }},
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : {{ barChart['values']|json_encode()|raw }}
                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        color: 'white',
                        font: {
                            weight: 'bold',
                            size: 12,
                        },
                        align: 'start',
\t\t\t\t\t\tanchor: 'end'
                    }
                }
            }
        
            var barChart = new Chart(barChartCanvas, {
                type: 'bar', 
                data: barChartData,
                options: barChartOptions
            })
      
        })
    </script>

    <script src=\"{{ asset('plugins/chart.js/Chart.min.js') }}\"></script>
    <script src=\"{{ asset('plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js') }}\"></script>
    
{% endblock %}", "setting/mesodd_dashboard.html.twig", "C:\\Users\\dev29\\Documents\\code source mes odd\\httpdocs\\templates\\setting\\mesodd_dashboard.html.twig");
    }
}


/* setting/mesodd_dashboard.html.twig */
class __TwigTemplate_aa5220badc316192c4f674486466f063___1820404360 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_title' => [$this, 'block_box_title'],
            'box_tools' => [$this, 'block_box_tools'],
            'box_body' => [$this, 'block_box_body'],
            'box_footer' => [$this, 'block_box_footer'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 84
        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", "setting/mesodd_dashboard.html.twig"));

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

    }

    // line 85
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_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", "box_title"));

        // line 86
        yield "                <label class=\"col-sm-12 col-form-label\"><span style=\"color:red\">Sensibilité globale : ";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 86, $this->source); })()), 2, ",", " "), "html", null, true);
        yield " %</span></label>
            ";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 88
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_tools(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_tools"));

        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 89
    /**
     * @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 90
        yield "                <div class=\"row\">
                    <div class=\"col-md-8\">
                        <p class=\"text-center\">
                            <strong>Sensibilité par ODD</strong>
                        </p>
                        <div class=\"chart\">
                            <canvas id=\"barChart\" height=\"250\" style=\"height: 250px;\"></canvas>
                        </div>
                    </div>
                   
                    <div class=\"col-md-4\">
                        <p class=\"text-center\">
                            <strong>Natures d’activités</strong>
                        </p>
  
                        <div class=\"progress-group\">
                            Actions
                            <span class=\"float-right\"><b>";
        // line 107
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["totalActionTreated"]) || array_key_exists("totalActionTreated", $context) ? $context["totalActionTreated"] : (function () { throw new RuntimeError('Variable "totalActionTreated" does not exist.', 107, $this->source); })()), "html", null, true);
        yield "</b>/";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["totalAction"]) || array_key_exists("totalAction", $context) ? $context["totalAction"] : (function () { throw new RuntimeError('Variable "totalAction" does not exist.', 107, $this->source); })()), "html", null, true);
        yield "</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: ";
        // line 109
        if ((($tmp = (isset($context["totalAction"]) || array_key_exists("totalAction", $context) ? $context["totalAction"] : (function () { throw new RuntimeError('Variable "totalAction" does not exist.', 109, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((((isset($context["totalActionTreated"]) || array_key_exists("totalActionTreated", $context) ? $context["totalActionTreated"] : (function () { throw new RuntimeError('Variable "totalActionTreated" does not exist.', 109, $this->source); })()) / (isset($context["totalAction"]) || array_key_exists("totalAction", $context) ? $context["totalAction"] : (function () { throw new RuntimeError('Variable "totalAction" does not exist.', 109, $this->source); })())) * 100), "html", null, true);
        }
        yield "%\"></div>
                            </div>
                        </div>
  
                        <div class=\"progress-group\">
                            Activités
                            <span class=\"float-right\"><b>";
        // line 115
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["nbActivityTreated"]) || array_key_exists("nbActivityTreated", $context) ? $context["nbActivityTreated"] : (function () { throw new RuntimeError('Variable "nbActivityTreated" does not exist.', 115, $this->source); })()), "html", null, true);
        yield "</b>/";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["nbActivityTotal"]) || array_key_exists("nbActivityTotal", $context) ? $context["nbActivityTotal"] : (function () { throw new RuntimeError('Variable "nbActivityTotal" does not exist.', 115, $this->source); })()), "html", null, true);
        yield "</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: ";
        // line 117
        if ((($tmp = (isset($context["nbActivityTotal"]) || array_key_exists("nbActivityTotal", $context) ? $context["nbActivityTotal"] : (function () { throw new RuntimeError('Variable "nbActivityTotal" does not exist.', 117, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((((isset($context["nbActivityTreated"]) || array_key_exists("nbActivityTreated", $context) ? $context["nbActivityTreated"] : (function () { throw new RuntimeError('Variable "nbActivityTreated" does not exist.', 117, $this->source); })()) / (isset($context["nbActivityTotal"]) || array_key_exists("nbActivityTotal", $context) ? $context["nbActivityTotal"] : (function () { throw new RuntimeError('Variable "nbActivityTotal" does not exist.', 117, $this->source); })())) * 100), "html", null, true);
        }
        yield "%\"></div>
                            </div>
                        </div>

                        <!--div class=\"progress-group\">
                            <span class=\"progress-text\">Visit Premium Page</span>
                            <span class=\"float-right\"><b>480</b>/800</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 60%\"></div>
                            </div>
                        </div>

                        <div class=\"progress-group\">
                            Send Inquiries
                            <span class=\"float-right\"><b>250</b>/500</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 50%\"></div>
                            </div>
                        </div-->
                    </div>
                </div>
            ";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 140
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_footer(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_footer"));

        // line 141
        yield "                <div class=\"row\">
                    ";
        // line 142
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable((isset($context["natures"]) || array_key_exists("natures", $context) ? $context["natures"] : (function () { throw new RuntimeError('Variable "natures" does not exist.', 142, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["nature"]) {
            // line 143
            yield "                    <div class=\"col-sm-3 col-6\">
                        <div class=\"description-block border-right\">
                            <span class=\"description-text\">";
            // line 145
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["nature"], "name", [], "any", false, false, false, 145), "html", null, true);
            yield "</span>
                            <h5 class=\"description-header\">";
            // line 146
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, $context["nature"], "amount", [], "any", false, false, false, 146), 0, ",", " "), "html", null, true);
            yield " F</h5>
                            <span class=\"description-percentage text-success\">";
            // line 147
            if ((($tmp = (isset($context["amount"]) || array_key_exists("amount", $context) ? $context["amount"] : (function () { throw new RuntimeError('Variable "amount" does not exist.', 147, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                yield " ";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(((CoreExtension::getAttribute($this->env, $this->source, $context["nature"], "amount", [], "any", false, false, false, 147) / (isset($context["amount"]) || array_key_exists("amount", $context) ? $context["amount"] : (function () { throw new RuntimeError('Variable "amount" does not exist.', 147, $this->source); })())) * 100), 2, ",", " "), "html", null, true);
                yield "% ";
            }
            yield "</span>
                        </div>
                    </div>
                    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['nature'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 151
        yield "                </div>
            ";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  2278 => 151,  2264 => 147,  2260 => 146,  2256 => 145,  2252 => 143,  2248 => 142,  2245 => 141,  2235 => 140,  2203 => 117,  2196 => 115,  2185 => 109,  2178 => 107,  2159 => 90,  2149 => 89,  2133 => 88,  2122 => 86,  2112 => 85,  2095 => 84,  1780 => 77,  1763 => 76,  1746 => 75,  1729 => 71,  1415 => 66,  1398 => 65,  1381 => 64,  1364 => 60,  1050 => 53,  1033 => 52,  1016 => 51,  999 => 47,  685 => 42,  668 => 41,  651 => 40,  634 => 36,  325 => 242,  321 => 241,  274 => 197,  264 => 190,  260 => 189,  254 => 186,  225 => 159,  215 => 158,  205 => 154,  203 => 84,  196 => 79,  194 => 71,  189 => 68,  187 => 60,  180 => 55,  178 => 47,  173 => 44,  171 => 36,  165 => 32,  158 => 28,  155 => 27,  149 => 24,  145 => 23,  142 => 22,  136 => 19,  132 => 18,  126 => 15,  122 => 14,  119 => 13,  117 => 12,  112 => 10,  108 => 8,  105 => 7,  95 => 6,  59 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/mesodd-layout.html.twig' %}

{% block page_title %}{% trans %}dashboard.title{% endtrans %} MesODD  {% if ministry %} - {{ministry.name}} {% endif %} {% if departement %} - {{departement.name}} {% endif %}  {% if commune %}  - {{commune.name}} {% endif %} {% endblock %}


{% block page_content %}
    {% if is_granted('ROLE_MANAGER') or is_granted('ROLE_DDD')  %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        {% if is_granted('ROLE_MANAGER') %}
                            <div class=\"col-sm-4\">
                                {{ form_label(form.type, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.type) }}
                            </div>
                            <div class=\"col-sm-8\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% else %}
                            <div class=\"col-sm-12\">
                                {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                                {{ form_widget(form.entite) }}
                            </div>
                        {% endif %}
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}
        
    <!-- Info boxes -->
    <div class=\"row\">
        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'info',
            'icon'  : 'fas fa-cog',
        }%}
            {% block box_text %}Programmes{% endblock %}
            {% block box_number %}{{ totalProgramm }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'danger',
            'icon'  : 'fas fa-thumbs-up',
        }%}
            {% block box_text %}Actions{% endblock %}
            {% block box_number %}{{ totalAction }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"clearfix hidden-md-up\"></div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'success',
            'icon'  : 'fas fa-shopping-cart',
        }%}
            {% block box_text %}Activités{% endblock %}
            {% block box_number %}{{ nbActivityTotal }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>

        <div class=\"col-12 col-sm-6 col-md-3\">
        {% embed '@AdminLTE/Widgets/infobox-widget.html.twig'  with {
            'color' : 'warning',
            'icon'  : 'fas fa-users',
        }%}
            {% block box_text %}Montant{% endblock %}
            {% block box_number %}{{ amount|number_format(0, ',', ' ') }}{% endblock %}
            {% block progress_description %}{% endblock %}
        {% endembed %}
        </div>
    </div>

    <div class=\"row\">
        <div class=\"col-md-12\">
        {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
            {% block box_title %}
                <label class=\"col-sm-12 col-form-label\"><span style=\"color:red\">Sensibilité globale : {{global|number_format(2, ',', ' ')}} %</span></label>
            {% endblock %}
            {% block box_tools %}{% endblock %}
            {% block box_body %}
                <div class=\"row\">
                    <div class=\"col-md-8\">
                        <p class=\"text-center\">
                            <strong>Sensibilité par ODD</strong>
                        </p>
                        <div class=\"chart\">
                            <canvas id=\"barChart\" height=\"250\" style=\"height: 250px;\"></canvas>
                        </div>
                    </div>
                   
                    <div class=\"col-md-4\">
                        <p class=\"text-center\">
                            <strong>Natures d’activités</strong>
                        </p>
  
                        <div class=\"progress-group\">
                            Actions
                            <span class=\"float-right\"><b>{{ totalActionTreated }}</b>/{{ totalAction }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if totalAction %}{{ (totalActionTreated / totalAction) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>
  
                        <div class=\"progress-group\">
                            Activités
                            <span class=\"float-right\"><b>{{ nbActivityTreated }}</b>/{{ nbActivityTotal }}</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: {% if nbActivityTotal %}{{ (nbActivityTreated / nbActivityTotal) * 100 }}{% endif %}%\"></div>
                            </div>
                        </div>

                        <!--div class=\"progress-group\">
                            <span class=\"progress-text\">Visit Premium Page</span>
                            <span class=\"float-right\"><b>480</b>/800</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 60%\"></div>
                            </div>
                        </div>

                        <div class=\"progress-group\">
                            Send Inquiries
                            <span class=\"float-right\"><b>250</b>/500</span>
                            <div class=\"progress\">
                                <div class=\"progress-bar bg-secondary\" style=\"width: 50%\"></div>
                            </div>
                        </div-->
                    </div>
                </div>
            {% endblock %}

            {% block box_footer %}
                <div class=\"row\">
                    {% for nature in natures %}
                    <div class=\"col-sm-3 col-6\">
                        <div class=\"description-block border-right\">
                            <span class=\"description-text\">{{ nature.name }}</span>
                            <h5 class=\"description-header\">{{ nature.amount|number_format(0, ',', ' ') }} F</h5>
                            <span class=\"description-percentage text-success\">{% if amount %} {{ (nature.amount / amount * 100)|number_format(2, ',', ' ') }}% {% endif %}</span>
                        </div>
                    </div>
                    {% endfor %}
                </div>
            {% endblock %}
        {% endembed %}
      
       
{% endblock %}

{% block javascripts %}

    <script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>


    <script>
        \$(function () {
            var barChartData = {
                labels: {{ barChart['labels']|json_encode()|raw }},
                datasets: [
                    {
                        backgroundColor     : {{ barChart['bgColor']|json_encode()|raw }},
                        borderColor         : {{ barChart['bgColor']|json_encode()|raw }},
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : {{ barChart['values']|json_encode()|raw }}
                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        color: 'white',
                        font: {
                            weight: 'bold',
                            size: 12,
                        },
                        align: 'start',
\t\t\t\t\t\tanchor: 'end'
                    }
                }
            }
        
            var barChart = new Chart(barChartCanvas, {
                type: 'bar', 
                data: barChartData,
                options: barChartOptions
            })
      
        })
    </script>

    <script src=\"{{ asset('plugins/chart.js/Chart.min.js') }}\"></script>
    <script src=\"{{ asset('plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js') }}\"></script>
    
{% endblock %}", "setting/mesodd_dashboard.html.twig", "C:\\Users\\dev29\\Documents\\code source mes odd\\httpdocs\\templates\\setting\\mesodd_dashboard.html.twig");
    }
}
