<?php

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

/* member/point_list.twig */
class __TwigTemplate_c877a21d0e77d09335dd49802829ba6253c0bbcfd19c9756d17689e28ca098f7 extends \Twig\Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo ($context["header"] ?? null);
        echo ($context["column_left"] ?? null);
        echo "
<div id=\"content\">
  <div class=\"page-header\">
    <div class=\"container-fluid\">
      <div class=\"pull-right\">
        <button type=\"button\" data-toggle=\"tooltip\" title=\"";
        // line 6
        echo ($context["button_filter"] ?? null);
        echo "\" onclick=\"\$('#filter-member-point').toggleClass('hidden-sm hidden-xs');\" class=\"btn btn-default hidden-md hidden-lg\"><i class=\"fa fa-filter\"></i></button>
        <button type=\"button\" id=\"button-export\" data-toggle=\"tooltip\" title=\"";
        // line 7
        echo ($context["button_export"] ?? null);
        echo "\" class=\"btn btn-info\" style=\"background-color: darkgreen;\"><i class=\"fa fa-file-excel-o\"></i></button>
      </div>
      <h1>";
        // line 9
        echo ($context["heading_title"] ?? null);
        echo "</h1>
      <ul class=\"breadcrumb\">
        ";
        // line 11
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["breadcrumbs"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["breadcrumb"]) {
            // line 12
            echo "        <li><a href=\"";
            echo twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "href", [], "any", false, false, false, 12);
            echo "\">";
            echo twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "text", [], "any", false, false, false, 12);
            echo "</a></li>
        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['breadcrumb'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 14
        echo "      </ul>
    </div>
  </div>
  <div class=\"container-fluid\">
    ";
        // line 18
        if (($context["error_warning"] ?? null)) {
            // line 19
            echo "    <div class=\"alert alert-danger alert-dismissible\"><i class=\"fa fa-exclamation-circle\"></i> ";
            echo ($context["error_warning"] ?? null);
            echo "
      <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>
    </div>
    ";
        }
        // line 23
        echo "    ";
        if (($context["success"] ?? null)) {
            // line 24
            echo "    <div class=\"alert alert-success alert-dismissible\"><i class=\"fa fa-check-circle\"></i> ";
            echo ($context["success"] ?? null);
            echo "
      <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>
    </div>
    ";
        }
        // line 28
        echo "    <div class=\"row\">
      <div id=\"filter-member-point\" class=\"col-md-3 col-md-push-9 col-sm-12 hidden-sm hidden-xs\">
        <div class=\"panel panel-default\">
          <div class=\"panel-heading\">
            <h3 class=\"panel-title\"><i class=\"fa fa-filter\"></i> ";
        // line 32
        echo ($context["text_filter"] ?? null);
        echo "</h3>
          </div>
          <div class=\"panel-body\">
            <div class=\"form-group\">
              <label class=\"control-label\" for=\"input-email\">";
        // line 36
        echo ($context["entry_email"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_email\" value=\"";
        // line 37
        echo ($context["filter_email"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_email"] ?? null);
        echo "\" id=\"input-email\" class=\"form-control\" />
            </div>
             <div class=\"form-group\">
              <label class=\"control-label\" for=\"input-phone_no\">";
        // line 40
        echo ($context["entry_phone_no"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_phone_no\" value=\"";
        // line 41
        echo ($context["filter_phone_no"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_phone_no"] ?? null);
        echo "\" id=\"input-phone_no\" class=\"form-control\" />
            </div>
            <div class=\"form-group text-right\">
              <button type=\"button\" id=\"button-filter\" class=\"btn btn-default\"><i class=\"fa fa-filter\"></i> ";
        // line 44
        echo ($context["button_filter"] ?? null);
        echo "</button>
            </div>
          </div>
        </div>
      </div>
    <div class=\"col-md-9 col-md-pull-3 col-sm-12\">
      <div class=\"panel panel-default\">
        <div class=\"panel-heading\">
          <h3 class=\"panel-title\"><i class=\"fa fa-list\"></i> ";
        // line 52
        echo ($context["text_list"] ?? null);
        echo "</h3>
        </div>
        <div class=\"panel-body\">
          <form action=\"";
        // line 55
        echo ($context["delete"] ?? null);
        echo "\" method=\"post\" enctype=\"multipart/form-data\" id=\"form-member-reward\">
            <div class=\"table-responsive\">
              <table id=\"tbl-tier\" class=\"table table-bordered table-hover\">
                <thead>
                  <tr>
                    <td class=\"text-left\">";
        // line 60
        echo ($context["column_email"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 61
        echo ($context["column_phone_no"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 62
        echo ($context["column_order_no"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 63
        echo ($context["column_regular_price_amount"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 64
        echo ($context["column_sales_price_amount"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 65
        if ((($context["sort"] ?? null) == "point")) {
            // line 66
            echo "                      <a href=\"";
            echo ($context["sort_point"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_point"] ?? null);
            echo "</a>
                      ";
        } else {
            // line 68
            echo "                      <a href=\"";
            echo ($context["sort_point"] ?? null);
            echo "\">";
            echo ($context["column_point"] ?? null);
            echo "</a>
                      ";
        }
        // line 69
        echo "</td>
                    <td class=\"text-left\">";
        // line 70
        if ((($context["sort"] ?? null) == "expiry_date")) {
            // line 71
            echo "                      <a href=\"";
            echo ($context["sort_expiry_date"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_expiry_date"] ?? null);
            echo "</a>
                      ";
        } else {
            // line 73
            echo "                      <a href=\"";
            echo ($context["sort_expiry_date"] ?? null);
            echo "\">";
            echo ($context["column_expiry_date"] ?? null);
            echo "</a>
                      ";
        }
        // line 74
        echo "</td>
                    <td class=\"text-left\">";
        // line 75
        if ((($context["sort"] ?? null) == "available_point")) {
            // line 76
            echo "                    <a href=\"";
            echo ($context["sort_available_point"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_available_point"] ?? null);
            echo "</a>
                      ";
        } else {
            // line 78
            echo "                      <a href=\"";
            echo ($context["sort_available_point"] ?? null);
            echo "\">";
            echo ($context["column_available_point"] ?? null);
            echo "</a>
                      ";
        }
        // line 79
        echo "</td>
                    <td class=\"text-left\">";
        // line 80
        echo ($context["column_used_point"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 81
        echo ($context["column_expired_point"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 82
        echo ($context["column_is_cancelled"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 83
        if ((($context["sort"] ?? null) == "date_added")) {
            // line 84
            echo "                      <a href=\"";
            echo ($context["sort_date_added"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_date_added"] ?? null);
            echo "</a>
                      ";
        } else {
            // line 86
            echo "                      <a href=\"";
            echo ($context["sort_date_added"] ?? null);
            echo "\">";
            echo ($context["column_date_added"] ?? null);
            echo "</a>
                      ";
        }
        // line 87
        echo "</td>
                    <td class=\"text-right\">";
        // line 88
        echo ($context["column_action"] ?? null);
        echo "</td>
                  </tr>
                </thead>
                <tbody>
                  ";
        // line 92
        if (($context["member_points"] ?? null)) {
            // line 93
            echo "                  ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["member_points"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["member_point"]) {
                // line 94
                echo "                  <tr>
                    <td class=\"text-left\" >";
                // line 95
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "email", [], "any", false, false, false, 95);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 96
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "phone_no", [], "any", false, false, false, 96);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 97
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "order_no", [], "any", false, false, false, 97);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 98
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "regular_price_amount", [], "any", false, false, false, 98);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 99
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "sales_price_amount", [], "any", false, false, false, 99);
                echo "</td>
                    <td class=\"text-left\">";
                // line 100
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "point", [], "any", false, false, false, 100);
                echo "</td>
                    <td class=\"text-left\">";
                // line 101
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "expiry_date", [], "any", false, false, false, 101);
                echo "</td>
                    <td class=\"text-left\">";
                // line 102
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "available_point", [], "any", false, false, false, 102);
                echo "</td>
                    <td class=\"text-left\">";
                // line 103
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "used_point", [], "any", false, false, false, 103);
                echo "</td>
                    <td class=\"text-left\">";
                // line 104
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "expired_point", [], "any", false, false, false, 104);
                echo "</td>
                    <td class=\"text-left\">";
                // line 105
                echo ((twig_get_attribute($this->env, $this->source, $context["member_point"], "is_cancelled", [], "any", false, false, false, 105)) ? (($context["text_yes"] ?? null)) : (($context["text_no"] ?? null)));
                echo "</td>
                    <td class=\"text-left\">";
                // line 106
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "date_added", [], "any", false, false, false, 106);
                echo "</td>
                    <td class=\"text-right\"><a href=\"";
                // line 107
                echo twig_get_attribute($this->env, $this->source, $context["member_point"], "edit", [], "any", false, false, false, 107);
                echo "\" data-toggle=\"tooltip\" title=\"";
                echo ($context["button_edit"] ?? null);
                echo "\" class=\"btn btn-primary\"><i class=\"fa fa-pencil\"></i></a></td>
                  </tr>
                  ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['member_point'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 110
            echo "                  ";
        } else {
            // line 111
            echo "                  <tr>
                    <td class=\"text-center\" colspan=\"13\">";
            // line 112
            echo ($context["text_no_results"] ?? null);
            echo "</td>
                  </tr>
                  ";
        }
        // line 115
        echo "                </tbody>
              </table>
            </div>
          </form>
          <div class=\"row\">
            <div class=\"col-sm-6 text-left\">";
        // line 120
        echo ($context["pagination"] ?? null);
        echo "</div>
            <div class=\"col-sm-6 text-right\">";
        // line 121
        echo ($context["results"] ?? null);
        echo "</div>
          </div>
        </div>
      </div>
  </div>
  </div>
</div>
";
        // line 128
        echo ($context["footer"] ?? null);
        echo " 

<style>
#tbl-tier > tbody > tr > td {
    white-space: normal;
    word-wrap: break-word;
}

.row-fix-width
{
  max-width:100px;
}
</style>

<script type=\"text/javascript\"><!--
  \$('#button-filter').on('click', function() {
    url = 'index.php?route=member/point&user_token=";
        // line 144
        echo ($context["user_token"] ?? null);
        echo "';
    var filter_email = \$('input[name=\\'filter_email\\']').val();
    if (filter_email) {
      url += '&filter_email=' + encodeURIComponent(filter_email);
    }
    var filter_phone_no = \$('input[name=\\'filter_phone_no\\']').val();
    if (filter_phone_no) {
      url += '&filter_phone_no=' + encodeURIComponent(filter_phone_no);
    }
    location = url;
  });

 \$('#button-export').on('click', function() {
    url = 'index.php?route=member/point/export&user_token=";
        // line 157
        echo ($context["user_token"] ?? null);
        echo "';
    var filter_email = \$('input[name=\\'filter_email\\']').val();
    if (filter_email) {
      url += '&filter_email=' + encodeURIComponent(filter_email);
    }
    var filter_phone_no = \$('input[name=\\'filter_phone_no\\']').val();
    if (filter_phone_no) {
      url += '&filter_phone_no=' + encodeURIComponent(filter_phone_no);
    }
    location = url;
  });
  //--></script>
  <script type=\"text/javascript\"><!--
  \$('.date').datetimepicker({
    language: '";
        // line 171
        echo ($context["datepicker"] ?? null);
        echo "',
    pickTime: false
  });
  //--></script>";
    }

    public function getTemplateName()
    {
        return "member/point_list.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  449 => 171,  432 => 157,  416 => 144,  397 => 128,  387 => 121,  383 => 120,  376 => 115,  370 => 112,  367 => 111,  364 => 110,  353 => 107,  349 => 106,  345 => 105,  341 => 104,  337 => 103,  333 => 102,  329 => 101,  325 => 100,  321 => 99,  317 => 98,  313 => 97,  309 => 96,  305 => 95,  302 => 94,  297 => 93,  295 => 92,  288 => 88,  285 => 87,  277 => 86,  267 => 84,  265 => 83,  261 => 82,  257 => 81,  253 => 80,  250 => 79,  242 => 78,  232 => 76,  230 => 75,  227 => 74,  219 => 73,  209 => 71,  207 => 70,  204 => 69,  196 => 68,  186 => 66,  184 => 65,  180 => 64,  176 => 63,  172 => 62,  168 => 61,  164 => 60,  156 => 55,  150 => 52,  139 => 44,  131 => 41,  127 => 40,  119 => 37,  115 => 36,  108 => 32,  102 => 28,  94 => 24,  91 => 23,  83 => 19,  81 => 18,  75 => 14,  64 => 12,  60 => 11,  55 => 9,  50 => 7,  46 => 6,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "member/point_list.twig", "");
    }
}
