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

/* @UVDeskCoreFramework/Reports/listAgentActivities.html.twig */
class __TwigTemplate_4d5030f4134ac713277e3a95172ba41e 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 = [
            'title' => [$this, 'block_title'],
            'pageContent' => [$this, 'block_pageContent'],
            'footer' => [$this, 'block_footer'],
        ];
    }

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

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

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent Activity"), "html", null, true);
        yield from [];
    }

    // line 5
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_pageContent(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 6
        yield "\t<style>
\t\t.grid .tick {
\t\t\tstroke: #9F9F9F;
\t\t\topacity: .5 !important;
\t\t}
\t\t.tick text {
\t\t\tfont-size: 15px;
\t\t}
\t\t.uv-report-chart-col-rt .uv-pannel {
\t\t\tmin-height: 600px;
\t\t}
\t\t.uv-report-chart-col-rt .uv-pannel-body {
\t\t\tpadding: 0 0 0 20px;
\t\t}
\t\t.top-agent-list {
\t\t\tmargin: 0;
\t\t\tpadding: 0;
\t\t\tlist-style: none;
\t\t}
\t\t.top-agent-list li {
\t\t\tborder-bottom: 1px solid #d3d3d3;
\t\t\tpadding: 14px 0;
\t\t}
\t\t.top-agent-list li:last-child {
\t\t\tborder-bottom: none;
\t\t}
\t\t.uv-agent-lt {
\t\t\tfloat: left;
\t\t\tmargin-right: 10px;
\t\t}
\t\t.uv-agent-lt img {
\t\t\twidth: 40px;
\t\t\tborder-radius: 3px;
\t\t\tdisplay: inline-block;
\t\t\tvertical-align: middle;
\t\t}
\t\t.uv-agent-rt {
\t\t\toverflow: hidden;
\t\t}
\t\tspan.uv-info span {
\t\t\twidth: 100%;
\t\t\tfloat: left;
\t\t}
\t\t.uv-rtl .agent-graph svg {
\t\t\tdirection: ltr;
\t\t}
\t\t.uv-paper .uv-element-block {
\t\t\tmargin: 10px 50px 10px 0px;
\t\t}
\t\t.uv-element-block {
\t\t\tfloat: right;
\t\t\twidth: unset;
\t\t}
        .uv-action-bar .uv-field-block.date {
            display: inline-block;
            margin-right: 8px;
        }
        .uv-action-bar label {
            font-size: 16px;
            vertical-align: middle;
            margin-right: 10px;
        }
        .uv-inner-section .uv-action-bar label{
            font-size: 15px;
        }
        @media screen and (min-width: 1100px) and (max-width: 1260px) {
            .uv-inner-section .uv-action-bar .uv-action-bar-col-lt, .uv-inner-section .uv-action-bar .uv-action-bar-col-rt {
                width: 55% !important;
            } 
        }
\t</style>
\t<div class=\"uv-inner-section\">
\t\t";
        // line 78
        $context["asideTemplate"] = "Webkul\\UVDesk\\CoreFrameworkBundle\\Dashboard\\AsideTemplate";
        // line 79
        yield "\t\t";
        $context["asideSidebarReference"] = "Webkul\\UVDesk\\CoreFrameworkBundle\\UIComponents\\Dashboard\\Panel\\Sidebars\\Reports";
        // line 80
        yield "
\t\t";
        // line 81
        yield CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["uvdesk_extensibles"] ?? null), "getRegisteredComponent", [($context["asideTemplate"] ?? null)], "method", false, false, false, 81), "renderSidebar", [($context["asideSidebarReference"] ?? null)], "method", false, false, false, 81);
        yield "
