<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;

/* @App/help/helpassistance/index.html.twig */
class __TwigTemplate_0e8c12d69380a332343823977d6a728099d4d1e8f069edaee9f30b36f508df30 extends \Twig\Template
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);

        // line 1
        $this->parent = $this->loadTemplate("@App/Layouts/layout.html.twig", "@App/help/helpassistance/index.html.twig", 1);
        $this->blocks = [
            'content' => [$this, 'block_content'],
            'javascripts' => [$this, 'block_javascripts'],
        ];
    }

    protected function doGetParent(array $context)
    {
        return "@App/Layouts/layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/help/helpassistance/index.html.twig"));

        $this->parent->display($context, array_merge($this->blocks, $blocks));
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 2
    public function block_content($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));

        // line 3
        echo "    <link href=\"//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css\" rel=\"stylesheet\" id=\"bootstrap-css\">
    <link href='https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css' rel='stylesheet' type='text/css'>
    <script src=\"https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js\"></script>

    <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.4.0/min/dropzone.min.css\"/>

    <style type=\"text/css\">
        .text-on-pannel {
            background: #fff none repeat scroll 0 0;
            height: auto;
            margin-right: 20px;
            padding: 2px 4px;
            position: absolute;
            margin-top: -47px;
            border: 1px solid #337ab7;
            border-radius: 8px;
        }

        .panel-body {
            padding-top: 30px !important;
        }

        .left {
            padding-left: 10px;
            padding-top: 10px;
            margin-left: 57px;
            float: left;
            width: 60%;
            height: auto;
        }

        .right {
            padding-top: 10px;
            padding-left: 10px;
            margin-left: 10px;

            float: right;
            width: 34%;
            height: auto;
        }

        .box2 {
            width: 300px;
            margin: 50px auto;
            border: 3px solid #337ab7;
            padding: 20px;
            text-align: center;
            font-weight: 900;
            position: relative;
        }

        .sb9:before {
            content: \"\";
            position: absolute;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-top: 10px solid #337ab7;
            border-bottom: 10px solid transparent;
            right: 50%;
            bottom: -23px;
        }

        thead input {
            width: 100%;
        }

    </style>

    <div class=\"container\">

        <div class=\"left\">
            <div class=\"panel panel-primary\" id=\"helpdesk\">
                <div class=\"panel-body\">
                    <h3 class=\"text-on-pannel text-primary\"><strong class=\"text-uppercase col-md-6 col-md-offset-3\">
                            Formato
                            Requerimiento
                            Sistemas </strong>
                    </h3>
                </div>

                <br>
                <br>
                <for class=\"form-horizontal\">

                    ";
        // line 88
        echo "                    ";
        // line 89
        echo "                    ";
        // line 90
        echo "                    ";
        // line 91
        echo "                    ";
        // line 92
        echo "                    ";
        // line 93
        echo "                    ";
        // line 94
        echo "
                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\" for=\"textinput\">Persona Afectada</label>
                        <div class=\"col-md-4\">
                            ";
        // line 98
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["helpassistance"]) ? $context["helpassistance"] : $this->getContext($context, "helpassistance")), "idUserAssigned", []), 'widget');
        echo "
                        </div>
                        <div class=\"checkbox\">
                            <div id=\"other_person_affect\" class=\"col-md-4\"></div>
                            <label class=\"checkbox-bootstrap\">
                                <input type=\"checkbox\" id=\"another_person_affec\">
                                <span class=\"checkbox-placeholder\"></span>
                                Otro
                            </label>
                        </div>

                    </div>

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\" for=\"textinput\">Fecha</label>
                        <div class=\"col-md-4\">
                            <input id=\"date_person\" name=\"date_person\" type=\"text\" class=\"form-control input-md\"
                                   readonly>
                        </div>
                    </div>

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\" for=\"textinput\">Escoge tienda</label>
                        <div class=\"col-md-4\">
                            ";
        // line 122
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["help_tienda"]) ? $context["help_tienda"] : $this->getContext($context, "help_tienda")), "nombre", []), 'widget');
        echo "
                        </div>
                    </div>

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\" for=\"radios\">Elige Opcion</label>
                        <div class=\"col-md-4\">
                            ";
        // line 130
        echo "                            ";
        // line 131
        echo "                            ";
        // line 132
        echo "                            ";
        // line 133
        echo "                            ";
        // line 134
        echo "                            ";
        // line 135
        echo "                            <div class=\"radio\">
                                <label for=\"radios-1\">
                                    <input type=\"radio\" name=\"help_choose\" id=\"help_choose_sop\" value=\"sopr\">
                                    Soporte
                                </label>
                            </div>
                        </div>
                    </div>

                    <div id=\"help_choose\" style=\"display: none\">

                        <div id=\"developing\" style=\"display: none\">
                            <div class=\"col-xs-5 col-md-6\">
                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"checkboxes\">Multiple Checkboxes</label>
                                    <div class=\"col-md-4\">
                                        <div class=\"checkbox\">
                                            <label for=\"checkboxes-0\">
                                                <input type=\"checkbox\" name=\"checkboxes\" id=\"checkboxes-0\" value=\"1\">
                                                Nuevo
                                            </label>
                                        </div>
                                        <div class=\"checkbox\">
                                            <label for=\"checkboxes-1\">
                                                <input type=\"checkbox\" name=\"checkboxes\" id=\"checkboxes-1\" value=\"2\">
                                                Error
                                            </label>
                                        </div>
                                        <div class=\"checkbox\">
                                            <label for=\"checkboxes-1\">
                                                <input type=\"checkbox\" name=\"checkboxes\" id=\"checkboxes-1\" value=\"2\">
                                                Mejora
                                            </label>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class=\"col-xs-2 col-md-6\">

                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"textarea\">Descripcion</label>
                                    <div class=\"col-xs-6 col-sm-6 col-md-7\">
                                        <textarea class=\"form-control\" id=\"textarea\" name=\"textarea\"></textarea>
                                    </div>
                                </div>

                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"textarea\">Proceso que Afecta</label>
                                    <div class=\"col-xs-6 col-sm-6 col-md-7\">
                                        <textarea class=\"form-control\" id=\"textarea\" name=\"textarea\"></textarea>
                                    </div>
                                </div>

                            </div>
                        </div>

                        <div id=\"support\" style=\"display: none\">
                            <div class=\"col-xs-5 col-md-6\">

                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"checkboxes\">Incidencias</label>
                                    <div class=\"col-md-6\" id=\"incidents\">

                                        ";
        // line 199
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["form_incidents"]) ? $context["form_incidents"] : $this->getContext($context, "form_incidents")), "name", []));
        foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
            // line 200
            echo "                                            <div class=\"checkbox\">
                                                ";
            // line 201
            echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($context["field"], 'widget');
            echo "
                                                ";
            // line 202
            echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($context["field"], 'label');
            echo "
                                            </div>
                                        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 205
        echo "
                                    </div>
                                </div>

                                <div class=\"form-group\">
                                    <div class=\"col-md-6\">
                                        <div class=\"input_checkbox\"></div>
                                    </div>
                                </div>

                            </div>

                            <div class=\"col-xs-2 col-sm-6\">
                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"textarea\">Descripcion</label>
                                    <div class=\"col-xs-6 col-sm-6 col-md-7\">
                                        ";
        // line 221
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["helpassistance"]) ? $context["helpassistance"] : $this->getContext($context, "helpassistance")), "descripcion", []), 'widget');
        echo "
                                    </div>
                                </div>

                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"checkboxes\">Prioridad</label>
                                    <div class=\"col-md-4\" id=\"service_level\">
                                        ";
        // line 228
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["form_priority"]) ? $context["form_priority"] : $this->getContext($context, "form_priority")), "name", []));
        foreach ($context['_seq'] as $context["_key"] => $context["priority"]) {
            // line 229
            echo "                                            <div class=\"checkbox\">
                                                ";
            // line 230
            echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($context["priority"], 'widget');
            echo "
                                                ";
            // line 231
            echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($context["priority"], 'label');
            echo "
                                            </div>
                                        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['priority'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 234
        echo "                                    </div>
                                </div>
                            </div>
                            
                            <div class=\"container\">
                                <div class=\"row\">
                                    <div class=\"center-block\"></div>
                                </div>

                                <div class=\"row\">
                                    <div class=\"col-md-6 brd\">
                                        <div class=\"center-block\">
                                            <form action=\"";
        // line 246
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getUrl("helpassistance_incidents_image");
        echo "\" class=\"dropzone\" id=\"mydropzone\">
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            ";
        // line 254
        echo "                            ";
        // line 255
        echo "                            ";
        // line 256
        echo "                            ";
        // line 257
        echo "                            ";
        // line 258
        echo "                        </div>
                    </div>

                    </form>

                    <form class=\"form-horizontal\">
                        <div class=\"form-group\">
                            <div class=\"col-md-12 text-center\">
                                <br>
                                <br>
                                <button type=\"button\" id=\"send_help\" name=\"\" class=\"btn btn-primary\">Enviar</button>
                            </div>
                        </div>
                    </form>
            </div>
        </div>

        <div class=\"right\">
            <div class=\"panel panel-primary\">
                <div class=\"panel-body\">
                    <h3 class=\"text-on-pannel text-primary\">
                        <strong class=\"text-uppercase\">
                            Usuario
                        </strong>
                    </h3>
                </div>

                <form id=\"form\" method=\"post\" class=\"form-horizontal\">

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\"
                               for=\"textinput\"> ";
        // line 289
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["employe"]) ? $context["employe"] : $this->getContext($context, "employe")), "empfullname", []), 'label', ["label" => "Name"]);
        echo "</label>
                        <div class=\"col-md-6\">
                            ";
        // line 291
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["employe"]) ? $context["employe"] : $this->getContext($context, "employe")), "empfullname", []), 'widget');
        echo "
                        </div>
                    </div>

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\"
                               for=\"textinput\"> ";
        // line 297
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["employe"]) ? $context["employe"] : $this->getContext($context, "employe")), "employeePasswd", []), 'label', ["label" => "Password"]);
        echo "</label>
                        <div class=\"col-md-6\">
                            ";
        // line 299
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\FormExtension')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["employe"]) ? $context["employe"] : $this->getContext($context, "employe")), "employeePasswd", []), 'widget');
        echo "
                        </div>
                    </div>

                    <div class=\"form-group\">
                        <div class=\"col-md-offset-2 text-center\">
                            <a class=\"btn btn-primary\" id=\"submit_help\">Enviar</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>

        <div class=\"left\">
            ";
        // line 314
        echo "            ";
        // line 315
        echo "            ";
        // line 316
        echo "            ";
        // line 317
        echo "            ";
        // line 318
        echo "            ";
        // line 319
        echo "            ";
        // line 320
        echo "
            ";
        // line 322
        echo "            ";
        // line 323
        echo "            ";
        // line 324
        echo "            ";
        // line 325
        echo "            ";
        // line 326
        echo "            ";
        // line 327
        echo "            ";
        // line 328
        echo "            ";
        // line 329
        echo "            ";
        // line 330
        echo "
            <div id=\"table_list\"></div>
        </div>
    </div>

    <input type=\"hidden\" id=\"id_image_help\">

    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.4.0/min/dropzone.min.js\"></script>

    <script type=\"text/javascript\">

        Dropzone.autoDiscover = false;
        const myDropzone = new Dropzone('#mydropzone', {
            uploadMultiple: true,
            parallelUploads: 3,
            maxFilesize: 5,
            acceptedFiles: \".jpeg,.jpg,.png,.gif\",
            addRemoveLinks: true,
            maxFiles: 4,
            dictMaxFilesExceeded: \"You can only upload upto 1 images\",
            clickable: true,
            dictDefaultMessage: \"Sube las imagenes aqui\",
            autoProcessQueue: false,
            params: {
                id_image_help: \$('#id_image_help').val()
            },
            showLoaderOnConfirm: true,
            init: function init() {

                this.on(\"sending\", function (file, xhr, data) {
                    data.append(\"id_image_help\", \$('#id_image_help').val());
                    data.append(\"id_user\", \$('#backendbundle_employees_empfullname').val())
                });

                this.on('success', function (file, response) {
                    console.log(response)
                })
            }
        });

        // Dropzone.options.mydropzone = {
        //     uploadMultiple:true,
        //     parallelUploads: 3,
        //     maxFilesize: 5,
        //     acceptedFiles: \".jpeg,.jpg,.png,.gif\",
        //     addRemoveLinks: true,
        //     maxFiles: 4,
        //     dictMaxFilesExceeded: \"You can only upload upto 1 images\",
        //     clickable: true,
        //     dictDefaultMessage: \"Sube las imagenes aqui\",
        //     autoProcessQueue: false,
        //     params: {
        //         new_value: 'value'
        //     },
        //     showLoaderOnConfirm: true,
        //
        //     init: function init() {
        //         // this.on('error', function () {
        //         //     alert(\"Error al subir el archivo\")
        //         // })
        //
        //         // this.on('success', function (data, xhr) {
        //         //     console.log(data);
        //         // });
        //     }
        // };

    </script>
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 400
    public function block_javascripts($context, array $blocks = [])
    {
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));

        // line 401
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
    <script type=\"text/javascript\">

        \$(document).ready(function () {

            \$(function () {
                \$('#helpdesk *').prop('disabled', true);
            });

            /**
             * @return {string}
             */
            function GetTodayDate() {
                var tdate = new Date();
                var dd = tdate.getDate();
                var MM = tdate.getMonth();
                var yyyy = tdate.getFullYear();
                var hh = tdate.getHours();
                var mn = tdate.getMinutes();
                var sg = tdate.getSeconds();
                return yyyy + \"-\" + (MM + 1) + \"-\" + dd + \" \" + hh + ':' + mn + ':' + sg;
            }

            \$(\"input[name='help_choose']\").change(function () {
                \$('#help_choose').css('display', 'block');

                if (\$(this).val() === 'des') {
                    \$('#developing').css('display', 'block');
                    \$('#support').css('display', 'none');
                } else if (\$(this).val() === 'sopr') {
                    \$('#support').css('display', 'block');
                    \$('#developing').css('display', 'none');
                }
            });

            \$('#incidents input[type=\"checkbox\"]').click(function () {

                if (\$(this).is(':checked')) {
                    validate(\$(this).val());
                    \$(\".input_checkbox\").show();

                    \$.ajax(
                        {
                            url: '";
        // line 444
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getUrl("helpassistance_incidents");
        echo "',
                            dataType: 'json',
                            data: {'idaplicacion': \$(this).val()},
                            success: function (data) {
                                var input_checkbox = JSON.parse(data.incidents);

                                var html = \"\";
                                for (let i = 0; i < input_checkbox.length; i++) {
                                    var input = input_checkbox[i];

                                    html += '<input type=\"checkbox\" value=\"' + input.idHelpIncidents + '\"><label>' + input.name + '</label>';
                                }

                                \$('.input_checkbox').html(html);
                            }
                        });
                }

                if (\$(this).is(':not(:checked)')) {
                    validate(0);
                    \$(\".input_checkbox\").hide()
                }
            });

            function validate(val) {
                \$('#incidents input[type=\"checkbox\"]').each(function () {

                    if (val == 0) {
                        \$(this).parent().each(function () {
                            \$(this).css(\"display\", \"block\");
                        })
                    } else if (\$(this).val() != val) {

                        \$(this).parent().each(function () {
                            \$(this).css(\"display\", \"none\");
                        })
                    }
                })
            }

            \$('#backendbundle_employees_employeePasswd').keypress(function (e) {
                if (e.which == 13) {
                    \$('#submit_help').click();
                    return false;
                }
            });

            if (\$('#backendbundle_employees_empfullname').focus().select()) {
                var user_cmda = localStorage.getItem(\"user_cmda\");
                \$('#backendbundle_employees_empfullname').val(user_cmda)
            }

            \$('#submit_help').click(function () {

                let pass_employee = \$('#backendbundle_employees_employeePasswd').val();
                let employeselect = \$('#backendbundle_employees_empfullname').val();
                let emplofullname = \$(\"#backendbundle_employees_empfullname option:selected\").text();

                if (!pass_employee == null || !pass_employee == '' && !employeselect == null || !employeselect == '') {

                    \$.ajax(
                        {
                            url: '";
        // line 506
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getUrl("timeclock_listemployee");
        echo "',
                            data:
                                {
                                    'employeselect': employeselect,
                                    'emplofullname': emplofullname,
                                    'employepassword': pass_employee
                                },
                            success: function (data) {
                                if (data.hasOwnProperty(\"response\") && data.response === \"success\") {
                                    let employees = JSON.parse(data.employees);
                                    let pass = JSON.parse(data.datasvalidation);
                                    let empfullname = JSON.parse(data.empfullname);
                                    let employeePasswd = JSON.parse(data.employeePasswd);
                                    let id_employee = JSON.parse(data.id_employee);

                                    var count_user = 1;

                                    for (passw in pass) {

                                        let count_users = count_user++;
                                        if (pass['empfullname'] === empfullname && pass['employeePasswd'] === employeePasswd) {

                                            if (count_users == 1) {
                                                if (localStorage.getItem(\"user_cmda\") == null || localStorage.getItem(\"user_cmda\") != employeselect) {
                                                    if (confirm('Deseas Guardar tu usuario en el Navegador')) {
                                                        localStorage.setItem(\"user_cmda\", employeselect);
                                                    }
                                                }
                                            }

                                            \$('#appbundle_helpassistance_idUserAssigned').val(empfullname).attr('data-id_employee', employeselect);

                                            \$('#date_person').val(GetTodayDate());

                                            \$('#helpdesk *').prop('disabled', false);

                                            if (count_users == 1) {

                                                \$.ajax({
                                                    url: '";
        // line 545
        echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getUrl("helpassistance_new");
        echo "',
                                                    data: {'id_employee': employeselect},
                                                    success: function (datas) {
                                                        var html = \"\";
                                                        html += '<table class=\"table\" id=\"mytable\">';
                                                        html += '<thead>';
                                                        html += '<tr>';
                                                        html += '<th style=\"font-weight: bold;color: red\">ID Radicado</th>';
                                                        html += '<th>Usuario</th>';
                                                        html += '<th>Descripcion</th>';
                                                        html += '<th id=\"encuesta\">Encuesta</th>';
                                                        html += '<th>Estado</th>';
                                                        html += '<th>Creado En</th>';
                                                        html += '</tr>';
                                                        html += '</thead>';
                                                        html += '<tbody>';
                                                        var list_help = JSON.parse(datas.columnName);

                                                        for (list in list_help) {
                                                            var list_table = list_help[list][0];

                                                            html += '<tr>';
                                                            html += '<td style=\"font-weight: bold;\">' + list_table['id_solicitud'] + '</td>';
                                                            html += '<td>' + list_table['registrado_por'] + '</td>';
                                                            html += '<td>' + list_table['descripcion'] + '</td>';
                                                            
                                                            html += '<td>';
                                                            if (list_table['id_estado'] == 9) {
                                                                
                                                                html += '<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSc5KQESy7-jzLcbcoaNRr_8HfXmD_n_Jf1XNpGC1TRCKPTMLg/viewform?usp=pp_url&entry.1927905379='+list_table['id_solicitud']+'&entry.504733861='+list_table['descripcion']+'\" target=\"_blank\">Encuesta de Satisfaccion</a>';
                                                            }
                                                            html += '</td>';
                                                            
                                                            html += '<td>' + list_table['estado'] + '</td>';
                                                            html += '<td>' + list_table['created_at'] + '</td>';
                                                            html += '</tr>';
                                                        }

                                                        html += '</tbody>';
                                                        html += '</table>';

                                                        \$('#table_list').html(html)
                                                    }
                                                })
                                            }
                                        } else {
                                            if (count_users == 1) {
                                                alert(\"Datos Invalidos\")
                                            }
                                        }
                                    }
                                }
                            },
                            dataType: 'json',
                        })
                }
            });

            \$('#send_help').click(function (evt) {
                evt.preventDefault();


                if (\$('#another_person_affec').is(\":checked\")) {
                    if (\$('#other_appbundle_helpassistance_idUserAssigned').val().trim() == '') {
                        alert('Por favor seleccione un usuario');
                        return false
                    }
                }

                if (\$('#appbundle_tienda_nombre').val() !== '') {

                    if (\$('input[name=\"help_choose\"]:radio').is(':checked')) {

                        if (\$('#appbundle_helpassistance_descripcion').val().length > 0) {
                            var id_employee = \$('#another_person_affec').is(':checked') ? \$('#other_appbundle_helpassistance_idUserAssigned').val() : \$('#appbundle_helpassistance_idUserAssigned').attr('data-id_employee');

                            var id_service_level = '';
                            \$('#service_level :checkbox:checked').each(function (i) {
                                id_service_level = \$(this).val();
                            });

                            var description = \$('#appbundle_helpassistance_descripcion').val();
                            var tienda = \$('#appbundle_tienda_nombre').val();

                            \$.ajax({
                                dataType: 'json',
                                data: {
                                    'id_employee': id_employee,
                                    'id_service_level': id_service_level,
                                    'description': description,
                                    'id_tienda': tienda
                                },
                                success: function (data) {

                                    var response = JSON.parse(data.id_solicitud);
                                    \$('#id_image_help').val(response);

                                    swal({
                                        title: \"Estas seguro?\",
                                        icon: \"warning\",
                                        buttons: [
                                            'No, cancelalo!',
                                            'Sí, estoy seguro!'
                                        ],
                                        dangerMode: true,
                                    }).then(function (isConfirm) {
                                        if (isConfirm) {
                                            swal({
                                                text: 'Help enviado satisfactoriamente!',
                                                icon: 'success'
                                            }).then(function () {
                                                const acceptedFiles = myDropzone.getAcceptedFiles();
                                                for (let i = 0; i < acceptedFiles.length; i++) {
                                                    myDropzone.processFile(acceptedFiles[i]);
                                                }

                                                window.location.reload()
                                            });
                                        } else {
                                            swal(\"Cancelado\", \"\", \"error\");
                                        }
                                    });


                                }
                            });
                        } else {
                            alert(\"La descripcion no puede estar vacia\")
                        }

                    } else {
                        alert(\"Escoge una opcion\")
                    }
                } else {
                    alert(\"Debe seleccionar la tienda\")
                }
            });

            ";
        // line 684
        echo "            ";
        // line 685
        echo "            ";
        // line 686
        echo "            ";
        // line 687
        echo "            ";
        // line 688
        echo "            ";
        // line 689
        echo "            ";
        // line 690
        echo "            ";
        // line 691
        echo "            ";
        // line 692
        echo "            ";
        // line 693
        echo "            ";
        // line 694
        echo "            ";
        // line 695
        echo "            ";
        // line 696
        echo "            ";
        // line 697
        echo "            ";
        // line 698
        echo "            ";
        // line 699
        echo "            ";
        // line 700
        echo "            ";
        // line 701
        echo "            ";
        // line 702
        echo "            ";
        // line 703
        echo "            ";
        // line 704
        echo "            ";
        // line 705
        echo "            ";
        // line 706
        echo "
            \$('#searchByDescription').keyup(function () {
                dataTable.draw();
            });

            \$('#another_person_affec').click(function () {
                if (\$(this).is(':checked')) {
                    \$('#appbundle_helpassistance_idUserAssigned').css(\"display\", \"none\");
                    \$('#other_person_affect').html(\$('#backendbundle_employees_empfullname').clone().attr('id', 'other_appbundle_helpassistance_idUserAssigned'))

                } else {
                    \$('#appbundle_helpassistance_idUserAssigned').css(\"display\", \"block\");

                    \$('#other_person_affect').html('')
                }
            })

        });
    </script>
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    public function getTemplateName()
    {
        return "@App/help/helpassistance/index.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  889 => 706,  887 => 705,  885 => 704,  883 => 703,  881 => 702,  879 => 701,  877 => 700,  875 => 699,  873 => 698,  871 => 697,  869 => 696,  867 => 695,  865 => 694,  863 => 693,  861 => 692,  859 => 691,  857 => 690,  855 => 689,  853 => 688,  851 => 687,  849 => 686,  847 => 685,  845 => 684,  704 => 545,  662 => 506,  597 => 444,  550 => 401,  544 => 400,  469 => 330,  467 => 329,  465 => 328,  463 => 327,  461 => 326,  459 => 325,  457 => 324,  455 => 323,  453 => 322,  450 => 320,  448 => 319,  446 => 318,  444 => 317,  442 => 316,  440 => 315,  438 => 314,  421 => 299,  416 => 297,  407 => 291,  402 => 289,  369 => 258,  367 => 257,  365 => 256,  363 => 255,  361 => 254,  351 => 246,  337 => 234,  328 => 231,  324 => 230,  321 => 229,  317 => 228,  307 => 221,  289 => 205,  280 => 202,  276 => 201,  273 => 200,  269 => 199,  203 => 135,  201 => 134,  199 => 133,  197 => 132,  195 => 131,  193 => 130,  183 => 122,  156 => 98,  150 => 94,  148 => 93,  146 => 92,  144 => 91,  142 => 90,  140 => 89,  138 => 88,  52 => 3,  46 => 2,  22 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Source("{% extends \"@App/Layouts/layout.html.twig\" %}
{% block content %}
    <link href=\"//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css\" rel=\"stylesheet\" id=\"bootstrap-css\">
    <link href='https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css' rel='stylesheet' type='text/css'>
    <script src=\"https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js\"></script>

    <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.4.0/min/dropzone.min.css\"/>

    <style type=\"text/css\">
        .text-on-pannel {
            background: #fff none repeat scroll 0 0;
            height: auto;
            margin-right: 20px;
            padding: 2px 4px;
            position: absolute;
            margin-top: -47px;
            border: 1px solid #337ab7;
            border-radius: 8px;
        }

        .panel-body {
            padding-top: 30px !important;
        }

        .left {
            padding-left: 10px;
            padding-top: 10px;
            margin-left: 57px;
            float: left;
            width: 60%;
            height: auto;
        }

        .right {
            padding-top: 10px;
            padding-left: 10px;
            margin-left: 10px;

            float: right;
            width: 34%;
            height: auto;
        }

        .box2 {
            width: 300px;
            margin: 50px auto;
            border: 3px solid #337ab7;
            padding: 20px;
            text-align: center;
            font-weight: 900;
            position: relative;
        }

        .sb9:before {
            content: \"\";
            position: absolute;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-top: 10px solid #337ab7;
            border-bottom: 10px solid transparent;
            right: 50%;
            bottom: -23px;
        }

        thead input {
            width: 100%;
        }

    </style>

    <div class=\"container\">

        <div class=\"left\">
            <div class=\"panel panel-primary\" id=\"helpdesk\">
                <div class=\"panel-body\">
                    <h3 class=\"text-on-pannel text-primary\"><strong class=\"text-uppercase col-md-6 col-md-offset-3\">
                            Formato
                            Requerimiento
                            Sistemas </strong>
                    </h3>
                </div>

                <br>
                <br>
                <for class=\"form-horizontal\">

                    {#                    <div class=\"form-group\">#}
                    {#                        <label class=\"col-md-4 control-label\" for=\"textinput\">Departamento Solicitante</label>#}
                    {#                        <div class=\"col-md-4\">#}
                    {#                            <input id=\"textinput\" name=\"textinput\" type=\"text\" placeholder=\"\"#}
                    {#                                   class=\"form-control input-md\">#}
                    {#                        </div>#}
                    {#                    </div>#}

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\" for=\"textinput\">Persona Afectada</label>
                        <div class=\"col-md-4\">
                            {{ form_widget(helpassistance.idUserAssigned) }}
                        </div>
                        <div class=\"checkbox\">
                            <div id=\"other_person_affect\" class=\"col-md-4\"></div>
                            <label class=\"checkbox-bootstrap\">
                                <input type=\"checkbox\" id=\"another_person_affec\">
                                <span class=\"checkbox-placeholder\"></span>
                                Otro
                            </label>
                        </div>

                    </div>

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\" for=\"textinput\">Fecha</label>
                        <div class=\"col-md-4\">
                            <input id=\"date_person\" name=\"date_person\" type=\"text\" class=\"form-control input-md\"
                                   readonly>
                        </div>
                    </div>

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\" for=\"textinput\">Escoge tienda</label>
                        <div class=\"col-md-4\">
                            {{ form_widget(help_tienda.nombre) }}
                        </div>
                    </div>

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\" for=\"radios\">Elige Opcion</label>
                        <div class=\"col-md-4\">
                            {#                            <div class=\"radio\">#}
                            {#                                <label for=\"radios-0\">#}
                            {#                                    <input type=\"radio\" name=\"help_choose\" id=\"help_choose_des\" value=\"des\">#}
                            {#                                    Desarrollo#}
                            {#                                </label>#}
                            {#                            </div>#}
                            <div class=\"radio\">
                                <label for=\"radios-1\">
                                    <input type=\"radio\" name=\"help_choose\" id=\"help_choose_sop\" value=\"sopr\">
                                    Soporte
                                </label>
                            </div>
                        </div>
                    </div>

                    <div id=\"help_choose\" style=\"display: none\">

                        <div id=\"developing\" style=\"display: none\">
                            <div class=\"col-xs-5 col-md-6\">
                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"checkboxes\">Multiple Checkboxes</label>
                                    <div class=\"col-md-4\">
                                        <div class=\"checkbox\">
                                            <label for=\"checkboxes-0\">
                                                <input type=\"checkbox\" name=\"checkboxes\" id=\"checkboxes-0\" value=\"1\">
                                                Nuevo
                                            </label>
                                        </div>
                                        <div class=\"checkbox\">
                                            <label for=\"checkboxes-1\">
                                                <input type=\"checkbox\" name=\"checkboxes\" id=\"checkboxes-1\" value=\"2\">
                                                Error
                                            </label>
                                        </div>
                                        <div class=\"checkbox\">
                                            <label for=\"checkboxes-1\">
                                                <input type=\"checkbox\" name=\"checkboxes\" id=\"checkboxes-1\" value=\"2\">
                                                Mejora
                                            </label>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class=\"col-xs-2 col-md-6\">

                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"textarea\">Descripcion</label>
                                    <div class=\"col-xs-6 col-sm-6 col-md-7\">
                                        <textarea class=\"form-control\" id=\"textarea\" name=\"textarea\"></textarea>
                                    </div>
                                </div>

                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"textarea\">Proceso que Afecta</label>
                                    <div class=\"col-xs-6 col-sm-6 col-md-7\">
                                        <textarea class=\"form-control\" id=\"textarea\" name=\"textarea\"></textarea>
                                    </div>
                                </div>

                            </div>
                        </div>

                        <div id=\"support\" style=\"display: none\">
                            <div class=\"col-xs-5 col-md-6\">

                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"checkboxes\">Incidencias</label>
                                    <div class=\"col-md-6\" id=\"incidents\">

                                        {% for field in form_incidents.name %}
                                            <div class=\"checkbox\">
                                                {{ form_widget(field) }}
                                                {{ form_label(field) }}
                                            </div>
                                        {% endfor %}

                                    </div>
                                </div>

                                <div class=\"form-group\">
                                    <div class=\"col-md-6\">
                                        <div class=\"input_checkbox\"></div>
                                    </div>
                                </div>

                            </div>

                            <div class=\"col-xs-2 col-sm-6\">
                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"textarea\">Descripcion</label>
                                    <div class=\"col-xs-6 col-sm-6 col-md-7\">
                                        {{ form_widget(helpassistance.descripcion) }}
                                    </div>
                                </div>

                                <div class=\"form-group\">
                                    <label class=\"col-md-4 control-label\" for=\"checkboxes\">Prioridad</label>
                                    <div class=\"col-md-4\" id=\"service_level\">
                                        {% for priority in form_priority.name %}
                                            <div class=\"checkbox\">
                                                {{ form_widget(priority) }}
                                                {{ form_label(priority) }}
                                            </div>
                                        {% endfor %}
                                    </div>
                                </div>
                            </div>
                            
                            <div class=\"container\">
                                <div class=\"row\">
                                    <div class=\"center-block\"></div>
                                </div>

                                <div class=\"row\">
                                    <div class=\"col-md-6 brd\">
                                        <div class=\"center-block\">
                                            <form action=\"{{ url('helpassistance_incidents_image') }}\" class=\"dropzone\" id=\"mydropzone\">
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            {#<div class=\"col-md-8 col-md-offset-2\">#}
                            {#    <form action=\"{{ url('helpassistance_incidents_image') }}\" class=\"dropzone\"#}
                            {#          id=\"mydropzone\">#}
                            {#    </form>#}
                            {#</div>#}
                        </div>
                    </div>

                    </form>

                    <form class=\"form-horizontal\">
                        <div class=\"form-group\">
                            <div class=\"col-md-12 text-center\">
                                <br>
                                <br>
                                <button type=\"button\" id=\"send_help\" name=\"\" class=\"btn btn-primary\">Enviar</button>
                            </div>
                        </div>
                    </form>
            </div>
        </div>

        <div class=\"right\">
            <div class=\"panel panel-primary\">
                <div class=\"panel-body\">
                    <h3 class=\"text-on-pannel text-primary\">
                        <strong class=\"text-uppercase\">
                            Usuario
                        </strong>
                    </h3>
                </div>

                <form id=\"form\" method=\"post\" class=\"form-horizontal\">

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\"
                               for=\"textinput\"> {{ form_label(employe.empfullname,'Name') }}</label>
                        <div class=\"col-md-6\">
                            {{ form_widget(employe.empfullname) }}
                        </div>
                    </div>

                    <div class=\"form-group\">
                        <label class=\"col-md-4 control-label\"
                               for=\"textinput\"> {{ form_label(employe.employeePasswd,'Password') }}</label>
                        <div class=\"col-md-6\">
                            {{ form_widget(employe.employeePasswd) }}
                        </div>
                    </div>

                    <div class=\"form-group\">
                        <div class=\"col-md-offset-2 text-center\">
                            <a class=\"btn btn-primary\" id=\"submit_help\">Enviar</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>

        <div class=\"left\">
            {#            <table>#}
            {#                <tr>#}
            {#                    <td>#}
            {#                        <input type='text' id='searchByDescription' placeholder='Busca la descripcion'>#}
            {#                    </td>#}
            {#                </tr>#}
            {#            </table>#}

            {#            <table id='' class='table table-bordered'>#}
            {#                <thead>#}
            {#                <tr>#}
            {#                    <th>Usuario</th>#}
            {#                    <th>Descripcion</th>#}
            {#                    <th>Estado</th>#}
            {#                </tr>#}
            {#                </thead>#}
            {#            </table>#}

            <div id=\"table_list\"></div>
        </div>
    </div>

    <input type=\"hidden\" id=\"id_image_help\">

    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.4.0/min/dropzone.min.js\"></script>

    <script type=\"text/javascript\">

        Dropzone.autoDiscover = false;
        const myDropzone = new Dropzone('#mydropzone', {
            uploadMultiple: true,
            parallelUploads: 3,
            maxFilesize: 5,
            acceptedFiles: \".jpeg,.jpg,.png,.gif\",
            addRemoveLinks: true,
            maxFiles: 4,
            dictMaxFilesExceeded: \"You can only upload upto 1 images\",
            clickable: true,
            dictDefaultMessage: \"Sube las imagenes aqui\",
            autoProcessQueue: false,
            params: {
                id_image_help: \$('#id_image_help').val()
            },
            showLoaderOnConfirm: true,
            init: function init() {

                this.on(\"sending\", function (file, xhr, data) {
                    data.append(\"id_image_help\", \$('#id_image_help').val());
                    data.append(\"id_user\", \$('#backendbundle_employees_empfullname').val())
                });

                this.on('success', function (file, response) {
                    console.log(response)
                })
            }
        });

        // Dropzone.options.mydropzone = {
        //     uploadMultiple:true,
        //     parallelUploads: 3,
        //     maxFilesize: 5,
        //     acceptedFiles: \".jpeg,.jpg,.png,.gif\",
        //     addRemoveLinks: true,
        //     maxFiles: 4,
        //     dictMaxFilesExceeded: \"You can only upload upto 1 images\",
        //     clickable: true,
        //     dictDefaultMessage: \"Sube las imagenes aqui\",
        //     autoProcessQueue: false,
        //     params: {
        //         new_value: 'value'
        //     },
        //     showLoaderOnConfirm: true,
        //
        //     init: function init() {
        //         // this.on('error', function () {
        //         //     alert(\"Error al subir el archivo\")
        //         // })
        //
        //         // this.on('success', function (data, xhr) {
        //         //     console.log(data);
        //         // });
        //     }
        // };

    </script>
{% endblock %}

{% block javascripts %}
    {{ parent() }}
    <script type=\"text/javascript\">

        \$(document).ready(function () {

            \$(function () {
                \$('#helpdesk *').prop('disabled', true);
            });

            /**
             * @return {string}
             */
            function GetTodayDate() {
                var tdate = new Date();
                var dd = tdate.getDate();
                var MM = tdate.getMonth();
                var yyyy = tdate.getFullYear();
                var hh = tdate.getHours();
                var mn = tdate.getMinutes();
                var sg = tdate.getSeconds();
                return yyyy + \"-\" + (MM + 1) + \"-\" + dd + \" \" + hh + ':' + mn + ':' + sg;
            }

            \$(\"input[name='help_choose']\").change(function () {
                \$('#help_choose').css('display', 'block');

                if (\$(this).val() === 'des') {
                    \$('#developing').css('display', 'block');
                    \$('#support').css('display', 'none');
                } else if (\$(this).val() === 'sopr') {
                    \$('#support').css('display', 'block');
                    \$('#developing').css('display', 'none');
                }
            });

            \$('#incidents input[type=\"checkbox\"]').click(function () {

                if (\$(this).is(':checked')) {
                    validate(\$(this).val());
                    \$(\".input_checkbox\").show();

                    \$.ajax(
                        {
                            url: '{{ url('helpassistance_incidents') }}',
                            dataType: 'json',
                            data: {'idaplicacion': \$(this).val()},
                            success: function (data) {
                                var input_checkbox = JSON.parse(data.incidents);

                                var html = \"\";
                                for (let i = 0; i < input_checkbox.length; i++) {
                                    var input = input_checkbox[i];

                                    html += '<input type=\"checkbox\" value=\"' + input.idHelpIncidents + '\"><label>' + input.name + '</label>';
                                }

                                \$('.input_checkbox').html(html);
                            }
                        });
                }

                if (\$(this).is(':not(:checked)')) {
                    validate(0);
                    \$(\".input_checkbox\").hide()
                }
            });

            function validate(val) {
                \$('#incidents input[type=\"checkbox\"]').each(function () {

                    if (val == 0) {
                        \$(this).parent().each(function () {
                            \$(this).css(\"display\", \"block\");
                        })
                    } else if (\$(this).val() != val) {

                        \$(this).parent().each(function () {
                            \$(this).css(\"display\", \"none\");
                        })
                    }
                })
            }

            \$('#backendbundle_employees_employeePasswd').keypress(function (e) {
                if (e.which == 13) {
                    \$('#submit_help').click();
                    return false;
                }
            });

            if (\$('#backendbundle_employees_empfullname').focus().select()) {
                var user_cmda = localStorage.getItem(\"user_cmda\");
                \$('#backendbundle_employees_empfullname').val(user_cmda)
            }

            \$('#submit_help').click(function () {

                let pass_employee = \$('#backendbundle_employees_employeePasswd').val();
                let employeselect = \$('#backendbundle_employees_empfullname').val();
                let emplofullname = \$(\"#backendbundle_employees_empfullname option:selected\").text();

                if (!pass_employee == null || !pass_employee == '' && !employeselect == null || !employeselect == '') {

                    \$.ajax(
                        {
                            url: '{{ url('timeclock_listemployee') }}',
                            data:
                                {
                                    'employeselect': employeselect,
                                    'emplofullname': emplofullname,
                                    'employepassword': pass_employee
                                },
                            success: function (data) {
                                if (data.hasOwnProperty(\"response\") && data.response === \"success\") {
                                    let employees = JSON.parse(data.employees);
                                    let pass = JSON.parse(data.datasvalidation);
                                    let empfullname = JSON.parse(data.empfullname);
                                    let employeePasswd = JSON.parse(data.employeePasswd);
                                    let id_employee = JSON.parse(data.id_employee);

                                    var count_user = 1;

                                    for (passw in pass) {

                                        let count_users = count_user++;
                                        if (pass['empfullname'] === empfullname && pass['employeePasswd'] === employeePasswd) {

                                            if (count_users == 1) {
                                                if (localStorage.getItem(\"user_cmda\") == null || localStorage.getItem(\"user_cmda\") != employeselect) {
                                                    if (confirm('Deseas Guardar tu usuario en el Navegador')) {
                                                        localStorage.setItem(\"user_cmda\", employeselect);
                                                    }
                                                }
                                            }

                                            \$('#appbundle_helpassistance_idUserAssigned').val(empfullname).attr('data-id_employee', employeselect);

                                            \$('#date_person').val(GetTodayDate());

                                            \$('#helpdesk *').prop('disabled', false);

                                            if (count_users == 1) {

                                                \$.ajax({
                                                    url: '{{ url('helpassistance_new') }}',
                                                    data: {'id_employee': employeselect},
                                                    success: function (datas) {
                                                        var html = \"\";
                                                        html += '<table class=\"table\" id=\"mytable\">';
                                                        html += '<thead>';
                                                        html += '<tr>';
                                                        html += '<th style=\"font-weight: bold;color: red\">ID Radicado</th>';
                                                        html += '<th>Usuario</th>';
                                                        html += '<th>Descripcion</th>';
                                                        html += '<th id=\"encuesta\">Encuesta</th>';
                                                        html += '<th>Estado</th>';
                                                        html += '<th>Creado En</th>';
                                                        html += '</tr>';
                                                        html += '</thead>';
                                                        html += '<tbody>';
                                                        var list_help = JSON.parse(datas.columnName);

                                                        for (list in list_help) {
                                                            var list_table = list_help[list][0];

                                                            html += '<tr>';
                                                            html += '<td style=\"font-weight: bold;\">' + list_table['id_solicitud'] + '</td>';
                                                            html += '<td>' + list_table['registrado_por'] + '</td>';
                                                            html += '<td>' + list_table['descripcion'] + '</td>';
                                                            
                                                            html += '<td>';
                                                            if (list_table['id_estado'] == 9) {
                                                                
                                                                html += '<a href=\"https://docs.google.com/forms/d/e/1FAIpQLSc5KQESy7-jzLcbcoaNRr_8HfXmD_n_Jf1XNpGC1TRCKPTMLg/viewform?usp=pp_url&entry.1927905379='+list_table['id_solicitud']+'&entry.504733861='+list_table['descripcion']+'\" target=\"_blank\">Encuesta de Satisfaccion</a>';
                                                            }
                                                            html += '</td>';
                                                            
                                                            html += '<td>' + list_table['estado'] + '</td>';
                                                            html += '<td>' + list_table['created_at'] + '</td>';
                                                            html += '</tr>';
                                                        }

                                                        html += '</tbody>';
                                                        html += '</table>';

                                                        \$('#table_list').html(html)
                                                    }
                                                })
                                            }
                                        } else {
                                            if (count_users == 1) {
                                                alert(\"Datos Invalidos\")
                                            }
                                        }
                                    }
                                }
                            },
                            dataType: 'json',
                        })
                }
            });

            \$('#send_help').click(function (evt) {
                evt.preventDefault();


                if (\$('#another_person_affec').is(\":checked\")) {
                    if (\$('#other_appbundle_helpassistance_idUserAssigned').val().trim() == '') {
                        alert('Por favor seleccione un usuario');
                        return false
                    }
                }

                if (\$('#appbundle_tienda_nombre').val() !== '') {

                    if (\$('input[name=\"help_choose\"]:radio').is(':checked')) {

                        if (\$('#appbundle_helpassistance_descripcion').val().length > 0) {
                            var id_employee = \$('#another_person_affec').is(':checked') ? \$('#other_appbundle_helpassistance_idUserAssigned').val() : \$('#appbundle_helpassistance_idUserAssigned').attr('data-id_employee');

                            var id_service_level = '';
                            \$('#service_level :checkbox:checked').each(function (i) {
                                id_service_level = \$(this).val();
                            });

                            var description = \$('#appbundle_helpassistance_descripcion').val();
                            var tienda = \$('#appbundle_tienda_nombre').val();

                            \$.ajax({
                                dataType: 'json',
                                data: {
                                    'id_employee': id_employee,
                                    'id_service_level': id_service_level,
                                    'description': description,
                                    'id_tienda': tienda
                                },
                                success: function (data) {

                                    var response = JSON.parse(data.id_solicitud);
                                    \$('#id_image_help').val(response);

                                    swal({
                                        title: \"Estas seguro?\",
                                        icon: \"warning\",
                                        buttons: [
                                            'No, cancelalo!',
                                            'Sí, estoy seguro!'
                                        ],
                                        dangerMode: true,
                                    }).then(function (isConfirm) {
                                        if (isConfirm) {
                                            swal({
                                                text: 'Help enviado satisfactoriamente!',
                                                icon: 'success'
                                            }).then(function () {
                                                const acceptedFiles = myDropzone.getAcceptedFiles();
                                                for (let i = 0; i < acceptedFiles.length; i++) {
                                                    myDropzone.processFile(acceptedFiles[i]);
                                                }

                                                window.location.reload()
                                            });
                                        } else {
                                            swal(\"Cancelado\", \"\", \"error\");
                                        }
                                    });


                                }
                            });
                        } else {
                            alert(\"La descripcion no puede estar vacia\")
                        }

                    } else {
                        alert(\"Escoge una opcion\")
                    }
                } else {
                    alert(\"Debe seleccionar la tienda\")
                }
            });

            {#var dataTable = \$('#empTable').DataTable({#}
            {#    'processing': true,#}
            {#    'serverSide': true,#}
            {#    'serverMethod': 'POST',#}
            {#    \"ordering\": false,#}
            {#    \"searching\": false,#}
            {#    ajax:#}
            {#        {#}
            {#            url: '{{ url('helpassistance_new') }}',#}
            {#            data: function (data) {#}
            {#                data.searchByDescription = \$('#searchByDescription').val();#}
            {#                data.id_employee = \$('#appbundle_helpassistance_idUserAssigned').attr('data-id_employee');#}
            {#            },success:function (datas) {#}
            {#                var cl = datas.aaData#}
            {#                console.log(cl)#}
            {#            }#}
            {#        },#}
            {#    // 'columns': [#}
            {#    //     {data: 'employee'},#}
            {#    //     {data: 'descripcion'},#}
            {#    //     // {data: 'descripcion'},#}
            {#    // ]#}
            {#});#}

            \$('#searchByDescription').keyup(function () {
                dataTable.draw();
            });

            \$('#another_person_affec').click(function () {
                if (\$(this).is(':checked')) {
                    \$('#appbundle_helpassistance_idUserAssigned').css(\"display\", \"none\");
                    \$('#other_person_affect').html(\$('#backendbundle_employees_empfullname').clone().attr('id', 'other_appbundle_helpassistance_idUserAssigned'))

                } else {
                    \$('#appbundle_helpassistance_idUserAssigned').css(\"display\", \"block\");

                    \$('#other_person_affect').html('')
                }
            })

        });
    </script>
{% endblock %}
", "@App/help/helpassistance/index.html.twig", "/home/colmoda/public_html/CMDA/src/AppBundle/Resources/views/help/helpassistance/index.html.twig");
    }
}
