<?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_31af208c4092f2407790a4bf696d7229bf46604fd7d308aba073d45393432ad7 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>
        <a href=\"";
        // line 7
        echo ($context["add"] ?? null);
        echo "\" data-toggle=\"tooltip\" title=\"";
        echo ($context["button_add"] ?? null);
        echo "\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i></a>
        <button type=\"button\" data-toggle=\"tooltip\" title=\"";
        // line 8
        echo ($context["button_delete"] ?? null);
        echo "\" class=\"btn btn-danger\" onclick=\"confirm('";
        echo ($context["text_confirm"] ?? null);
        echo "') ? \$('#form-member-reward').submit() : false;\"><i class=\"fa fa-trash-o\"></i></button>
        <button type=\"button\" id=\"button-export\" data-toggle=\"tooltip\" title=\"";
        // line 9
        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 11
        echo ($context["heading_title"] ?? null);
        echo "</h1>
      <ul class=\"breadcrumb\">
        ";
        // line 13
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["breadcrumbs"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["breadcrumb"]) {
            // line 14
            echo "        <li><a href=\"";
            echo twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "href", [], "any", false, false, false, 14);
            echo "\">";
            echo twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "text", [], "any", false, false, false, 14);
            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 16
        echo "      </ul>
    </div>
  </div>
  <div class=\"container-fluid\">
    ";
        // line 20
        if (($context["error_warning"] ?? null)) {
            // line 21
            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 25
        echo "    ";
        if (($context["success"] ?? null)) {
            // line 26
            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 30
        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 34
        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 38
        echo ($context["entry_reward_name"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_reward_name\" value=\"";
        // line 39
        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 42
        echo ($context["entry_email"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_email\" value=\"";
        // line 43
        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 46
        echo ($context["entry_phone_no"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_phone_no\" value=\"";
        // line 47
        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-status\">";
        // line 50
        echo ($context["entry_status"] ?? null);
        echo "</label>
              <select name=\"filter_status\" id=\"input-status\" class=\"form-control\">
                <option value=\"\"></option>
                ";
        // line 53
        if ((($context["filter_status"] ?? null) == "1")) {
            // line 54
            echo "                <option value=\"1\" selected=\"selected\">";
            echo ($context["text_active"] ?? null);
            echo "</option>
                ";
        } else {
            // line 56
            echo "                <option value=\"1\">";
            echo ($context["text_active"] ?? null);
            echo "</option>
                ";
        }
        // line 58
        echo "                ";
        if ((($context["filter_status"] ?? null) == "0")) {
            // line 59
            echo "                <option value=\"0\" selected=\"selected\">";
            echo ($context["text_inactive"] ?? null);
            echo "</option>
                ";
        } else {
            // line 61
            echo "                <option value=\"0\">";
            echo ($context["text_inactive"] ?? null);
            echo "</option>
                ";
        }
        // line 63
        echo "              </select>
            </div>
            <div class=\"form-group\">
              <label class=\"control-label\" for=\"input-date-added\">";
        // line 66
        echo ($context["entry_date_added"] ?? null);
        echo "</label>
              <div class=\"input-group date\">
                <input type=\"text\" name=\"filter_date_added\" value=\"";
        // line 68
        echo ($context["filter_date_added"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_date_added"] ?? null);
        echo "\" data-date-format=\"YYYY-MM-DD\" id=\"input-date-added\" class=\"form-control\" />
                <span class=\"input-group-btn\">
                <button type=\"button\" class=\"btn btn-default\"><i class=\"fa fa-calendar\"></i></button>
                </span>
              </div>
            </div>
            <div class=\"form-group text-right\">
              <button type=\"button\" id=\"button-filter\" class=\"btn btn-default\"><i class=\"fa fa-filter\"></i> ";
        // line 75
        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 83
        echo ($context["text_list"] ?? null);
        echo "</h3>
        </div>
        <div class=\"panel-body\">
          <form action=\"";
        // line 86
        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 style=\"width: 1px;\" class=\"text-center\"><input type=\"checkbox\" onclick=\"\$('input[name*=\\'selected\\']').prop('checked', this.checked);\" /></td>
                    <td class=\"text-left\">";
        // line 92
        echo ($context["column_email"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 93
        echo ($context["column_phone_no"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 94
        echo ($context["column_reward_name"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 95
        echo ($context["column_value"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 96
        echo ($context["column_used_point"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 97
        echo ($context["column_expiry_date"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 98
        if ((($context["sort"] ?? null) == "redemption_date")) {
            // line 99
            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 101
            echo "                      <a href=\"";
            echo ($context["sort_redemption_date"] ?? null);
            echo "\">";
            echo ($context["column_redemption_date"] ?? null);
            echo "</a>
                      ";
        }
        // line 102
        echo "</td>
                    <td class=\"text-left\">";
        // line 103
        echo ($context["column_is_redeemed"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 104
        echo ($context["column_order_no"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 105
        if ((($context["sort"] ?? null) == "date_added")) {
            // line 106
            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 108
            echo "                      <a href=\"";
            echo ($context["sort_date_added"] ?? null);
            echo "\">";
            echo ($context["column_date_added"] ?? null);
            echo "</a>
                      ";
        }
        // line 109
        echo "</td>
                    <td class=\"text-right\">";
        // line 110
        echo ($context["column_action"] ?? null);
        echo "</td>
                  </tr>
                </thead>
                <tbody>
                  ";
        // line 114
        if (($context["member_rewards"] ?? null)) {
            // line 115
            echo "                  ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["member_rewards"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["member_reward"]) {
                // line 116
                echo "                  <tr>
                    <td class=\"text-center\">";
                // line 117
                if (twig_in_filter(twig_get_attribute($this->env, $this->source, $context["member_reward"], "member_reward_id", [], "any", false, false, false, 117), ($context["selected"] ?? null))) {
                    // line 118
                    echo "                      <input type=\"checkbox\" name=\"selected[]\" value=\"";
                    echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "member_reward_id", [], "any", false, false, false, 118);
                    echo "\" checked=\"checked\" />
                      ";
                } else {
                    // line 120
                    echo "                      <input type=\"checkbox\" name=\"selected[]\" value=\"";
                    echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "member_reward_id", [], "any", false, false, false, 120);
                    echo "\" />
                      ";
                }
                // line 121
                echo "</td>
                    <td class=\"text-left\" >";
                // line 122
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "email", [], "any", false, false, false, 122);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 123
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "phone_no", [], "any", false, false, false, 123);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 124
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "reward_name", [], "any", false, false, false, 124);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 125
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "value", [], "any", false, false, false, 125);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 126
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "used_point", [], "any", false, false, false, 126);
                echo "</td>
                    <td class=\"text-left\">";
                // line 127
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "expiry_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"], "redemption_date", [], "any", false, false, false, 128);
                echo "</td>
                    <td class=\"text-left\">";
                // line 129
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "is_redeemed", [], "any", false, false, false, 129);
                echo "</td>
                    <td class=\"text-left\">";
                // line 130
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "order_no", [], "any", false, false, false, 130);
                echo "</td>
                    <td class=\"text-left\">";
                // line 131
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "date_added", [], "any", false, false, false, 131);
                echo "</td>
                    <td class=\"text-right\"><a href=\"";
                // line 132
                echo twig_get_attribute($this->env, $this->source, $context["member_reward"], "edit", [], "any", false, false, false, 132);
                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 135
            echo "                  ";
        } else {
            // line 136
            echo "                  <tr>
                    <td class=\"text-center\" colspan=\"12\">";
            // line 137
            echo ($context["text_no_results"] ?? null);
            echo "</td>
                  </tr>
                  ";
        }
        // line 140
        echo "                </tbody>
              </table>
            </div>
          </form>
          <div class=\"row\">
            <div class=\"col-sm-6 text-left\">";
        // line 145
        echo ($context["pagination"] ?? null);
        echo "</div>
            <div class=\"col-sm-6 text-right\">";
        // line 146
        echo ($context["results"] ?? null);
        echo "</div>
          </div>
        </div>
      </div>
  </div>
  </div>
</div>
";
        // line 153
        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 169
        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 196
        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 (  491 => 196,  461 => 169,  442 => 153,  432 => 146,  428 => 145,  421 => 140,  415 => 137,  412 => 136,  409 => 135,  398 => 132,  394 => 131,  390 => 130,  386 => 129,  382 => 128,  378 => 127,  374 => 126,  370 => 125,  366 => 124,  362 => 123,  358 => 122,  355 => 121,  349 => 120,  343 => 118,  341 => 117,  338 => 116,  333 => 115,  331 => 114,  324 => 110,  321 => 109,  313 => 108,  303 => 106,  301 => 105,  297 => 104,  293 => 103,  290 => 102,  282 => 101,  272 => 99,  270 => 98,  266 => 97,  262 => 96,  258 => 95,  254 => 94,  250 => 93,  246 => 92,  237 => 86,  231 => 83,  220 => 75,  208 => 68,  203 => 66,  198 => 63,  192 => 61,  186 => 59,  183 => 58,  177 => 56,  171 => 54,  169 => 53,  163 => 50,  155 => 47,  151 => 46,  143 => 43,  139 => 42,  131 => 39,  127 => 38,  120 => 34,  114 => 30,  106 => 26,  103 => 25,  95 => 21,  93 => 20,  87 => 16,  76 => 14,  72 => 13,  67 => 11,  62 => 9,  56 => 8,  50 => 7,  46 => 6,  37 => 1,);
    }

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