\t\t
        <div id=\"agent-activities\" class=\"uv-view ";
        // line 83
        if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 83), "cookies", [], "any", false, false, false, 83) && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 83), "cookies", [], "any", false, false, false, 83), "get", ["uv-asideView"], "method", false, false, false, 83))) {
            yield "uv-aside-view";
        }
        yield "\">
                ";
        // line 84
        $context["filterContext"] = [];
        // line 85
        yield "
                <h1>";
        // line 86
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent Activity"), "html", null, true);
        yield " <span id=\"activity-count\"></span></h1>

                ";
        // line 89
        yield "                <div class=\"uv-element-block\">
                    <div class=\"uv-field-block\" id=\"agent-filter\">
                        <input class=\"uv-search-inline uv-field uv-dropdown-other preloaded\" type=\"text\" data-filter-type=\"agent\" id=\"agent-filter-input\" placeholder=\"Search Agent\">
                        <div class=\"uv-dropdown-list uv-bottom-left\">
                            <div class=\"uv-dropdown-container\">
                                <label>";
        // line 94
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Filter With"), "html", null, true);
        yield "</label>
                            </div>

                            <ul class=\"uv-agents-list\">
                                ";
        // line 98
        $context["options"] = [];
        // line 99
        yield "                                ";
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["agents"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["agent"]) {
            // line 100
            yield "                                    ";
            $context["options"] = Twig\Extension\CoreExtension::merge(($context["options"] ?? null), [["id" => CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "id", [], "any", false, false, false, 100), "name" => CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "name", [], "any", false, false, false, 100)]]);
            // line 101
            yield "                                    <li data-id=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "id", [], "any", false, false, false, 101), "html", null, true);
            yield "\" class=\"agentId\">
                                        ";
            // line 102
            if ((CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "smallThumbnail", [], "any", false, false, false, 102) != null)) {
                // line 103
                yield "                                            <img src=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 103), "scheme", [], "any", false, false, false, 103) . "://") . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 103), "httpHost", [], "any", false, false, false, 103)) . $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("")), "html", null, true);
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "smallThumbnail", [], "any", false, false, false, 103), "html", null, true);
                yield "\"/>
                                        ";
            } else {
                // line 105
                yield "                                            <img src=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(($context["default_agent_image_path"] ?? null)), "html", null, true);
                yield "\"/> 
                                        ";
            }
            // line 107
            yield "                                        ";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "name", [], "any", false, false, false, 107), "html", null, true);
            yield "
                                    </li>
                                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['agent'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 110
        yield "                                <li class=\"uv-no-results\" style=\"display: none;\">
                                    ";
        // line 111
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("No result found"), "html", null, true);
        yield "
                                </li>
                                ";
        // line 114
        yield "                            </ul>
                        </div>

                        <div class=\"uv-filtered-tags\"></div>
                    </div>
                </div>

                ";
        // line 122
        yield "                <div class=\"uv-action-bar\">
                    <div class=\"uv-action-bar-col-lt\">
                        <label>";
        // line 124
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Report From"), "html", null, true);
        yield "</label>
                        <div class=\"uv-field-block date\">
                            <input type=\"text\" class=\"uv-field uv-date-picker date date-from\" id=\"from\" value=\"\">
                        </div>
                        <label>";
        // line 128
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("To"), "html", null, true);
        yield "</label>
                        <div class=\"uv-field-block date\">
                            <input type=\"text\" class=\"uv-field uv-date-picker date date-to\"  id=\"to\" value=\"\">
                        </div>
                        <button class=\"uv-excel agent-excel\" id=\"export-agent\">
                                <i class=\"fas fa-file-excel\"></i> Export
                            </button>
                    </div>
                </div>

                <!-- Ticket list -->
                <div id=\"agent-activity-listings\" class=\"uv-table uv-list-view\">
                    <table>
                        <thead>
                           <tr>
                                <th class=\"uv-width-140\"></th>
                                <th>";
        // line 144
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ID"), "html", null, true);
        yield "</th>
                                <th>";
        // line 145
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type ID"), "html", null, true);
        yield "</th>
                                <th class=\"uv-min-width-300\">";
        // line 146
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html", null, true);
        yield "</th>
                                 <th class=\"uv-min-width-250\">";
        // line 147
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Name"), "html", null, true);
        yield "</th>
                                <th class=\"uv-min-width-250\">";
        // line 148
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent Name"), "html", null, true);
        yield "</th>
                                <th data-index=\"customer-name\">";
        // line 149
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Effort Spent"), "html", null, true);
        yield "</th>
                                <th data-index=\"total-reply\">";
        // line 150
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Created At"), "html", null, true);
        yield "</th>
                            </tr>
                        </thead>

                        <tbody class=\"list-items\" id=\"list-items\"></tbody>
                    </table>

                    <div class=\"navigation\"></div>
                </div>
                <!-- //Ticket list -->

                <script type=\"text/javascript\">
                    var filterContext = ";
        // line 162
        yield json_encode(($context["filterContext"] ?? null));
        yield "
                </script>
            </div>
        </div>
    </div>
