change customer UI
This commit is contained in:
@@ -13,74 +13,85 @@
|
|||||||
<div class="row clearfix">
|
<div class="row clearfix">
|
||||||
<div class="col-lg-8 col-md-8 col-sm-8">
|
<div class="col-lg-8 col-md-8 col-sm-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="body table-responsive">
|
<div class="body">
|
||||||
<table class="table table-hover table-striped">
|
<div class="row p-l-20 p-t-20">
|
||||||
<!-- <div class="table-responsive">
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||||
<table class="table table-striped"> -->
|
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
|
||||||
<thead>
|
<div class="row clearfix">
|
||||||
<tr>
|
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
|
||||||
<td colspan="7">
|
<input type="text" name="filter" style="margin-right:10px" placeholder="Search" id="search" class="form-control">
|
||||||
<!-- <button id="member_acc_no" class="btn btn-success btn-md"><span class="fa fa-credit-card"></span> Member Card</button>
|
<input type="hidden" name="type" id="type" value="">
|
||||||
<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>
|
</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>
|
</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 %>
|
<% end %>
|
||||||
<% else %>
|
</div>
|
||||||
<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>
|
</div>
|
||||||
<div class="col-lg-4 col-md-4 col-sm-4">
|
<div class="col-lg-4 col-md-4 col-sm-4">
|
||||||
|
|||||||
@@ -14,86 +14,84 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-8 col-md-8 col-sm-8">
|
<div class="col-lg-8 col-md-8 col-sm-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="main-box-body clearfix" id="order-detail-slimscroll" style="">
|
<div class="body">
|
||||||
<div class="table-responsive">
|
<div class="row p-t-20 p-l-20">
|
||||||
<table id="origami-crm-table" class="table table-striped">
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||||
|
<!-- <% path ="/origami/#{@sale_id}/customers" %>
|
||||||
|
<%= form_tag path, :id => "filter_form", :method => :get do %>
|
||||||
|
<div class="input-append col-md-7 form-group pull-left">
|
||||||
|
<input type="text" name="filter" style="margin-right:10px" id="search" placeholder="Search" class="form-control input-sm col-md-9">
|
||||||
|
<input type="hidden" name="type" id="type" value="">
|
||||||
|
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<button id="member_acc_no" class="btn btn-success btn-sm"><span class="fa fa-credit-card"></span> Member Card</button> -->
|
||||||
|
<% path ="/origami/#{@sale_id}/customers" %>
|
||||||
|
<%= form_tag 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">
|
||||||
|
|
||||||
<thead>
|
<input type="text" name="filter" style="margin-right:10px" id="search" placeholder="Search" class="form-control input-sm col-md-12">
|
||||||
|
<input type="hidden" name="type" id="type" value="<%= @dining_facility.type %>">
|
||||||
|
|
||||||
<tr>
|
</div>
|
||||||
<td colspan="6">
|
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-12">
|
||||||
<!-- <% path ="/origami/#{@sale_id}/customers" %>
|
<button type="submit" class="btn bg-blue waves-effect waves-effect">Search</button>
|
||||||
<%= form_tag path, :id => "filter_form", :method => :get do %>
|
</div>
|
||||||
<div class="input-append col-md-7 form-group pull-left">
|
|
||||||
<input type="text" name="filter" style="margin-right:10px" id="search" placeholder="Search" class="form-control input-sm col-md-9">
|
|
||||||
<input type="hidden" name="type" id="type" value="">
|
|
||||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<button id="member_acc_no" class="btn btn-success btn-sm"><span class="fa fa-credit-card"></span> Member Card</button> -->
|
|
||||||
<div class="body">
|
|
||||||
<% path ="/origami/#{@sale_id}/customers" %>
|
|
||||||
<%= form_tag 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" id="search" placeholder="Search" class="form-control input-sm col-md-12">
|
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect" style="height: 30%;margin-right: 10px;">Member Card</button>
|
||||||
<input type="hidden" name="type" id="type" value="<%= @dining_facility.type %>">
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-12">
|
<% end %>
|
||||||
<button type="submit" class="btn bg-blue waves-effect waves-effect">Search</button>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="main-box-body clearfix" id="order-detail-slimscroll" style="">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="origami-crm-table" class="table table-striped" style="width:100%">
|
||||||
|
<thead>
|
||||||
|
<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>Paypar No</th> -->
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect" style="height: 30%;margin-right: 10px;">Member Card</button>
|
<tbody>
|
||||||
|
<% if @crm_customers.count > 0 %>
|
||||||
|
<% @i = 0 %>
|
||||||
|
<% @crm_customers.each do |crm_customer| %>
|
||||||
|
|
||||||
</div>
|
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||||
<% end %>
|
|
||||||
</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>Paypar No</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>
|
<td>
|
||||||
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||||
<%= @i += 1 %>
|
<td>
|
||||||
<%else%>
|
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||||
-
|
<%= @i += 1 %>
|
||||||
<% end %>
|
<%else%>
|
||||||
</td>
|
-
|
||||||
<td><%= crm_customer.name %></td>
|
<% end %>
|
||||||
<td><%= crm_customer.company rescue '-' %></td>
|
</td>
|
||||||
<td><%= crm_customer.contact_no %></td>
|
<td><%= crm_customer.name %></td>
|
||||||
<td><%= crm_customer.email %></td>
|
<td><%= crm_customer.company rescue '-' %></td>
|
||||||
<!-- <td><%= crm_customer.paypar_account_no %></td> -->
|
<td style="width:20%;word-break: break-all;"><%= crm_customer.contact_no %></td>
|
||||||
|
<td style="width:20%;word-break: break-all;"><%= crm_customer.email %></td>
|
||||||
|
<!-- <td><%= crm_customer.paypar_account_no %></td> -->
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%else%>
|
<%else%>
|
||||||
<tr><td colspan="5"><p style="text-align:center"><strong>There are no record for your search</strong></p></td></tr>
|
<tr><td colspan="5"><p style="text-align:center"><strong>There are no record for your search</strong></p></td></tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<%= paginate @crm_customers %>
|
<%= paginate @crm_customers %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -232,7 +232,7 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
if @status_order == 'order' && @status_sale != 'sale'
|
if @status_order == 'order' && @status_sale != 'sale'
|
||||||
unless @order_items.nil?
|
unless @order_items.nil? || @order_items.empty?
|
||||||
count = 0
|
count = 0
|
||||||
@order_items.each do |order_item |
|
@order_items.each do |order_item |
|
||||||
count += 1
|
count += 1
|
||||||
@@ -291,7 +291,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<%
|
<%
|
||||||
if @status_sale == 'sale'
|
if @status_sale == 'sale'
|
||||||
unless @order_items.nil?
|
unless @order_items.nil? || @order_items.empty?
|
||||||
%>
|
%>
|
||||||
Pending New Order
|
Pending New Order
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
|
|||||||
Reference in New Issue
Block a user