<?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/reward_list.twig */
class __TwigTemplate_1f9f184c7970402cb3d100569987ea44765022b974b695c8d9b47c8fd7e28eb7 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-reward').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-reward\" 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-reward_name\">";
        // line 36
        echo ($context["entry_reward_name"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_reward_name\" value=\"";
        // line 37
        echo ($context["filter_reward_name"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_reward_name"] ?? null);
        echo "\" id=\"input-reward_name\" class=\"form-control\" />
            </div>
            <div class=\"form-group\">
              <label class=\"control-label\" for=\"input-email\">";
        // line 40
        echo ($context["entry_email"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_email\" value=\"";
        // line 41
        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 44
        echo ($context["entry_phone_no"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_phone_no\" value=\"";
        // line 45
        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\">
              <label class=\"control-label\" for=\"input-is_cancelled\">";
        // line 48
        echo ($context["entry_cancelled"] ?? null);
        echo "</label>
              <select name=\"filter_is_cancelled\" id=\"input-is_cancelled\" class=\"form-control\">
                <option value=\"\"></option>
                ";
        // line 51
        if ((($context["filter_is_cancelled"] ?? null) == "1")) {
            // line 52
            echo "                <option value=\"1\" selected=\"selected\">";
            echo ($context["text_yes"] ?? null);
            echo "</option>
                ";
        } else {
            // line 54
            echo "                <option value=\"0\">";
            echo ($context["text_no"] ?? null);
            echo "</option>
                ";
        }
        // line 56
        echo "                ";
        if ((($context["filter_is_cancelled"] ?? null) == "0")) {
            // line 57
            echo "                <option value=\"0\" selected=\"selected\">";
            echo ($context["text_no"] ?? null);
            echo "</option>
                ";
        } else {
            // line 59
            echo "                <option value=\"1\">";
            echo ($context["text_yes"] ?? null);
            echo "</option>
                ";
        }
        // line 61
        echo "              </select>
            </div>
            <div class=\"form-group\">
              <label class=\"control-label\" for=\"input-is_redeemed\">";
        // line 64
        echo ($context["entry_redeemed"] ?? null);
        echo "</label>
              <select name=\"filter_is_redeemed\" id=\"input-is_redeemed\" class=\"form-control\">
                <option value=\"\"></option>
                ";
        // line 67
        if ((($context["filter_is_redeemed"] ?? null) == "1")) {
            // line 68
            echo "                <option value=\"1\" selected=\"selected\">";
            echo ($context["text_yes"] ?? null);
            echo "</option>
                ";
        } else {
            // line 70
            echo "                <option value=\"0\">";
            echo ($context["text_no"] ?? null);
            echo "</option>
                ";
        }
        // line 72
        echo "                ";
        if ((($context["filter_is_redeemed"] ?? null) == "0")) {
            // line 73
            echo "                <option value=\"0\" selected=\"selected\">";
            echo ($context["text_no"] ?? null);
            echo "</option>
                ";
        } else {
            // line 75
            echo "                <option value=\"1\">";
            echo ($context["text_yes"] ?? null);
            echo "</option>
                ";
        }
        // line 77
        echo "              </select>
            </div>
            <div class=\"form-group text-right\">
              <button type=\"button\" id=\"button-filter\" class=\"btn btn-default\"><i class=\"fa fa-filter\"></i> ";
        // line 80
        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 88
        echo ($context["text_list"] ?? null);
        echo "</h3>
        </div>
        <div class=\"panel-body\">
          <form action=\"";
        // line 91
        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 96
        echo ($context["column_email"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 97
        echo ($context["column_phone_no"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 98
        echo ($context["column_reward_name"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 99
        echo ($context["column_value"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 100
        echo ($context["column_used_point"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 101
        echo ($context["column_expiry_date"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 102
        if ((($context["sort"] ?? null) == "redemption_date")) {
            // line 103
            echo "                      <a href=\"";
            echo ($context["sort_redemption_date"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_redemption_date"] ?? null);
            echo "</a>
                      ";
        } else {
            // line 105
            echo "                      <a href=\"";
            echo ($context["sort_redemption_date"] ?? null);
            echo "\">";
            echo ($context["column_redemption_date"] ?? null);
            echo "</a>
                      ";
        }
        // line 106
        echo "</td>
                    <td class=\"text-left\">";
        // line 107
        echo ($context["column_is_redeemed"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 108
        echo ($context["column_order_no"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 109
        if ((($context["sort"] ?? null) == "date_added")) {
            // line 110
            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 112
            echo "                      <a href=\"";
            echo ($context["sort_date_added"] ?? null);
            echo "\">";
            echo ($context["column_date_added"] ?? null);
            echo "</a>
                      ";
        }
        // line 113
        echo "</td>
                    <td class=\"text-right\">";
        // line 114
        echo ($context["column_action"] ?? null);
        echo "</td>
                  </tr>
                </thead>
                <tbody>
                  ";
        // line 118
        if (($context["member_rewards"] ?? null)) {
            // line 119
            echo "                  ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["member_rewards"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["member_reward"]) {
                // line 120
                echo "                  <tr>
                    <td class=\"text-left\" >";
                // line 121
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "email", [], "any", false, false, false, 121);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 122
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "phone_no", [], "any", false, false, false, 122);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 123
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "reward_name", [], "any", false, false, false, 123);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 124
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "value", [], "any", false, false, false, 124);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 125
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "used_point", [], "any", false, false, false, 125);
                echo "</td>
                    <td class=\"text-left\">";
                // line 126
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "expiry_date", [], "any", false, false, false, 126);
                echo "</td>
                    <td class=\"text-left\">";
                // line 127
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "redemption_date", [], "any", false, false, false, 127);
                echo "</td>
                    <td class=\"text-left\">";
                // line 128
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "is_redeemed", [], "any", false, false, false, 128);
                echo "</td>
                    <td class=\"text-left\">";
                // line 129
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "order_no", [], "any", false, false, false, 129);
                echo "</td>
                    <td class=\"text-left\">";
                // line 130
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "date_added", [], "any", false, false, false, 130);
                echo "</td>
                    <td class=\"text-right\"><a href=\"";
                // line 131
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "edit", [], "any", false, false, false, 131);
                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_reward'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 134
            echo "                  ";
        } else {
            // line 135
            echo "                  <tr>
                    <td class=\"text-center\" colspan=\"11\">";
            // line 136
            echo ($context["text_no_results"] ?? null);
            echo "</td>
                  </tr>
                  ";
        }
        // line 139
        echo "                </tbody>
              </table>
            </div>
          </form>
          <div class=\"row\">
            <div class=\"col-sm-6 text-left\">";
        // line 144
        echo ($context["pagination"] ?? null);
        echo "</div>
            <div class=\"col-sm-6 text-right\">";
        // line 145
        echo ($context["results"] ?? null);
        echo "</div>
          </div>
        </div>
      </div>
  </div>
  </div>
</div>
";
        // line 152
        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/reward&user_token=";
        // line 168
        echo ($context["user_token"] ?? null);
        echo "';
    var filter_name = \$('input[name=\\'filter_name\\']').val();
    if (filter_name) {
      url += '&filter_name=' + encodeURIComponent(filter_name);
    }
    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);
    }
    var filter_status = \$('select[name=\\'filter_status\\']').val();
    if (filter_status !== '') {
      url += '&filter_status=' + encodeURIComponent(filter_status); 
    }
    var filter_date_added = \$('input[name=\\'filter_date_added\\']').val();
    if (filter_date_added) {
      url += '&filter_date_added=' + encodeURIComponent(filter_date_added);
    }
    location = url;
  });

  //--></script>
  <script type=\"text/javascript\"><!--
  \$('.date').datetimepicker({
    language: '";
        // line 195
        echo ($context["datepicker"] ?? null);
        echo "',
    pickTime: false
  });
  //--></script>";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  484 => 195,  454 => 168,  435 => 152,  425 => 145,  421 => 144,  414 => 139,  408 => 136,  405 => 135,  402 => 134,  391 => 131,  387 => 130,  383 => 129,  379 => 128,  375 => 127,  371 => 126,  367 => 125,  363 => 124,  359 => 123,  355 => 122,  351 => 121,  348 => 120,  343 => 119,  341 => 118,  334 => 114,  331 => 113,  323 => 112,  313 => 110,  311 => 109,  307 => 108,  303 => 107,  300 => 106,  292 => 105,  282 => 103,  280 => 102,  276 => 101,  272 => 100,  268 => 99,  264 => 98,  260 => 97,  256 => 96,  248 => 91,  242 => 88,  231 => 80,  226 => 77,  220 => 75,  214 => 73,  211 => 72,  205 => 70,  199 => 68,  197 => 67,  191 => 64,  186 => 61,  180 => 59,  174 => 57,  171 => 56,  165 => 54,  159 => 52,  157 => 51,  151 => 48,  143 => 45,  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/reward_list.twig", "");
    }
}