";
        yield from [];
    }

    // line 169
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_footer(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 170
        yield "    ";
        yield from $this->yieldParentBlock("footer", $context, $blocks);
        yield "

    <script id=\"agent-listing-template\" type=\"text/template\">
        <% if (collection.length <= 0) { %>
            <tr>
                <td colspan=\"7\" style=\"text-align: center;\">No results available</td>
            </tr>
        <% } else { %>
            <% collection.forEach(function(item) { %>
                <tr>
                    <td data-value=\"\">
                        <%= '<span class=\"uv-list-ticket-priority\" style=\"background:' + item.color + '\"></span>' %>
                    </td>
                    <td data-value=\"";
        // line 183
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Id"), "html", null, true);
        yield "\"><a href=\"<%- item.ticketURL %>\">#<%- item.ticketId %></a></td>
                    <td data-value=\"";
        // line 184
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type Id"), "html", null, true);
        yield "\"><%- item.id %></a></td>
                    <td data-value=\"";
        // line 185
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html", null, true);
        yield "\"><%- item.code %></td>
                    <td data-value=\"";
        // line 186
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer Name"), "html", null, true);
        yield "\"><%- item.customerName %></td>
                    <td data-value=\"";
        // line 187
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent Name"), "html", null, true);
        yield "\"><%- item.fullName %></td>
                    <td data-value=\"";
        // line 188
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Effort Spent"), "html", null, true);
        yield "\"><%- item.timeSpent %></td>
                    <td data-value=\"";
        // line 189
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Created At"), "html", null, true);
        yield "\"><%- item.createdAt %></td>
                </tr>
            <% }) %>
        <% } %>
    </script>

    <script>
        \$(document).ready(function() {
            \$('#export-agent').on('click', function() {
                // Redirect to the export route
                window.location.href = \"";
        // line 199
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_agent_export");
        yield "\";
            });
        });
    </script>

<style>
    .agent-excel {
    border: solid 1px #B1B1AE;
    padding: 09px 30px;
    border-radius: 3px;
    cursor: pointer;
    vertical-align: middle;
    font-size: 15px;
    display: inline-block;
    margin: 5px 0px;
    color: #333333;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 20px;
    background-color: white;
}
</style>

    <script type=\"text/javascript\">
        \$(function () {
            var startGlobalDate = \"\";
            var endGlobalDate = \"\";
            var date = new Date();
            var currentMonth = date.getMonth();
            var currentDate = date.getDate();
            var currentYear = date.getFullYear();

            \$('.uv-action-bar .date').datetimepicker({
                maxDate: new Date(currentYear, currentMonth, currentDate),
                format: 'YYYY-MM-DD',
            }).on('dp.change', function(e) {
                \$('.date').removeClass('uv-field-error');
                var element = \$(e.currentTarget);
                var date = element.find('input').val();
            });

            var AgentActivityModel = Backbone.Model.extend({
                idAttribute : \"id\"
            });

            var AgentActivityCollection = AppCollection.extend({
                model: AgentActivityModel,
                url: \"";
        // line 245
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_agent_activity_xhr");
        yield "\",
                filterParameters : {
                    \"agent\" : '',
                    \"after\": \"\",
                    \"before\": \"\",
                },
                parse: function (resp, options) {
                    return resp.data;
                },
                initialize: function (params) {
                    this.activityView = new ActivityView({
                        collection: this
                    });
                },
                syncData : function() {
                  app.appView.showLoader();
                  var self = this;

                  this.fetch({
                      data: this.getValidParameters(),
                      reset: true,
                      success: function(collection, response, options) {
                          self.reset([]);

                          response.data.forEach(function (item) {
                              self.add(new AgentActivityModel(item));
                          })

                          app.appView.hideLoader();
                          app.pager.paginationData = response.pagination_data;

\t\t\t\t\t\t  let activityCount = \$('#activity-count');
                          activityCount.html(`(\${app.pager.paginationData.totalCount})`);

                          if (self.length == 0 && app.pager.paginationData.current != \"0\") {
                              let url = app.pager.paginationData.url;
                              router.navigate(
                                  url.replace('replacePage', app.pager.paginationData.last),
                                  { trigger: true }
                              );
                          } else {
                              // Render records & pagination
                              app.pager.render();
                              self.activityView.renderRecords();
                          }
                      },
                      error: function (collection, xhr, options) {
                        console.log('sync failed:', collection, response, options);
                        if (url = xhr.getResponseHeader('Location')) {
                          window.location = url;
                        }
                      }
                  });
                },
                syncView: function () {
                    let queryParams = this.getValidParameters();

                    ";
        // line 302
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["agents"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["agent"]) {
            // line 303
            yield "                        if (\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "id", [], "any", false, false, false, 303), "html", null, true);
            yield "\" == queryParams.agent) {
                            \$('#agent-filter-input').val(\"";
            // line 304
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "name", [], "any", false, false, false, 304), "html", null, true);
            yield "\")
                        }
                    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['agent'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 307
        yield "
                    \$('#from').val(queryParams.after);
                    \$('#to').val(queryParams.before);
                }
            });

            var ActivityView = Backbone.View.extend({
                el: \$(\"#agent-activities\"),
                listing_template: _.template(\$(\"#agent-listing-template\").html()),
                events: {
                    'click .uv-dropdown-list li' : 'applyFilter',
                    'keyup #agent-filter-input' : 'initializeback',
                    'dp.change input#from': 'initializeback',
                    'dp.change input#to': 'initializeback'
                },
                initializeback: function(e) {
                     if (e.keyCode == 8 && \$('#agent-filter-input').val() == '' || e.type == \"dp\") { 
                        agentActivityCollection.filterParameters.after = \$('#from').val();
                        agentActivityCollection.filterParameters.before = \$('#to').val();

                        if (e.keyCode == 8) {
                            agentActivityCollection.filterParameters.agent = null;
                        }
                        
                        agentActivityCollection.syncData();
                        agentActivityCollection.syncView();

                        agentActivityCollection.reset();
                        agentActivityCollection.state.currentPage = null;

                        let params = this.collection.getValidParameters();
                        var query = app.appView.buildQuery(\$.param(params));
                        router.navigate(query, { trigger: true });
                    }
                },
                initialize: function(params) {
                    this.renderRecords();
                },
                renderRecords: function() {
                    \$(\"#agent-activity-listings tbody\").html(this.listing_template({
                        collection: this.collection.toJSON()
                    }));
                },
                applyFilter: function(e) {
                    currentElement = Backbone.\$(e.currentTarget);

                    if (currentElement.attr(\"data-id\")) {
                        parent = currentElement.parents(\".uv-field-block\");
                        filterType = parent.find('input').attr('data-filter-type');

                        if ((typeof(this.flag) == \"undefined\") && filterType == \"agent\") {
                            this.collection.filterParameters.agent = currentElement.attr('data-id');

                            \$('#agent-filter-input').val(currentElement.text().replace(/^\\s+|\\s+\$/g,''));
                        }
                    }

                    this.collection.filterParameters.after = \$('#from').val();
                    this.collection.filterParameters.before = \$('#to').val();

                    let params = this.collection.getValidParameters();
                    var query = app.appView.buildQuery(\$.param(params));

                    this.collection.reset();
                    this.collection.state.currentPage = null;
                    router.navigate(query, { trigger: true });
                },
            });

            var agentActivityCollection = new AgentActivityCollection();

            Router = Backbone.Router.extend({
                routes: {
                    'agent/:agent(/after/:after)(/before/:before)(/page/:number)': 'paginate',
                    'after/:after(/before/:before)(/page/:number)': 'paginateData',
                    '': 'initial',     
                },
                initial: function() {
                    agentActivityCollection.filterParameters.after = \$('#from').val();
                    agentActivityCollection.filterParameters.before = \$('#to').val();
                    agentActivityCollection.filterParameters.agent  = null;

                    agentActivityCollection.syncData();
                    agentActivityCollection.syncView();

                    agentActivityCollection.reset();
                    agentActivityCollection.state.currentPage = null;
                },
                resetParams: function(agent, after, before) {
                    pageJustLoaded = false;
                    agentActivityCollection.state.currentPage = null;

                    agentActivityCollection.filterParameters.agent = agent;
                    agentActivityCollection.filterParameters.after = after;
                    agentActivityCollection.filterParameters.before = before;
                },
                resetData: function(after, before) {
                    pageJustLoaded = false;
                    agentActivityCollection.state.currentPage = null;

                    agentActivityCollection.filterParameters.agent = null;
                    agentActivityCollection.filterParameters.after = after;
                    agentActivityCollection.filterParameters.before = before;
                },
                paginate: function(agent, after, before, number) {
                    this.resetParams(agent, after, before);
                    agentActivityCollection.state.currentPage = number;
                    agentActivityCollection.syncData();
                    agentActivityCollection.syncView();

                    agentActivityCollection.filterParameters.agent = agent;
                },
                paginateData: function(after, before, number) {
                    this.resetData(after, before);
                    agentActivityCollection.state.currentPage = number;
                    agentActivityCollection.syncData();
                    agentActivityCollection.syncView();

                   agentActivityCollection.filterParameters.agent = null;
                },
            });

            var router = new Router({
                collection: agentActivityCollection
            });

            Backbone.history.start({ push_state: true });
        });
    </script>
";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "@UVDeskCoreFramework/Reports/listAgentActivities.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  513 => 307,  504 => 304,  499 => 303,  495 => 302,  435 => 245,  386 => 199,  373 => 189,  369 => 188,  365 => 187,  361 => 186,  357 => 185,  353 => 184,  349 => 183,  332 => 170,  325 => 169,  314 => 162,  299 => 150,  295 => 149,  291 => 148,  287 => 147,  283 => 146,  279 => 145,  275 => 144,  256 => 128,  249 => 124,  245 => 122,  236 => 114,  231 => 111,  228 => 110,  218 => 107,  212 => 105,  205 => 103,  203 => 102,  198 => 101,  195 => 100,  190 => 99,  188 => 98,  181 => 94,  174 => 89,  169 => 86,  166 => 85,  164 => 84,  158 => 83,  153 => 81,  150 => 80,  147 => 79,  145 => 78,  71 => 6,  64 => 5,  53 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "@UVDeskCoreFramework/Reports/listAgentActivities.html.twig", "/home/bmdranzo/public_html/vendor/uvdesk/core-framework/Resources/views/Reports/listAgentActivities.html.twig");
    }
}
