<?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;
/* @EasyAdmin/dashboard.html.twig */
class __TwigTemplate_310aaf0fb38c9d04dc87a860e29d7766 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'],
'content_title' => [$this, 'block_content_title'],
'main' => [$this, 'block_main'],
'body_custom_javascript' => [$this, 'block_body_custom_javascript'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "@EasyAdmin/page/content.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@EasyAdmin/dashboard.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@EasyAdmin/dashboard.html.twig"));
$this->parent = $this->loadTemplate("@EasyAdmin/page/content.html.twig", "@EasyAdmin/dashboard.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_title"));
// line 4
yield "Dashboard ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 7
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content_title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content_title"));
yield "<h1 class=\"title\">";
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", false, false, false, 7), "html", null, true);
yield "</h1>";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 9
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_main(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 10
yield " <div class=\"form-panel-header \">
<div class=\"form-panel-title\">
<a href=\"#\" class=\"not-collapsible\">
<i class=\"form-panel-icon fa fa-exclamation-circle\"></i>
<em>Pedidos no entregados a la sucursal</em>
</a>
</div>
</div>
<table class=\"table datagrid with-rounded-top\" id=\"xmlSinEntregar\">
<tbody>
";
// line 21
if ((isset($context["cabs"]) || array_key_exists("cabs", $context) ? $context["cabs"] : (function () { throw new RuntimeError('Variable "cabs" does not exist.', 21, $this->source); })())) {
// line 22
yield " ";
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["cab"]) {
// line 23
yield " ";
$context["url"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $this->extensions['EasyCorp\Bundle\EasyAdminBundle\Twig\EasyAdminTwigExtension']->getAdminUrlGenerator(), "setController", ["App\\Controller\\Admin\\CabeceraCrudController"], "method", false, false, false, 23), "setAction", ["detail"], "method", false, false, false, 24), "setEntityId", [CoreExtension::getAttribute($this->env, $this->source, // line 26
$context["cab"], "id", [], "any", false, false, false, 26)], "method", false, false, false, 25);
// line 28
yield " <tr>
<td><i class=\"fa fa-map\"></i> ";
// line 29
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cab"], "sucursal", [], "any", false, false, false, 29), "html", null, true);
yield "</td>
<td>";
// line 30
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cab"], "nombrecliente", [], "any", false, false, false, 30), "html", null, true);
yield "</td>
<td>";
// line 31
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["cab"], "updatedAt", [], "any", false, false, false, 31), "d/m/Y H:i:s"), "html", null, true);
yield "</td>
<td>";
// line 32
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cab"], "filename", [], "any", false, false, false, 32), "html", null, true);
yield "</td>
<td><a href=\"";
// line 33
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", null, true);
yield "\">ver</a>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['cab'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 36
yield " ";
} else {
// line 37
yield " ";
// line 70
yield " ";
}
// line 71
yield " </tbody>
</table>
";
// line 74
yield " <div class=\"form-panel-header \">
<div class=\"form-panel-title\">
<a href=\"#\" class=\"not-collapsible\">
<i class=\"form-panel-icon fa fa-truck\"></i>
<em>Estado de las sucursales (según capacidad)</em>
</a>
</div>
</div>
<table class=\"datagrid\">
<thead>
<tr>
<th><span><strong>Sucursal</strong></span></th>
<th><span><strong># en preparación (Callcenter)</strong></span></th>
<th><span><strong># en preparación (Ecommerce)</strong></span></th>
<th><span><strong># pedidos en reparto</strong></span></th>
<th><span><strong># TOTAL PEDIDOS</strong></span></th>
<th><span><strong># max de pedidos en reparto</strong></span></th>
</tr>
</thead>
<tbody>
";
// line 94
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["nombreSucursal"] => $context["datosSucursal"]) {
// line 95
yield " <tr>
<td clasS=\"text-left\">";
// line 96
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["nombreSucursal"], "html", null, true);
yield "</td>
<td class=\"text-center\">
";
// line 98
if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "detalles", [], "any", false, true, false, 98), "callcenter", [], "any", true, true, false, 98)) {
// line 99
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "detalles", [], "any", false, false, false, 99), "callcenter", [], "any", false, false, false, 99));
foreach ($context['_seq'] as $context["_key"] => $context["detalle"]) {
// line 100
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["detalle"], "preparacion", [], "any", false, false, false, 100), "html", null, true);
yield "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['detalle'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 102
yield " ";
} else {
// line 103
yield " Sin datos
";
}
// line 105
yield " </td>
<td class=\"text-center\">
";
// line 107
if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "detalles", [], "any", false, true, false, 107), "ecommerce", [], "any", true, true, false, 107)) {
// line 108
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "detalles", [], "any", false, false, false, 108), "ecommerce", [], "any", false, false, false, 108));
foreach ($context['_seq'] as $context["_key"] => $context["detalle"]) {
// line 109
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["detalle"], "preparacion", [], "any", false, false, false, 109), "html", null, true);
yield "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['detalle'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 111
yield " ";
} else {
// line 112
yield " Sin datos
";
}
// line 114
yield " </td>
<td clasS=\"text-center\">
";
// line 116
$context["porcentaje"] = ((70 * CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "sucursal", [], "any", false, false, false, 116), "getOrderCapacity", [], "any", false, false, false, 116)) / 100);
// line 117
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "total", [], "any", false, false, false, 117), "reparto", [], "any", false, false, false, 117) < 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); })())))) {
// line 118
yield " ";
$context["class"] = "badge-success";
// line 119
yield " ";
} elseif (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "total", [], "any", false, false, false, 119), "reparto", [], "any", false, false, false, 119) >= 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->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "total", [], "any", false, false, false, 119), "reparto", [], "any", false, false, false, 119) < CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "sucursal", [], "any", false, false, false, 119), "getOrderCapacity", [], "any", false, false, false, 119)))) {
// line 120
yield " ";
$context["class"] = "badge-warning";
// line 121
yield " ";
} else {
// line 122
yield " ";
$context["class"] = "badge-danger";
// line 123
yield " ";
}
// line 124
yield " <span class=\"badge badge-pill ";
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", null, true);
yield "\"><strong>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "total", [], "any", false, false, false, 124), "reparto", [], "any", false, false, false, 124), "html", null, true);
yield "</strong></span>
</td>
<td clasS=\"text-center\">";
// line 126
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "total", [], "any", false, false, false, 126), "preparacion", [], "any", false, false, false, 126) + CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "total", [], "any", false, false, false, 126), "reparto", [], "any", false, false, false, 126)), "html", null, true);
yield "</td>
<td clasS=\"text-center\">";
// line 127
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["datosSucursal"], "sucursal", [], "any", false, false, false, 127), "getOrderCapacity", [], "any", false, false, false, 127), "html", null, true);
yield "</td>
";
// line 129
yield " ";
// line 140
yield " ";
// line 142
yield " </tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['nombreSucursal'], $context['datosSucursal'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 144
yield "
</tbody>
<tfoot></tfoot>
</table>
";
// line 154
yield "
";
// line 155
yield from $this->unwrap()->yieldBlock('body_custom_javascript', $context, $blocks);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body_custom_javascript(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body_custom_javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body_custom_javascript"));
// line 156
yield " <script>
var notification = new Audio('";
// line 157
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("sounds/Notification.mp3"), "html", null, true);
yield "');
function xmlSinEntregar() {
var tbl = document.getElementById(\"xmlSinEntregar\");
if (tbl.rows.length == 0) {
// console.log('No hay pedidos');
} else {
// console.log('La tabla tiene ' + tbl.rows.length + ' Pedido(s) sin entregar');
notification.play();
}
alertaXmlSinEntregar();
}
function alertaXmlSinEntregar(){
let tiempo = '";
// line 173
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", null, true);
yield "' * 1000;
setTimeout(function(){
location.reload()
}, tiempo);
}
xmlSinEntregar();
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@EasyAdmin/dashboard.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% extends '@EasyAdmin/page/content.html.twig' %}
{% block page_title %}
Dashboard {#({{ \"now\"|date(\"d/m/Y H:i:s\") }})#}
{% endblock %}
{% block content_title %}<h1 class=\"title\">{{ ea.dashboardTitle }}</h1>{% endblock %}
{% block main %}
<div class=\"form-panel-header \">
<div class=\"form-panel-title\">
<a href=\"#\" class=\"not-collapsible\">
<i class=\"form-panel-icon fa fa-exclamation-circle\"></i>
<em>Pedidos no entregados a la sucursal</em>
</a>
</div>
</div>
<table class=\"table datagrid with-rounded-top\" id=\"xmlSinEntregar\">
<tbody>
{% if cabs %}
{% for cab in cabs %}
{% set url = ea_url()
.setController('App\\\\Controller\\\\Admin\\\\CabeceraCrudController')
.setAction('detail')
.setEntityId(cab.id)
%}
<tr>
<td><i class=\"fa fa-map\"></i> {{ cab.sucursal }}</td>
<td>{{ cab.nombrecliente }}</td>
<td>{{ cab.updatedAt|date(\"d/m/Y H:i:s\") }}</td>
<td>{{ cab.filename }}</td>
<td><a href=\"{{ url }}\">ver</a>
</tr>
{% endfor %}
{% else %}
{# <tr class=\"empty-row\">
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
</tr>
<tr class=\"empty-row\">
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
</tr>
<tr class=\"no-results\">
<td colspan=\"100\">
No se han encontrado resultados.
</td>
</tr>
<tr class=\"empty-row\">
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
</tr>
<tr class=\"empty-row\">
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
<td><span></span></td>
</tr> #}
{% endif %}
</tbody>
</table>
{# indicadores #}
<div class=\"form-panel-header \">
<div class=\"form-panel-title\">
<a href=\"#\" class=\"not-collapsible\">
<i class=\"form-panel-icon fa fa-truck\"></i>
<em>Estado de las sucursales (según capacidad)</em>
</a>
</div>
</div>
<table class=\"datagrid\">
<thead>
<tr>
<th><span><strong>Sucursal</strong></span></th>
<th><span><strong># en preparación (Callcenter)</strong></span></th>
<th><span><strong># en preparación (Ecommerce)</strong></span></th>
<th><span><strong># pedidos en reparto</strong></span></th>
<th><span><strong># TOTAL PEDIDOS</strong></span></th>
<th><span><strong># max de pedidos en reparto</strong></span></th>
</tr>
</thead>
<tbody>
{% for nombreSucursal, datosSucursal in resultadosConsolidados %}
<tr>
<td clasS=\"text-left\">{{ nombreSucursal }}</td>
<td class=\"text-center\">
{% if datosSucursal.detalles.callcenter is defined %}
{% for detalle in datosSucursal.detalles.callcenter %}
{{ detalle.preparacion }}
{% endfor %}
{% else %}
Sin datos
{% endif %}
</td>
<td class=\"text-center\">
{% if datosSucursal.detalles.ecommerce is defined %}
{% for detalle in datosSucursal.detalles.ecommerce %}
{{ detalle.preparacion }}
{% endfor %}
{% else %}
Sin datos
{% endif %}
</td>
<td clasS=\"text-center\">
{% set porcentaje = (70 * datosSucursal.sucursal.getOrderCapacity)/100 %}
{% if datosSucursal.total.reparto < porcentaje|round %}
{% set class = 'badge-success' %}
{% elseif datosSucursal.total.reparto >= porcentaje|round and datosSucursal.total.reparto < datosSucursal.sucursal.getOrderCapacity %}
{% set class = 'badge-warning' %}
{% else %}
{% set class = 'badge-danger' %}
{% endif %}
<span class=\"badge badge-pill {{ class }}\"><strong>{{ datosSucursal.total.reparto }}</strong></span>
</td>
<td clasS=\"text-center\">{{ datosSucursal.total.preparacion + datosSucursal.total.reparto }}</td>
<td clasS=\"text-center\">{{ datosSucursal.sucursal.getOrderCapacity }}</td>
{# <td clasS=\"text-left\">{{ indicator.preparacion }}</td> #}
{# <td clasS=\"text-left\">
{% set porcentaje = (70 * indicator.sucursal.getOrderCapacity)/100 %}
{% if indicator.reparto < porcentaje|round %}
{% set class = 'badge-success' %}
{% elseif indicator.reparto >= porcentaje|round and indicator.reparto < indicator.sucursal.getOrderCapacity %}
{% set class = 'badge-warning' %}
{% else %}
{% set class = 'badge-danger' %}
{% endif %}
<span class=\"badge badge-pill {{ class }}\"><strong>{{ indicator.reparto }}</strong></span>
</td> #}
{# <td clasS=\"text-left\">{{ indicator.preparacion + indicator.reparto }}</td>
<td clasS=\"text-left\">{{ indicator.sucursal.getOrderCapacity }}</td> #}
</tr>
{% endfor %}
</tbody>
<tfoot></tfoot>
</table>
{# <section class=\"content-header\">
<div class=\"content-header-title\">
<h1 class=\"title\">Pedidos no entregados a la sucursal</h1>
</div>
</section> #}
{% block body_custom_javascript %}
<script>
var notification = new Audio('{{ asset('sounds/Notification.mp3') }}');
function xmlSinEntregar() {
var tbl = document.getElementById(\"xmlSinEntregar\");
if (tbl.rows.length == 0) {
// console.log('No hay pedidos');
} else {
// console.log('La tabla tiene ' + tbl.rows.length + ' Pedido(s) sin entregar');
notification.play();
}
alertaXmlSinEntregar();
}
function alertaXmlSinEntregar(){
let tiempo = '{{actualizardashboard}}' * 1000;
setTimeout(function(){
location.reload()
}, tiempo);
}
xmlSinEntregar();
</script>
{% endblock %}
{% endblock %}", "@EasyAdmin/dashboard.html.twig", "/var/www/callcenter/templates/bundles/EasyAdminBundle/dashboard.html.twig");
}
}