var/cache/dev/twig/9d/9d4f4e7939107f41699f6181440ff1ba.php line 56

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* @EasyAdmin/dashboard.html.twig */
  16. class __TwigTemplate_310aaf0fb38c9d04dc87a860e29d7766 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'page_title' => [$this'block_page_title'],
  29.             'content_title' => [$this'block_content_title'],
  30.             'main' => [$this'block_main'],
  31.             'body_custom_javascript' => [$this'block_body_custom_javascript'],
  32.         ];
  33.     }
  34.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  35.     {
  36.         // line 1
  37.         return "@EasyAdmin/page/content.html.twig";
  38.     }
  39.     protected function doDisplay(array $context, array $blocks = []): iterable
  40.     {
  41.         $macros $this->macros;
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@EasyAdmin/dashboard.html.twig"));
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@EasyAdmin/dashboard.html.twig"));
  46.         $this->parent $this->loadTemplate("@EasyAdmin/page/content.html.twig""@EasyAdmin/dashboard.html.twig"1);
  47.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  48.         
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  50.         
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  52.     }
  53.     // line 3
  54.     /**
  55.      * @return iterable<null|scalar|\Stringable>
  56.      */
  57.     public function block_page_title(array $context, array $blocks = []): iterable
  58.     {
  59.         $macros $this->macros;
  60.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  61.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_title"));
  62.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_title"));
  64.         // line 4
  65.         yield "Dashboard ";
  66.         
  67.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  68.         
  69.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  70.         yield from [];
  71.     }
  72.     // line 7
  73.     /**
  74.      * @return iterable<null|scalar|\Stringable>
  75.      */
  76.     public function block_content_title(array $context, array $blocks = []): iterable
  77.     {
  78.         $macros $this->macros;
  79.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  80.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content_title"));
  81.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  82.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content_title"));
  83.         yield "<h1 class=\"title\">";
  84.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["ea"]) || array_key_exists("ea"$context) ? $context["ea"] : (function () { throw new RuntimeError('Variable "ea" does not exist.'7$this->source); })()), "dashboardTitle", [], "any"falsefalsefalse7), "html"nulltrue);
  85.         yield "</h1>";
  86.         
  87.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  88.         
  89.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  90.         yield from [];
  91.     }
  92.     // line 9
  93.     /**
  94.      * @return iterable<null|scalar|\Stringable>
  95.      */
  96.     public function block_main(array $context, array $blocks = []): iterable
  97.     {
  98.         $macros $this->macros;
  99.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  100.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  101.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  102.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  103.         // line 10
  104.         yield "  <div class=\"form-panel-header \">
  105.     <div class=\"form-panel-title\">
  106.       <a href=\"#\" class=\"not-collapsible\">
  107.         <i class=\"form-panel-icon fa fa-exclamation-circle\"></i>
  108.         <em>Pedidos no entregados a la sucursal</em>
  109.       </a>
  110.     </div>
  111.   </div>
  112.   <table class=\"table datagrid with-rounded-top\" id=\"xmlSinEntregar\">
  113.     <tbody>
  114.         ";
  115.         // line 21
  116.         if ((isset($context["cabs"]) || array_key_exists("cabs"$context) ? $context["cabs"] : (function () { throw new RuntimeError('Variable "cabs" does not exist.'21$this->source); })())) {
  117.             // line 22
  118.             yield "          ";
  119.             $context['_parent'] = $context;
  120.             $context['_seq'] = CoreExtension::ensureTraversable((isset($context["cabs"]) || array_key_exists("cabs"$context) ? $context["cabs"] : (function () { throw new RuntimeError('Variable "cabs" does not exist.'22$this->source); })()));
  121.             foreach ($context['_seq'] as $context["_key"] => $context["cab"]) {
  122.                 // line 23
  123.                 yield "              ";
  124.                 $context["url"] = CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$this->extensions['EasyCorp\Bundle\EasyAdminBundle\Twig\EasyAdminTwigExtension']->getAdminUrlGenerator(), "setController", ["App\\Controller\\Admin\\CabeceraCrudController"], "method"falsefalsefalse23), "setAction", ["detail"], "method"falsefalsefalse24), "setEntityId", [CoreExtension::getAttribute($this->env$this->source,                 // line 26
  125. $context["cab"], "id", [], "any"falsefalsefalse26)], "method"falsefalsefalse25);
  126.                 // line 28
  127.                 yield "              <tr>
  128.                   <td><i class=\"fa fa-map\"></i> ";
  129.                 // line 29
  130.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cab"], "sucursal", [], "any"falsefalsefalse29), "html"nulltrue);
  131.                 yield "</td>
  132.                   <td>";
  133.                 // line 30
  134.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cab"], "nombrecliente", [], "any"falsefalsefalse30), "html"nulltrue);
  135.                 yield "</td>
  136.                   <td>";
  137.                 // line 31
  138.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env$this->source$context["cab"], "updatedAt", [], "any"falsefalsefalse31), "d/m/Y H:i:s"), "html"nulltrue);
  139.                 yield "</td>
  140.                   <td>";
  141.                 // line 32
  142.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cab"], "filename", [], "any"falsefalsefalse32), "html"nulltrue);
  143.                 yield "</td>
  144.                   <td><a href=\"";
  145.                 // line 33
  146.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["url"]) || array_key_exists("url"$context) ? $context["url"] : (function () { throw new RuntimeError('Variable "url" does not exist.'33$this->source); })()), "html"nulltrue);
  147.                 yield "\">ver</a>
  148.               </tr>
  149.           ";
  150.             }
  151.             $_parent $context['_parent'];
  152.             unset($context['_seq'], $context['_key'], $context['cab'], $context['_parent']);
  153.             $context array_intersect_key($context$_parent) + $_parent;
  154.             // line 36
  155.             yield "        ";
  156.         } else {
  157.             // line 37
  158.             yield "          ";
  159.             // line 70
  160.             yield "        ";
  161.         }
  162.         // line 71
  163.         yield "    </tbody>
  164.   </table>
  165.   ";
  166.         // line 74
  167.         yield "  <div class=\"form-panel-header \">
  168.     <div class=\"form-panel-title\">
  169.       <a href=\"#\" class=\"not-collapsible\">
  170.         <i class=\"form-panel-icon fa fa-truck\"></i>
  171.         <em>Estado de las sucursales (según capacidad)</em>
  172.       </a>
  173.     </div>
  174.   </div>
  175.   <table class=\"datagrid\">
  176.     <thead>
  177.         <tr>
  178.             <th><span><strong>Sucursal</strong></span></th>
  179.             <th><span><strong># en preparación (Callcenter)</strong></span></th>
  180.             <th><span><strong># en preparación (Ecommerce)</strong></span></th>
  181.             <th><span><strong># pedidos en reparto</strong></span></th>
  182.             <th><span><strong># TOTAL PEDIDOS</strong></span></th>
  183.             <th><span><strong># max de pedidos en reparto</strong></span></th>
  184.         </tr>
  185.     </thead>
  186.     <tbody>
  187.       ";
  188.         // line 94
  189.         $context['_parent'] = $context;
  190.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["resultadosConsolidados"]) || array_key_exists("resultadosConsolidados"$context) ? $context["resultadosConsolidados"] : (function () { throw new RuntimeError('Variable "resultadosConsolidados" does not exist.'94$this->source); })()));
  191.         foreach ($context['_seq'] as $context["nombreSucursal"] => $context["datosSucursal"]) {
  192.             // line 95
  193.             yield "        <tr>
  194.           <td clasS=\"text-left\">";
  195.             // line 96
  196.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["nombreSucursal"], "html"nulltrue);
  197.             yield "</td>
  198.           <td class=\"text-center\">
  199.             ";
  200.             // line 98
  201.             if (CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "detalles", [], "any"falsetruefalse98), "callcenter", [], "any"truetruefalse98)) {
  202.                 // line 99
  203.                 yield "                ";
  204.                 $context['_parent'] = $context;
  205.                 $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "detalles", [], "any"falsefalsefalse99), "callcenter", [], "any"falsefalsefalse99));
  206.                 foreach ($context['_seq'] as $context["_key"] => $context["detalle"]) {
  207.                     // line 100
  208.                     yield "                    ";
  209.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["detalle"], "preparacion", [], "any"falsefalsefalse100), "html"nulltrue);
  210.                     yield "
  211.                 ";
  212.                 }
  213.                 $_parent $context['_parent'];
  214.                 unset($context['_seq'], $context['_key'], $context['detalle'], $context['_parent']);
  215.                 $context array_intersect_key($context$_parent) + $_parent;
  216.                 // line 102
  217.                 yield "            ";
  218.             } else {
  219.                 // line 103
  220.                 yield "                Sin datos
  221.             ";
  222.             }
  223.             // line 105
  224.             yield "          </td>
  225.           <td class=\"text-center\">
  226.             ";
  227.             // line 107
  228.             if (CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "detalles", [], "any"falsetruefalse107), "ecommerce", [], "any"truetruefalse107)) {
  229.                 // line 108
  230.                 yield "                ";
  231.                 $context['_parent'] = $context;
  232.                 $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "detalles", [], "any"falsefalsefalse108), "ecommerce", [], "any"falsefalsefalse108));
  233.                 foreach ($context['_seq'] as $context["_key"] => $context["detalle"]) {
  234.                     // line 109
  235.                     yield "                    ";
  236.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["detalle"], "preparacion", [], "any"falsefalsefalse109), "html"nulltrue);
  237.                     yield "
  238.                 ";
  239.                 }
  240.                 $_parent $context['_parent'];
  241.                 unset($context['_seq'], $context['_key'], $context['detalle'], $context['_parent']);
  242.                 $context array_intersect_key($context$_parent) + $_parent;
  243.                 // line 111
  244.                 yield "            ";
  245.             } else {
  246.                 // line 112
  247.                 yield "                Sin datos
  248.             ";
  249.             }
  250.             // line 114
  251.             yield "          </td>
  252.           <td clasS=\"text-center\">
  253.             ";
  254.             // line 116
  255.             $context["porcentaje"] = ((70 CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "sucursal", [], "any"falsefalsefalse116), "getOrderCapacity", [], "any"falsefalsefalse116)) / 100);
  256.             // line 117
  257.             yield "            ";
  258.             if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "total", [], "any"falsefalsefalse117), "reparto", [], "any"falsefalsefalse117) < Twig\Extension\CoreExtension::round((isset($context["porcentaje"]) || array_key_exists("porcentaje"$context) ? $context["porcentaje"] : (function () { throw new RuntimeError('Variable "porcentaje" does not exist.'117$this->source); })())))) {
  259.                 // line 118
  260.                 yield "              ";
  261.                 $context["class"] = "badge-success";
  262.                 // line 119
  263.                 yield "            ";
  264.             } elseif (((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "total", [], "any"falsefalsefalse119), "reparto", [], "any"falsefalsefalse119) >= Twig\Extension\CoreExtension::round((isset($context["porcentaje"]) || array_key_exists("porcentaje"$context) ? $context["porcentaje"] : (function () { throw new RuntimeError('Variable "porcentaje" does not exist.'119$this->source); })()))) && (CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "total", [], "any"falsefalsefalse119), "reparto", [], "any"falsefalsefalse119) < CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "sucursal", [], "any"falsefalsefalse119), "getOrderCapacity", [], "any"falsefalsefalse119)))) {
  265.                 // line 120
  266.                 yield "              ";
  267.                 $context["class"] = "badge-warning";
  268.                 // line 121
  269.                 yield "            ";
  270.             } else {
  271.                 // line 122
  272.                 yield "              ";
  273.                 $context["class"] = "badge-danger";
  274.                 // line 123
  275.                 yield "            ";
  276.             }
  277.             // line 124
  278.             yield "            <span class=\"badge badge-pill ";
  279.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["class"]) || array_key_exists("class"$context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.'124$this->source); })()), "html"nulltrue);
  280.             yield "\"><strong>";
  281.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "total", [], "any"falsefalsefalse124), "reparto", [], "any"falsefalsefalse124), "html"nulltrue);
  282.             yield "</strong></span>
  283.           </td>
  284.           <td clasS=\"text-center\">";
  285.             // line 126
  286.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "total", [], "any"falsefalsefalse126), "preparacion", [], "any"falsefalsefalse126) + CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "total", [], "any"falsefalsefalse126), "reparto", [], "any"falsefalsefalse126)), "html"nulltrue);
  287.             yield "</td>
  288.           <td clasS=\"text-center\">";
  289.             // line 127
  290.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["datosSucursal"], "sucursal", [], "any"falsefalsefalse127), "getOrderCapacity", [], "any"falsefalsefalse127), "html"nulltrue);
  291.             yield "</td>
  292.           ";
  293.             // line 129
  294.             yield "          ";
  295.             // line 140
  296.             yield "          ";
  297.             // line 142
  298.             yield "        </tr>
  299.       ";
  300.         }
  301.         $_parent $context['_parent'];
  302.         unset($context['_seq'], $context['nombreSucursal'], $context['datosSucursal'], $context['_parent']);
  303.         $context array_intersect_key($context$_parent) + $_parent;
  304.         // line 144
  305.         yield "
  306.     </tbody>
  307.     <tfoot></tfoot>
  308.   </table>
  309.   ";
  310.         // line 154
  311.         yield "
  312.   ";
  313.         // line 155
  314.         yield from $this->unwrap()->yieldBlock('body_custom_javascript'$context$blocks);
  315.         
  316.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  317.         
  318.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  319.         yield from [];
  320.     }
  321.     /**
  322.      * @return iterable<null|scalar|\Stringable>
  323.      */
  324.     public function block_body_custom_javascript(array $context, array $blocks = []): iterable
  325.     {
  326.         $macros $this->macros;
  327.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  328.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body_custom_javascript"));
  329.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  330.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body_custom_javascript"));
  331.         // line 156
  332.         yield " <script>
  333.     var notification = new Audio('";
  334.         // line 157
  335.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("sounds/Notification.mp3"), "html"nulltrue);
  336.         yield "');
  337.     function xmlSinEntregar() {
  338.       var tbl = document.getElementById(\"xmlSinEntregar\");
  339.       if (tbl.rows.length == 0) {
  340.         // console.log('No hay pedidos');
  341.       } else {
  342.         // console.log('La tabla tiene ' + tbl.rows.length + ' Pedido(s) sin entregar');
  343.         notification.play();
  344.       }
  345.       alertaXmlSinEntregar();
  346.     }
  347.     function alertaXmlSinEntregar(){
  348.       let tiempo = '";
  349.         // line 173
  350.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["actualizardashboard"]) || array_key_exists("actualizardashboard"$context) ? $context["actualizardashboard"] : (function () { throw new RuntimeError('Variable "actualizardashboard" does not exist.'173$this->source); })()), "html"nulltrue);
  351.         yield "' * 1000;
  352.       setTimeout(function(){
  353.         location.reload()
  354.       }, tiempo);
  355.     }
  356.     xmlSinEntregar();
  357.   </script>
  358.   ";
  359.         
  360.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  361.         
  362.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  363.         yield from [];
  364.     }
  365.     /**
  366.      * @codeCoverageIgnore
  367.      */
  368.     public function getTemplateName(): string
  369.     {
  370.         return "@EasyAdmin/dashboard.html.twig";
  371.     }
  372.     /**
  373.      * @codeCoverageIgnore
  374.      */
  375.     public function isTraitable(): bool
  376.     {
  377.         return false;
  378.     }
  379.     /**
  380.      * @codeCoverageIgnore
  381.      */
  382.     public function getDebugInfo(): array
  383.     {
  384.         return array (  385 => 173,  366 => 157,  363 => 156,  340 => 155,  337 => 154,  330 => 144,  323 => 142,  321 => 140,  319 => 129,  315 => 127,  311 => 126,  303 => 124,  300 => 123,  297 => 122,  294 => 121,  291 => 120,  288 => 119,  285 => 118,  282 => 117,  280 => 116,  276 => 114,  272 => 112,  269 => 111,  260 => 109,  255 => 108,  253 => 107,  249 => 105,  245 => 103,  242 => 102,  233 => 100,  228 => 99,  226 => 98,  221 => 96,  218 => 95,  214 => 94,  192 => 74,  188 => 71,  185 => 70,  183 => 37,  180 => 36,  171 => 33,  167 => 32,  163 => 31,  159 => 30,  155 => 29,  152 => 28,  150 => 26,  148 => 23,  143 => 22,  141 => 21,  128 => 10,  115 => 9,  90 => 7,  79 => 4,  66 => 3,  43 => 1,);
  385.     }
  386.     public function getSourceContext(): Source
  387.     {
  388.         return new Source("{% extends '@EasyAdmin/page/content.html.twig' %}
  389. {% block page_title %}
  390. Dashboard {#({{ \"now\"|date(\"d/m/Y H:i:s\") }})#}
  391. {% endblock %}
  392. {% block content_title %}<h1 class=\"title\">{{ ea.dashboardTitle }}</h1>{% endblock %}
  393. {% block main %}
  394.   <div class=\"form-panel-header \">
  395.     <div class=\"form-panel-title\">
  396.       <a href=\"#\" class=\"not-collapsible\">
  397.         <i class=\"form-panel-icon fa fa-exclamation-circle\"></i>
  398.         <em>Pedidos no entregados a la sucursal</em>
  399.       </a>
  400.     </div>
  401.   </div>
  402.   <table class=\"table datagrid with-rounded-top\" id=\"xmlSinEntregar\">
  403.     <tbody>
  404.         {% if cabs %}
  405.           {% for cab in cabs %}
  406.               {% set url = ea_url()
  407.                 .setController('App\\\\Controller\\\\Admin\\\\CabeceraCrudController')
  408.                 .setAction('detail')
  409.                 .setEntityId(cab.id)
  410.               %}
  411.               <tr>
  412.                   <td><i class=\"fa fa-map\"></i> {{ cab.sucursal }}</td>
  413.                   <td>{{ cab.nombrecliente }}</td>
  414.                   <td>{{ cab.updatedAt|date(\"d/m/Y H:i:s\") }}</td>
  415.                   <td>{{ cab.filename }}</td>
  416.                   <td><a href=\"{{ url }}\">ver</a>
  417.               </tr>
  418.           {% endfor %}
  419.         {% else %}
  420.           {# <tr class=\"empty-row\">
  421.             <td><span></span></td>
  422.             <td><span></span></td>
  423.             <td><span></span></td>
  424.             <td><span></span></td>
  425.             <td><span></span></td>
  426.           </tr>
  427.           <tr class=\"empty-row\">
  428.             <td><span></span></td>
  429.             <td><span></span></td>
  430.             <td><span></span></td>
  431.             <td><span></span></td>
  432.             <td><span></span></td>
  433.           </tr>
  434.           <tr class=\"no-results\">
  435.           <td colspan=\"100\">
  436.           No se han encontrado resultados.
  437.           </td>
  438.           </tr>
  439.           <tr class=\"empty-row\">
  440.             <td><span></span></td>
  441.             <td><span></span></td>
  442.             <td><span></span></td>
  443.             <td><span></span></td>
  444.             <td><span></span></td>
  445.           </tr>
  446.           <tr class=\"empty-row\">
  447.             <td><span></span></td>
  448.             <td><span></span></td>
  449.             <td><span></span></td>
  450.             <td><span></span></td>
  451.             <td><span></span></td>
  452.           </tr> #}
  453.         {% endif %}
  454.     </tbody>
  455.   </table>
  456.   {# indicadores  #}
  457.   <div class=\"form-panel-header \">
  458.     <div class=\"form-panel-title\">
  459.       <a href=\"#\" class=\"not-collapsible\">
  460.         <i class=\"form-panel-icon fa fa-truck\"></i>
  461.         <em>Estado de las sucursales (según capacidad)</em>
  462.       </a>
  463.     </div>
  464.   </div>
  465.   <table class=\"datagrid\">
  466.     <thead>
  467.         <tr>
  468.             <th><span><strong>Sucursal</strong></span></th>
  469.             <th><span><strong># en preparación (Callcenter)</strong></span></th>
  470.             <th><span><strong># en preparación (Ecommerce)</strong></span></th>
  471.             <th><span><strong># pedidos en reparto</strong></span></th>
  472.             <th><span><strong># TOTAL PEDIDOS</strong></span></th>
  473.             <th><span><strong># max de pedidos en reparto</strong></span></th>
  474.         </tr>
  475.     </thead>
  476.     <tbody>
  477.       {% for nombreSucursal, datosSucursal in resultadosConsolidados %}
  478.         <tr>
  479.           <td clasS=\"text-left\">{{ nombreSucursal }}</td>
  480.           <td class=\"text-center\">
  481.             {% if datosSucursal.detalles.callcenter is defined %}
  482.                 {% for detalle in datosSucursal.detalles.callcenter %}
  483.                     {{ detalle.preparacion }}
  484.                 {% endfor %}
  485.             {% else %}
  486.                 Sin datos
  487.             {% endif %}
  488.           </td>
  489.           <td class=\"text-center\">
  490.             {% if datosSucursal.detalles.ecommerce is defined %}
  491.                 {% for detalle in datosSucursal.detalles.ecommerce %}
  492.                     {{ detalle.preparacion }}
  493.                 {% endfor %}
  494.             {% else %}
  495.                 Sin datos
  496.             {% endif %}
  497.           </td>
  498.           <td clasS=\"text-center\">
  499.             {% set porcentaje = (70 * datosSucursal.sucursal.getOrderCapacity)/100 %}
  500.             {% if datosSucursal.total.reparto < porcentaje|round %}
  501.               {% set class = 'badge-success' %}
  502.             {% elseif datosSucursal.total.reparto >= porcentaje|round and datosSucursal.total.reparto < datosSucursal.sucursal.getOrderCapacity %}
  503.               {% set class = 'badge-warning' %}
  504.             {% else %}
  505.               {% set class = 'badge-danger' %}
  506.             {% endif %}
  507.             <span class=\"badge badge-pill {{ class }}\"><strong>{{ datosSucursal.total.reparto }}</strong></span>
  508.           </td>
  509.           <td clasS=\"text-center\">{{ datosSucursal.total.preparacion + datosSucursal.total.reparto }}</td>
  510.           <td clasS=\"text-center\">{{ datosSucursal.sucursal.getOrderCapacity }}</td>
  511.           {# <td clasS=\"text-left\">{{ indicator.preparacion }}</td> #}
  512.           {# <td clasS=\"text-left\">
  513.             {% set porcentaje = (70 * indicator.sucursal.getOrderCapacity)/100 %}
  514.             {% if indicator.reparto < porcentaje|round %}
  515.               {% set class = 'badge-success' %}
  516.             {% elseif indicator.reparto >= porcentaje|round and indicator.reparto < indicator.sucursal.getOrderCapacity %}
  517.               {% set class = 'badge-warning' %}
  518.             {% else %}
  519.               {% set class = 'badge-danger' %}
  520.             {% endif %}
  521.             <span class=\"badge badge-pill {{ class }}\"><strong>{{ indicator.reparto }}</strong></span>
  522.           </td> #}
  523.           {# <td clasS=\"text-left\">{{ indicator.preparacion + indicator.reparto }}</td>
  524.           <td clasS=\"text-left\">{{ indicator.sucursal.getOrderCapacity }}</td> #}
  525.         </tr>
  526.       {% endfor %}
  527.     </tbody>
  528.     <tfoot></tfoot>
  529.   </table>
  530.   {# <section class=\"content-header\">
  531.     <div class=\"content-header-title\">
  532.       <h1 class=\"title\">Pedidos no entregados a la sucursal</h1>
  533.     </div>
  534.   </section> #}
  535.   {% block body_custom_javascript %}
  536.  <script>
  537.     var notification = new Audio('{{ asset('sounds/Notification.mp3') }}');
  538.     function xmlSinEntregar() {
  539.       var tbl = document.getElementById(\"xmlSinEntregar\");
  540.       if (tbl.rows.length == 0) {
  541.         // console.log('No hay pedidos');
  542.       } else {
  543.         // console.log('La tabla tiene ' + tbl.rows.length + ' Pedido(s) sin entregar');
  544.         notification.play();
  545.       }
  546.       alertaXmlSinEntregar();
  547.     }
  548.     function alertaXmlSinEntregar(){
  549.       let tiempo = '{{actualizardashboard}}' * 1000;
  550.       setTimeout(function(){
  551.         location.reload()
  552.       }, tiempo);
  553.     }
  554.     xmlSinEntregar();
  555.   </script>
  556.   {% endblock %}
  557. {% endblock %}""@EasyAdmin/dashboard.html.twig""/var/www/callcenter/templates/bundles/EasyAdminBundle/dashboard.html.twig");
  558.     }
  559. }