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,18 +13,9 @@
<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">
<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"> <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 %> <%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %>
<div class="row clearfix"> <div class="row clearfix">
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12"> <div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
@@ -32,22 +23,37 @@
<input type="hidden" name="type" id="type" value=""> <input type="hidden" name="type" id="type" value="">
</div> </div>
<!-- <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12"> --> <!-- <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> <button type="submit" class="btn btn-sm bg-blue waves-effect" style="margin-right: 10px;"><%= t("views.btn.search") %></button>
<!-- </div> --> <!-- </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="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> <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 %> <% end %>
</div> </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> </td>
</tr> </tr>-->
<tr> <tr>
<th></th> <th></th>
<th><%= t("views.right_panel.detail.sr_no") %></th> <th><%= t("views.right_panel.detail.sr_no") %></th>
<th><%= t("views.right_panel.detail.name") %></th> <th><%= t("views.right_panel.detail.name") %></th>
<th><%= t("views.right_panel.detail.card_no") %></th> <th><%= t("views.right_panel.detail.card_no") %></th>
<th><%= t("views.right_panel.detail.contact_no") %></th> <th style="width:20%"><%= t("views.right_panel.detail.contact_no") %></th>
<th><%= t("views.right_panel.detail.email") %></th> <th style="width:20%"><%= t("views.right_panel.detail.email") %></th>
<th><%= t("views.right_panel.detail.action") %></th> <th><%= t("views.right_panel.detail.action") %></th>
</tr> </tr>
</thead> </thead>
@@ -58,7 +64,8 @@
<% @crm_customers.each do |crm_customer| %> <% @crm_customers.each do |crm_customer| %>
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>"> <tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
<td> <td>
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td> <input type="radio" name="checkbox" class="checkbox_check" >
</td>
<td> <td>
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %> <% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
<%= @i += 1 %> <%= @i += 1 %>
@@ -68,8 +75,8 @@
</td> </td>
<td><%= crm_customer.name %></td> <td><%= crm_customer.name %></td>
<td><%= crm_customer.card_no rescue '-' %></td> <td><%= crm_customer.card_no rescue '-' %></td>
<td><%= crm_customer.contact_no %></td> <td style="width:20px%;word-break: break-all;"><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></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> <td><%= link_to t("views.btn.show"), crm_customer_path(crm_customer) %></td>
</tr> </tr>
<% end %> <% end %>
@@ -83,6 +90,10 @@
</div> </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">
<div class="card"> <div class="card">
<div class="body" id="custom-slimscroll"> <div class="body" id="custom-slimscroll">

View File

@@ -14,14 +14,9 @@
<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">
<thead>
<tr>
<td colspan="6">
<!-- <% path ="/origami/#{@sale_id}/customers" %> <!-- <% path ="/origami/#{@sale_id}/customers" %>
<%= form_tag path, :id => "filter_form", :method => :get do %> <%= form_tag path, :id => "filter_form", :method => :get do %>
<div class="input-append col-md-7 form-group pull-left"> <div class="input-append col-md-7 form-group pull-left">
@@ -31,7 +26,6 @@
</div> </div>
<% end %> <% end %>
<button id="member_acc_no" class="btn btn-success btn-sm"><span class="fa fa-credit-card"></span> Member Card</button> --> <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" %> <% path ="/origami/#{@sale_id}/customers" %>
<%= form_tag path, :id => "filter_form", :method => :get do %> <%= form_tag path, :id => "filter_form", :method => :get do %>
<div class="row clearfix"> <div class="row clearfix">
@@ -50,15 +44,18 @@
</div> </div>
<% end %> <% end %>
</div> </div>
</td> </div>
</tr> <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> <tr>
<th></th> <th></th>
<th><%= t("views.right_panel.detail.sr_no") %></th> <th><%= t("views.right_panel.detail.sr_no") %></th>
<th><%= t("views.right_panel.detail.name") %></th> <th><%= t("views.right_panel.detail.name") %></th>
<th><%= t("views.right_panel.detail.card_no") %></th> <th><%= t("views.right_panel.detail.card_no") %></th>
<th><%= t("views.right_panel.detail.contact_no") %></th> <th style="width:20%"><%= t("views.right_panel.detail.contact_no") %></th>
<th><%= t("views.right_panel.detail.email") %></th> <th style="width:20%"><%= t("views.right_panel.detail.email") %></th>
<!-- <th>Paypar No</th> --> <!-- <th>Paypar No</th> -->
</tr> </tr>
</thead> </thead>
@@ -80,8 +77,8 @@
</td> </td>
<td><%= crm_customer.name %></td> <td><%= crm_customer.name %></td>
<td><%= crm_customer.company rescue '-' %></td> <td><%= crm_customer.company rescue '-' %></td>
<td><%= crm_customer.contact_no %></td> <td style="width:20%;word-break: break-all;"><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td> <td style="width:20%;word-break: break-all;"><%= crm_customer.email %></td>
<!-- <td><%= crm_customer.paypar_account_no %></td> --> <!-- <td><%= crm_customer.paypar_account_no %></td> -->
</tr> </tr>
@@ -98,6 +95,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- <div class="col-lg-4 col-md-4 col-sm-4" style="min-height:600px; max-height:600px; overflow-x:scroll"> --> <!-- <div class="col-lg-4 col-md-4 col-sm-4" style="min-height:600px; max-height:600px; overflow-x:scroll"> -->
<div class="col-lg-3 col-md-3 col-sm-3" > <div class="col-lg-3 col-md-3 col-sm-3" >

View File

@@ -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">