change customer UI

This commit is contained in:
phyusin
2017-12-12 10:51:58 +06:30
parent e727b8b22e
commit 59fbe1ed17
3 changed files with 146 additions and 137 deletions

View File

@@ -13,74 +13,85 @@
<div class="row clearfix">
<div class="col-lg-8 col-md-8 col-sm-8">
<div class="card">
<div class="body table-responsive">
<table class="table table-hover table-striped">
<!-- <div class="table-responsive">
<table class="table table-striped"> -->
<thead>
<tr>
<td colspan="7">
<!-- <button id="member_acc_no" class="btn btn-success btn-md"><span class="fa fa-credit-card"></span> Member Card</button>
<button id="qr_code" class="btn btn-danger btn-md">
<span class="fa fa-credit-card"></span> QR CODE
</button> -->
<div class="body">
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
<div class="row clearfix">
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
<input type="text" name="filter" style="margin-right:10px" placeholder="Search" id="search" class="form-control">
<input type="hidden" name="type" id="type" value="">
</div>
<!-- <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12"> -->
<button type="submit" class="btn bg-blue waves-effect" style="margin-right: 10px;"><%= t("views.btn.search") %></button>
<!-- </div> -->
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect" style="margin-right: 10px;"><%= t("views.btn.memeber_card") %></button>
<button type="button" id="qr_code" class="btn bg-green btn-sm waves-effect" style="margin-right: 10px;"><%= t("views.btn.qr_code") %></button>
<div class="body">
<div class="row p-l-20 p-t-20">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
<div class="row clearfix">
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
<input type="text" name="filter" style="margin-right:10px" placeholder="Search" id="search" class="form-control">
<input type="hidden" name="type" id="type" value="">
</div>
<% end %>
<!-- <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12"> -->
<button type="submit" class="btn btn-sm bg-blue waves-effect" style="margin-right: 10px;"><%= t("views.btn.search") %></button>
<!-- </div> -->
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect" style="margin-right: 10px;"><%= t("views.btn.memeber_card") %></button>
<button type="button" id="qr_code" class="btn bg-green btn-sm waves-effect" style="margin-right: 10px;"><%= t("views.btn.qr_code") %></button>
</div>
</td>
</tr>
<tr>
<th></th>
<th><%= t("views.right_panel.detail.sr_no") %></th>
<th><%= t("views.right_panel.detail.name") %></th>
<th><%= t("views.right_panel.detail.card_no") %></th>
<th><%= t("views.right_panel.detail.contact_no") %></th>
<th><%= t("views.right_panel.detail.email") %></th>
<th><%= t("views.right_panel.detail.action") %></th>
</tr>
</thead>
<tbody>
<% if @crm_customers.count > 0 %>
<% @i = 0 %>
<% @crm_customers.each do |crm_customer| %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
<td>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<%= @i += 1 %>
<%else%>
-
<% end %>
</td>
<td><%= crm_customer.name %></td>
<td><%= crm_customer.card_no rescue '-' %></td>
<td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td>
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
</tr>
<% end %>
<% else %>
<tr><td colspan="7"><strong><p style="text-align: center;margin-bottom: -1px">There is no data for search <%=@filter%>....</p></strong></td></tr>
<% end %>
</tbody>
</table>
<br>
<%= paginate @crm_customers %>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="table-responsive">
<table class="table table-hover table-striped" style="width:100%">
<!-- <div class="table-responsive">
<table class="table table-striped"> -->
<thead>
<!-- <tr>
<td colspan="7">
<button id="member_acc_no" class="btn btn-success btn-md"><span class="fa fa-credit-card"></span> Member Card</button>
<button id="qr_code" class="btn btn-danger btn-md">
<span class="fa fa-credit-card"></span> QR CODE
</button>
</td>
</tr>-->
<tr>
<th></th>
<th><%= t("views.right_panel.detail.sr_no") %></th>
<th><%= t("views.right_panel.detail.name") %></th>
<th><%= t("views.right_panel.detail.card_no") %></th>
<th style="width:20%"><%= t("views.right_panel.detail.contact_no") %></th>
<th style="width:20%"><%= t("views.right_panel.detail.email") %></th>
<th><%= t("views.right_panel.detail.action") %></th>
</tr>
</thead>
<tbody>
<% if @crm_customers.count > 0 %>
<% @i = 0 %>
<% @crm_customers.each do |crm_customer| %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td>
<input type="radio" name="checkbox" class="checkbox_check" >
</td>
<td>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<%= @i += 1 %>
<%else%>
-
<% end %>
</td>
<td><%= crm_customer.name %></td>
<td><%= crm_customer.card_no rescue '-' %></td>
<td style="width:20px%;word-break: break-all;"><%= crm_customer.contact_no %></td>
<td style="width:20px%;word-break: break-all;"><%= crm_customer.email %></td>
<td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
</tr>
<% end %>
<% else %>
<tr><td colspan="7"><strong><p style="text-align: center;margin-bottom: -1px">There is no data for search <%=@filter%>....</p></strong></td></tr>
<% end %>
</tbody>
</table>
<br>
<%= paginate @crm_customers %>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-4">