change customer UI and header css
This commit is contained in:
@@ -158,3 +158,114 @@ i.logout_icon{
|
||||
position: relative;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
/*customer modal UI */
|
||||
.wizard {
|
||||
background: #f1f1f1;
|
||||
padding: 10px;
|
||||
}
|
||||
.wizard .nav-tabs {
|
||||
position: relative;
|
||||
border: 0px;
|
||||
}
|
||||
.wizard > div.wizard-inner {
|
||||
position: relative;
|
||||
margin: 0 0 0 145px !important;
|
||||
}
|
||||
.connecting-line{
|
||||
height:12px;
|
||||
background: #e0e0e0;
|
||||
position: absolute;
|
||||
width: 105%;
|
||||
margin: 0 auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top:38%;
|
||||
z-index: 1;
|
||||
border-radius: 15px;
|
||||
}
|
||||
.active-line{
|
||||
height:12px;
|
||||
background: #e0e0e0;
|
||||
position: absolute;
|
||||
width: 5%;
|
||||
margin: 0 auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top:61%;
|
||||
z-index: 1;
|
||||
border-radius: 15px !important;
|
||||
}
|
||||
.connecting-line a.active{
|
||||
background-color: #2ED4E0;
|
||||
}
|
||||
.border-right{
|
||||
border-radius: 15px 0 0 15px;
|
||||
}
|
||||
.border-left{
|
||||
border-radius: 0;
|
||||
}
|
||||
.wizard .nav-tabs > li {
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
.wizard .nav-tabs > li > a.active > a, .wizard .nav-tabs > li > a.active > a:hover, .wizard .nav-tabs > li > a.active > a:focus {
|
||||
cursor: default;
|
||||
border: 0;
|
||||
color:#2ED4E0;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
.nav-tabs li p{
|
||||
padding-top:40px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
.list-inline{
|
||||
text-align: center;
|
||||
}
|
||||
span.round-tab {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
display: inline-block;
|
||||
border-radius: 100px;
|
||||
background:#DFE3E4;
|
||||
border: 2px solid #fff;
|
||||
z-index:1;
|
||||
position:absolute;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
.wizard li > a.active span.round-tab{
|
||||
background:#2196F3;
|
||||
color:white;
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
span.round-tab:hover{
|
||||
color: white;
|
||||
border: 1px solid #fff;
|
||||
background-color:#2196F3;
|
||||
}
|
||||
.wizard .nav-tabs > li {
|
||||
width: 25%;
|
||||
}
|
||||
.wizard .nav-tabs > li a{
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
margin: 18px auto;
|
||||
border-radius: 100%;
|
||||
padding: 0;
|
||||
color: #777;
|
||||
}
|
||||
.wizard .tab-pane {
|
||||
position: relative;
|
||||
padding-top: 5px;
|
||||
border-top: 1px solid #fff;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.next-step:hover, .next-step, .prev-step:hover, .prev-step{
|
||||
position: relative;
|
||||
background-color: #2196F3;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
/*customer modal UI */
|
||||
@@ -543,3 +543,114 @@ nav.pagination .page a:hover,
|
||||
height: 50%;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
/*customer modal UI */
|
||||
.wizard {
|
||||
background: #f1f1f1;
|
||||
padding: 10px;
|
||||
}
|
||||
.wizard .nav-tabs {
|
||||
position: relative;
|
||||
border: 0px;
|
||||
}
|
||||
.wizard > div.wizard-inner {
|
||||
position: relative;
|
||||
margin: 0 0 0 145px !important;
|
||||
}
|
||||
.connecting-line{
|
||||
height:12px;
|
||||
background: #e0e0e0;
|
||||
position: absolute;
|
||||
width: 110%;
|
||||
margin: 0 auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top:38%;
|
||||
z-index: 1;
|
||||
border-radius: 15px;
|
||||
}
|
||||
.active-line{
|
||||
height:12px;
|
||||
background: #e0e0e0;
|
||||
position: absolute;
|
||||
width: 5%;
|
||||
margin: 0 auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top:61%;
|
||||
z-index: 1;
|
||||
border-radius: 15px !important;
|
||||
}
|
||||
.connecting-line a.active{
|
||||
background-color: #2ED4E0;
|
||||
}
|
||||
.border-right{
|
||||
border-radius: 15px 0 0 15px;
|
||||
}
|
||||
.border-left{
|
||||
border-radius: 0;
|
||||
}
|
||||
.wizard .nav-tabs > li {
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
.wizard .nav-tabs > li > a.active > a, .wizard .nav-tabs > li > a.active > a:hover, .wizard .nav-tabs > li > a.active > a:focus {
|
||||
cursor: default;
|
||||
border: 0;
|
||||
color:#2ED4E0;
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
.nav-tabs li p{
|
||||
padding-top:40px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
.list-inline{
|
||||
text-align: center;
|
||||
}
|
||||
span.round-tab {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
display: inline-block;
|
||||
border-radius: 100px;
|
||||
background:#DFE3E4;
|
||||
border: 2px solid #fff;
|
||||
z-index:1;
|
||||
position:absolute;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
.wizard li > a.active span.round-tab{
|
||||
background:#2196F3;
|
||||
color:white;
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
span.round-tab:hover{
|
||||
color: white;
|
||||
border: 1px solid #fff;
|
||||
background-color:#2196F3;
|
||||
}
|
||||
.wizard .nav-tabs > li {
|
||||
width: 25%;
|
||||
}
|
||||
.wizard .nav-tabs > li a{
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
margin: 18px auto;
|
||||
border-radius: 100%;
|
||||
padding: 0;
|
||||
color: #777;
|
||||
}
|
||||
.wizard .tab-pane {
|
||||
position: relative;
|
||||
padding-top: 5px;
|
||||
border-top: 1px solid #fff;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.next-step:hover, .next-step, .prev-step:hover, .prev-step{
|
||||
position: relative;
|
||||
background-color: #2196F3;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
/*customer modal UI */
|
||||
@@ -286,13 +286,13 @@ section.content {
|
||||
|
||||
/* shop name margin */
|
||||
.shop-name-margin {
|
||||
margin-left : 20%;
|
||||
margin-left : 15%;
|
||||
}
|
||||
/* shop name margin */
|
||||
|
||||
/* online order margin */
|
||||
.online-order-margin {
|
||||
margin-left : 22%;
|
||||
margin-left : 13%;
|
||||
margin-bottom : 9.9999px;
|
||||
}
|
||||
/* online order margin */
|
||||
|
||||
@@ -86,6 +86,10 @@ class Crm::CustomersController < BaseCrmController
|
||||
end
|
||||
end
|
||||
|
||||
params[:type] = nil
|
||||
params[:customer_id] = params[:id]
|
||||
@credit_sales = SalePayment.get_credit_sales(params)
|
||||
|
||||
#get customer amount
|
||||
@customer = Customer.find(params[:id])
|
||||
@response = Customer.get_membership_transactions(@customer)
|
||||
|
||||
@@ -877,7 +877,9 @@ class SalePayment < ApplicationRecord
|
||||
.joins("INNER JOIN sale_orders so ON so.sale_id = s.sale_id")
|
||||
.joins("INNER JOIN orders o ON o.order_id = so.order_id")
|
||||
|
||||
if params[:type] == "cashier"
|
||||
if params[:type].nil?
|
||||
query = query.where("(CASE WHEN (s.grand_total + s.amount_changed)=(select SUM(payment_amount) FROM sale_payments WHERE sale_id=s.sale_id AND payment_method!='creditnote') THEN NULL ELSE payment_method='creditnote' END) and s.sale_status = 'completed' and s.payment_status='paid' #{receipt_no} #{customer}")
|
||||
elsif params[:type] == "cashier"
|
||||
query = query.where("(CASE WHEN (s.grand_total + s.amount_changed)=(select SUM(payment_amount) FROM sale_payments WHERE sale_id=s.sale_id AND payment_method!='creditnote') THEN NULL ELSE payment_method='creditnote' AND o.source='#{params[:type]}' OR o.source='emenu' END) and s.sale_status = 'completed' and s.payment_status='paid' #{receipt_no} #{customer}")
|
||||
else
|
||||
query = query.where("(CASE WHEN (s.grand_total + s.amount_changed)=(select SUM(payment_amount) FROM sale_payments WHERE sale_id=s.sale_id AND payment_method!='creditnote') THEN NULL ELSE payment_method='creditnote' AND o.source='#{params[:type]}' END) and s.sale_status = 'completed' and s.payment_status='paid' #{receipt_no} #{customer}")
|
||||
|
||||
@@ -1,27 +1,61 @@
|
||||
|
||||
<section>
|
||||
<div class="wizard">
|
||||
<div class="wizard-inner">
|
||||
<div class="active-line"></div>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="nav-item">
|
||||
<div class="connecting-line border-right"></div>
|
||||
<a href="#step1" class="nav-link active" data-toggle="tab" aria-controls="step1" role="tab" title="Step 1">
|
||||
<span class="round-tab">
|
||||
1
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation" class="nav-item disabled">
|
||||
<div class="connecting-line"></div>
|
||||
<a href="#complete" class="nav-link disable" data-toggle="tab" aria-controls="complete" role="tab" title="Complete">
|
||||
<span class="round-tab">
|
||||
2
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
|
||||
<span class="patch_method"></span>
|
||||
<%= f.hidden_field :id, :class => "form-control " %>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" role="tabpanel" id="step1">
|
||||
<!-- <h4>Step 1</h4> -->
|
||||
<div class="form-group">
|
||||
<label> <%= t("views.right_panel.detail.salutation") %> :</label><br>
|
||||
<label class="font-15"><%= t("views.right_panel.detail.mr") %>
|
||||
<%= f.radio_button :salutation,"Mr", :class => "salutation mr with-gap radio-col-indigo", :value=>"Mr", :style=>"width: 30px"%>
|
||||
</label>
|
||||
<label class="font-15"><%= t("views.right_panel.detail.miss") %>
|
||||
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs with-gap radio-col-indigo", :value=>"Mrs", :style=>"width: 30px"%>
|
||||
</label>
|
||||
<label class="font-15"><%= t("views.right_panel.detail.mrs") %>
|
||||
<%= f.radio_button :salutation,"Miss", :class => "salutation miss with-gap radio-col-indigo", :value=>"Miss", :style=>"width: 30px"%>
|
||||
</label>
|
||||
<label class="font-15">
|
||||
<%= t("views.right_panel.detail.mdm") %>
|
||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm", :style=>"width: 30px"%>
|
||||
</label>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.sr_no") %></label>
|
||||
<div class="form-line disabled">
|
||||
<input type="text" name="" value="<%=@count_customer%>" class="form-control" disabled="" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label for="customer[salutation]" class="control-label"> <%= t("views.right_panel.detail.salutation") %> :</label><br>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :salutation,"Mr", :class => "salutation mr with-gap radio-col-indigo", :value=>"Mr"%><%= t("views.right_panel.detail.mr") %>
|
||||
</label>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs with-gap radio-col-indigo", :value=>"Mrs"%><%= t("views.right_panel.detail.miss") %>
|
||||
</label>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :salutation,"Miss", :class => "salutation miss with-gap radio-col-indigo", :value=>"Miss"%><%= t("views.right_panel.detail.mrs") %>
|
||||
</label>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm"%><%= t("views.right_panel.detail.mdm") %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :name, :class => "form-control name", :required => true %>
|
||||
<% flash.each do |test, msg| %>
|
||||
<%
|
||||
str="[\"#{msg['name']}\"]"
|
||||
@@ -30,20 +64,48 @@
|
||||
<lable class="error col-red m-t--10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :contact_no, :class => "form-control contact_no" ,:required => true%>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.gender") %> :</label><br>
|
||||
<label><%= t("views.right_panel.detail.male") %>
|
||||
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%></label>
|
||||
<label><%= t("views.right_panel.detail.female") %>
|
||||
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%></label>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :email, :class => "form-control email" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['email']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label for="customer[gender]" class="control-label"><%= t("views.right_panel.detail.gender") %> :</label><br>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male"%><%= t("views.right_panel.detail.male") %></label>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female"%><%= t("views.right_panel.detail.female") %></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :nrc_no,:label => "NRC No", :class => "form-control nrc_no" %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :company, :class => "form-control col-md-6 company"%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
@@ -53,45 +115,29 @@
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['email']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :address, :class => "form-control col-md-6 address" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.sr_no") %></label>
|
||||
<div class="form-line disabled">
|
||||
<input type="text" name="" value="<%=@count_customer%>" class="form-control" disabled="" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.date_of_birth") %></label>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label class="control-label"><%= t("views.right_panel.detail.date_of_birth") %></label>
|
||||
<%= f.text_field :date_of_birth, :value=>"01-01-1990",:class=>"datepicker form-control col-md-12"%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :address, :class => "form-control address" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
|
||||
<button type="button" class="btn btn-md bg-blue btn-info-full next-step">Next</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" role="tabpanel" id="complete">
|
||||
<!-- <h4>Step 2</h4> -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.customer_photo") %></label>
|
||||
<div class="panel padding-10">
|
||||
<div class="menu-item-img">
|
||||
@@ -105,8 +151,9 @@
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.select_customer_type") %></label>
|
||||
<select class="form-control col-md-12 selectpicker show-tick" id="customer_type" name="customer[customer_type]" style="height: " >
|
||||
<% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %>
|
||||
@@ -115,13 +162,17 @@
|
||||
<%end %>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control tax_profiles" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :card_no, :class => "form-control card_no"%>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['card_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
@@ -129,17 +180,21 @@
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label class="control-label"><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
|
||||
<div class="-group">
|
||||
<input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly/>
|
||||
<div class="input-group-addon"><span class="fa fa-credit-card"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.select_membership_group") %></label>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label class="control-label"><%= t("views.right_panel.detail.select_membership_group") %></label>
|
||||
<select class="form-control col-md-12 selectpicker show-tick" name="member_group_id" style="height: " >
|
||||
<option value=""><%= t("views.right_panel.detail.select_membership_group") %></option>
|
||||
<% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
|
||||
@@ -147,17 +202,24 @@
|
||||
<%= member.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
|
||||
<button type="button" class="btn btn-md bg-blue prev-step">Prev</button>
|
||||
<!-- <%= f.submit "Submit",:class => 'btn btn-primary ', :id => 'submit_customer' %>
|
||||
<%= f.submit "Update",:class => 'btn btn-info ', :disabled =>'', :id => 'update_customer' %> -->
|
||||
<button type="submit" class="btn btn-primary" id="submit_customer"><%= t("views.btn.submit") %></button>
|
||||
<button type="submit" class="btn btn-info" disabled id="update_customer"><%= t("views.btn.update") %></button>
|
||||
<button type="button" class="btn btn-danger" id="reset"><%= t("views.btn.reset") %></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<%end%>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<div id="sxModal">
|
||||
|
||||
@@ -11,28 +11,31 @@
|
||||
</div>
|
||||
|
||||
<div class="row clearfix">
|
||||
<div class="<%= @create_flag ? 'col-lg-8 col-md-8 col-sm-8' : 'col-lg-12 col-md-12 col-sm-12' %>">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="card">
|
||||
<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">
|
||||
<div class="col-sm-5 col-md-5 col-lg-5">
|
||||
<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-sm-4 col-md-4 col-lg-4">
|
||||
<!-- <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="height: 30%;margin-right: 10px;"><%= t("views.btn.search") %></button>
|
||||
<button type="submit" class="btn btn-sm bg-blue waves-effect"><%= t("views.btn.search") %></button>
|
||||
<!-- </div> -->
|
||||
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect" style="height: 30%;margin-right: 10px;"><%= t("views.btn.memeber_card") %></button>
|
||||
<button type="button" id="qr_code" class="btn bg-green btn-sm waves-effect" style="height: 30%;margin-right: 10px;"><%= t("views.btn.qr_code") %></button>
|
||||
<button type="button" id="member_acc_no" class="btn bg-green btn-sm waves-effect"><%= t("views.btn.memeber_card") %></button>
|
||||
<button type="button" id="qr_code" class="btn bg-green btn-sm waves-effect"><%= t("views.btn.qr_code") %></button>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
||||
<%= paginate @crm_customers %>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped" style="width:100%">
|
||||
<!-- <div class="table-responsive">
|
||||
@@ -50,11 +53,12 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%= t("views.right_panel.detail.sr_no") %></th>
|
||||
<th><%= t :customer %> <%= t("views.right_panel.detail.type") %></th>
|
||||
<th><%= t("views.right_panel.detail.name") %></th>
|
||||
<th><%= t("views.right_panel.detail.card_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.membership_type") %></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 style="width:20%"><%= t("views.right_panel.detail.contact_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.membership_type") %></th>
|
||||
<th><%= t("views.right_panel.detail.card_no") %></th>
|
||||
<th><%= t("views.right_panel.detail.action") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -74,8 +78,10 @@
|
||||
-
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= crm_customer.customer_type rescue '-' %></td>
|
||||
<td><%= crm_customer.name %></td>
|
||||
<td><%= crm_customer.card_no rescue '-' %></td>
|
||||
<td style="width:20px%;word-break: break-all;"><%= crm_customer.email %></td>
|
||||
<td style="width:20px%;word-break: break-all;"><%= crm_customer.contact_no %></td>
|
||||
<td>
|
||||
<% if !@membership_types.nil? %>
|
||||
<% @membership_types.each do |member_type| %>
|
||||
@@ -85,9 +91,10 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</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>
|
||||
<td><%= crm_customer.card_no rescue '-' %></td>
|
||||
<td>
|
||||
<%= link_to t("views.btn.show"), crm_customer_path(crm_customer), :class => "btn btn-md bg-blue waves-effect" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
@@ -95,36 +102,24 @@
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<%= paginate @crm_customers %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% if @create_flag %>
|
||||
<div class="col-lg-4 col-md-4 col-sm-4">
|
||||
<div class="card">
|
||||
<div class="body" id="custom-slimscroll">
|
||||
<div class="col-sm-4 col-md-4 col-lg-4">
|
||||
<!-- .row-form-input -->
|
||||
<%= render 'new_form', crm_customer: @crm_customer, taxes: @taxes %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="col-lg-1 col-md-1 col-sm-1 ">
|
||||
<br>
|
||||
<a href="<%= dashboard_path%>" class="btn btn-primary">
|
||||
<i class="fa fa-arrow-left fa-lg"></i> Back
|
||||
</a>
|
||||
</div> -->
|
||||
<!-- .row-form-input -->
|
||||
</div>
|
||||
<% end %>
|
||||
</div> <!-- .end-of-row -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
|
||||
$(document).ready(function () {
|
||||
/*$('.datepicker').datepicker({
|
||||
format : 'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
@@ -163,8 +158,44 @@ $(function() {
|
||||
$("#search").val(code);
|
||||
}
|
||||
|
||||
/*new customer UI func:*/
|
||||
//Initialize tooltips
|
||||
$('.nav-tabs > li a[title]').tooltip();
|
||||
|
||||
//Wizard
|
||||
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
|
||||
|
||||
var $target = $(e.target);
|
||||
|
||||
if ($target.parent().hasClass('disabled')) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(".next-step").click(function (e) {
|
||||
var $active = $('.wizard .nav-tabs li a.active');
|
||||
$active.parent().next().removeClass('disabled');
|
||||
nextTab($active);
|
||||
$('.wizard .nav-tabs li.active .connecting-line').css({"border-bottom-left-radius": 0, "border-top-left-radius": 0});
|
||||
});
|
||||
$(".prev-step").click(function (e) {
|
||||
|
||||
var $active = $('.wizard .nav-tabs li a.active');
|
||||
prevTab($active);
|
||||
|
||||
});
|
||||
/*new customer UI func:*/
|
||||
});
|
||||
|
||||
/*customer UI tab btn*/
|
||||
function nextTab(elem) {
|
||||
$(elem).parent().next().find('a[data-toggle="tab"]').click();
|
||||
}
|
||||
function prevTab(elem) {
|
||||
$(elem).parent().prev().find('a[data-toggle="tab"]').click();
|
||||
}
|
||||
/*customer UI tab btn*/
|
||||
|
||||
$(document).on('click',".customer_tr",function(){
|
||||
// if(this.checked){
|
||||
$(this).closest('tr').find('.checkbox_check').prop( "checked", true );
|
||||
@@ -289,5 +320,4 @@ $(document).on('click',".customer_tr",function(){
|
||||
$("#sxModal .btn_cancel").on('click',function(){
|
||||
$("#sxModal").hide();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
<div class="container-fluid">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">CRM</li>
|
||||
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
|
||||
<span class="float-right">
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<!-- Column One -->
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs tab-nav-right" role="tablist">
|
||||
@@ -13,6 +25,9 @@
|
||||
<li role="presentation" class="nav-item" >
|
||||
<a class="nav-link" data-toggle="tab" href="#sale" ><%= t :sale_details %></a>
|
||||
</li>
|
||||
<li role="presentation" class="nav-item" >
|
||||
<a class="nav-link" data-toggle="tab" href="#credit" ><%= t :credit %> <%= t :details %></a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Nav tabs - End -->
|
||||
|
||||
@@ -183,15 +198,33 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="credit" role="tabpanel" style="min-height:670px; max-height:670px; ">
|
||||
<h5><%= t :credit %> <%= t :details %></h5>
|
||||
<table class="table table-responsive tbl_credit_lists">
|
||||
<thead>
|
||||
<th><%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %></th>
|
||||
<th><%= t("views.right_panel.detail.receipt_no") %></th>
|
||||
<th> <%= t :cashier %> <%= t("views.right_panel.detail.name") %></th>
|
||||
<th> <%= t("views.right_panel.detail.credit_amount") %> </th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if !@credit_sales.nil? %>
|
||||
<% @credit_sales.each do |credit| %>
|
||||
<tr>
|
||||
<td><%= credit.sale_date.utc.getlocal.strftime("%e %b %Y %I:%M%p") %></td>
|
||||
<td><%= credit.receipt_no %></td>
|
||||
<td><%= credit.cashier_name %></td>
|
||||
<td><%= credit.payment_amount %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<a href="<%= crm_customers_path%>" class="btn btn-default btn-sm">
|
||||
<i class="material-icons">reply</i><%= t("views.btn.back") %>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<div class="container-fluid">
|
||||
<!-- <div class="page-header">
|
||||
<div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<li class="breadcrumb-item active">CRM</li>
|
||||
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
|
||||
<!-- <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li> -->
|
||||
<span class="float-right">
|
||||
<a href="#" id="back">Back</a>
|
||||
<%= link_to 'Back', dashboard_path %>
|
||||
</span>
|
||||
</ul>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="<%= @create_flag ? 'col-lg-8 col-md-8 col-sm-8' : 'col-lg-11 col-md-11 col-sm-11' %>">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<div class="row p-t-20 p-l-20">
|
||||
@@ -46,6 +46,9 @@
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
||||
<%= paginate @crm_customers %>
|
||||
<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%">
|
||||
@@ -99,16 +102,10 @@
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<%= paginate @crm_customers %>
|
||||
</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> <!-- .end-of-col-md-8 -->
|
||||
<div class="col-sm-4 col-md-4 col-lg-4">
|
||||
<input type="hidden" id="sale_id" name="sale_id" value="<%= @sale_id %>" />
|
||||
<input type="hidden" id="type" name="type" value="<%= @cashier_type %>" />
|
||||
<input type="hidden" id="page" name="page" value="<%= @page %>" />
|
||||
@@ -125,29 +122,64 @@
|
||||
<input type="hidden" id="type" name="type" value="" />
|
||||
<input type="hidden" id="table_type" name="table_type" value="" />
|
||||
<%end%>
|
||||
<% if @create_flag %>
|
||||
<div class="col-lg-3 col-md-3 col-sm-3" >
|
||||
<div class="card">
|
||||
<div class="body" id="custom-slimscroll">
|
||||
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
|
||||
|
||||
<section>
|
||||
<div class="wizard">
|
||||
<div class="wizard-inner">
|
||||
<div class="active-line"></div>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="nav-item">
|
||||
<div class="connecting-line border-right"></div>
|
||||
<a href="#step1" class="nav-link active" data-toggle="tab" aria-controls="step1" role="tab" title="Step 1">
|
||||
<span class="round-tab">
|
||||
1
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation" class="nav-item disabled">
|
||||
<div class="connecting-line"></div>
|
||||
<a href="#complete" class="nav-link disable" data-toggle="tab" aria-controls="complete" role="tab" title="Complete">
|
||||
<span class="round-tab">
|
||||
2
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= simple_form_for @crm_customer,:url => crm_customers_path, :method => :post do |f| %>
|
||||
<span class="patch_method"></span>
|
||||
<%= f.error_notification %>
|
||||
<%= f.hidden_field :id, :class => "form-control col-md-6 " %>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" role="tabpanel" id="step1">
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.salutation") %> :</label><br>
|
||||
<label class="font-15"><%= t("views.right_panel.detail.mr") %>
|
||||
<%= f.radio_button :salutation,"Mr", :class => "salutation mr", :value=>"Mr"%></label>
|
||||
<label class="font-15 m-l-5"><%= t("views.right_panel.detail.miss") %>
|
||||
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs", :value=>"Mrs"%></label>
|
||||
<label class="font-15 m-l-5"><%= t("views.right_panel.detail.mrs") %>
|
||||
<%= f.radio_button :salutation,"Miss", :class => "salutation miss", :value=>"Miss"%></label>
|
||||
<label class="font-15 m-l-5"><%= t("views.right_panel.detail.mdm") %>
|
||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm", :value=>"Mdm"%></label>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.sr_no") %></label>
|
||||
<div class="form-line disabled">
|
||||
<input type="text" name="" value="<%=@count_customer%>" class="form-control" disabled="" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label for="customer[salutation]" class="control-label"> <%= t("views.right_panel.detail.salutation") %> :</label><br>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :salutation,"Mr", :class => "salutation mr with-gap radio-col-indigo", :value=>"Mr"%><%= t("views.right_panel.detail.mr") %>
|
||||
</label>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :salutation,"Mrs", :class => "salutation mrs with-gap radio-col-indigo", :value=>"Mrs"%><%= t("views.right_panel.detail.miss") %>
|
||||
</label>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :salutation,"Miss", :class => "salutation miss with-gap radio-col-indigo", :value=>"Miss"%><%= t("views.right_panel.detail.mrs") %>
|
||||
</label>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :salutation,"Mdm", :class => "salutation mdm with-gap radio-col-indigo", :value=>"Mdm"%><%= t("views.right_panel.detail.mdm") %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :name, :class => "form-control col-md-6 name", :required => true %>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :name, :class => "form-control name", :required => true %>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['name']}\"]"
|
||||
@@ -156,63 +188,80 @@
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :contact_no, :class => "form-control contact_no" ,:required => true%>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.gender") %> :</label><br>
|
||||
<label><%= t("views.right_panel.detail.male") %>
|
||||
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male", :style=>"width: 30px"%></label>
|
||||
<label><%= t("views.right_panel.detail.female") %>
|
||||
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female", :style=>"width: 30px"%></label>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :email, :class => "form-control email" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['email']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label for="customer[gender]" class="control-label"><%= t("views.right_panel.detail.gender") %> :</label><br>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :gender,"Male", :class => "gender male", :value=>"Male"%><%= t("views.right_panel.detail.male") %></label>
|
||||
<label class="font-12 radio-inline">
|
||||
<%= f.radio_button :gender,"Female", :class => "gender female", :value=>"Female"%><%= t("views.right_panel.detail.female") %></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :nrc_no,:label => "NRC No", :class => "form-control nrc_no" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :company, :class => "form-control col-md-6 company"%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['company']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :contact_no, :class => "form-control col-md-6 contact_no" ,:required => true%>
|
||||
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :email, :class => "form-control col-md-6 email" ,:required => true%>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['contact_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block"><%= str %></span>
|
||||
<% end -%>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label class="control-label"><%= t("views.right_panel.detail.date_of_birth") %></label>
|
||||
<%= f.text_field :date_of_birth, :value=>"01-01-1990",:class=>"datepicker form-control col-md-12"%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :address, :class => "form-control address" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :address, :class => "form-control col-md-6 address" %>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
|
||||
<button type="button" class="btn btn-md bg-blue btn-info-full next-step">Next</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.sr_no") %></label>
|
||||
<input type="text" name="" value="<%=@count_customer%>" class="form-control" readonly="true">
|
||||
</div>
|
||||
</div> <!-- .end-of-step1 -->
|
||||
<div class="tab-pane" role="tabpanel" id="complete">
|
||||
<!-- <h4>Step 2</h4> -->
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.date_of_birth") %></label>
|
||||
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.customer_photo") %></label>
|
||||
<div class="panel padding-10">
|
||||
<div class="menu-item-img">
|
||||
@@ -226,41 +275,51 @@
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label><%= t("views.right_panel.detail.select_customer_type") %></label>
|
||||
<select class="form-control col-md-12" id="customer_type" name="customer[customer_type]" style="height: 40px" >
|
||||
<select class="form-control col-md-12 selectpicker show-tick" id="customer_type" name="customer[customer_type]" style="height: " >
|
||||
<% Lookup.where("lookup_type = ?", "customer_type" ).each do |ct| %>
|
||||
<option value="<%= ct.value %>">
|
||||
<%= ct.name %></option>
|
||||
<%end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control col-md-6 tax_profiles" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "has-error" : "" %>">
|
||||
<%= f.input :card_no, :class => "form-control col-md-6 card_no"%>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :tax_profiles, :collection => @taxes, :input_html => { :multiple => true }, :class => "form-control tax_profiles" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group <%= (flash["errors"]) ? "error" : "" %>">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<%= f.input :card_no, :class => "form-control card_no"%>
|
||||
<% flash.each do |name, msg| %>
|
||||
<% str="[\"#{msg['name']}\"]"
|
||||
<% str="[\"#{msg['card_no']}\"]"
|
||||
str.gsub!('["', '')
|
||||
str.gsub!('"]', '') %>
|
||||
<span class="help-block" style="margin-top:-10px"><%= str %></span>
|
||||
<% end -%>
|
||||
<lable class="error col-red m-t-10" style="margin-top:-6px"><%= str %></lable>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
|
||||
<div class="input-group">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label class="control-label"><%= t("views.right_panel.detail.paypar_account_no") %>:</label>
|
||||
<div class="-group">
|
||||
<input type="text" class="form-control" id="paypar_account_no" name="customer[paypar_account_no]" readonly/>
|
||||
<div class="input-group-addon"><span class="fa fa-credit-card"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label><%= t("views.right_panel.detail.select_membership_group") %></label>
|
||||
<select class="form-control col-md-12" name="member_group_id">
|
||||
<div class="col-sm-12 col-md-12 col-lg-12">
|
||||
<label class="control-label"><%= t("views.right_panel.detail.select_membership_group") %></label>
|
||||
<select class="form-control col-md-12 selectpicker show-tick" name="member_group_id" style="height: " >
|
||||
<option value=""><%= t("views.right_panel.detail.select_membership_group") %></option>
|
||||
<% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %>
|
||||
<option value="<%= member.value %>">
|
||||
@@ -268,20 +327,24 @@
|
||||
<%end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%= f.submit t("views.btn.submit"),:class => 'btn btn-primary btn-lg waves-effect', :id => 'submit_customer' %>
|
||||
<div class="col-sm-12 col-md-12 col-lg-12" align="right">
|
||||
<button type="button" class="btn btn-md bg-blue prev-step">Prev</button>
|
||||
<%= f.submit t("views.btn.submit"),:class => 'btn bg-blue btn-md waves-effect', :id => 'submit_customer' %>
|
||||
<!-- <%= f.button :submit, "Update",:class => 'btn bg-blue btn-block', :disabled =>'', :id => 'update_customer' %> -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- .end-of-step2 -->
|
||||
</div> <!-- .end-of-tab-content -->
|
||||
<% end %>
|
||||
</div> <!-- .end-of-wizard -->
|
||||
</section> <!-- .end-of-section -->
|
||||
</div><!-- .end-of-col-md-4 -->
|
||||
</div> <!-- .end-of-row -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<!-- Column Three -->
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sxModal">
|
||||
@@ -361,8 +424,45 @@
|
||||
}
|
||||
},100);
|
||||
});
|
||||
|
||||
/*new customer UI func:*/
|
||||
//Initialize tooltips
|
||||
$('.nav-tabs > li a[title]').tooltip();
|
||||
|
||||
//Wizard
|
||||
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
|
||||
|
||||
var $target = $(e.target);
|
||||
|
||||
if ($target.parent().hasClass('disabled')) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(".next-step").click(function (e) {
|
||||
var $active = $('.wizard .nav-tabs li a.active');
|
||||
$active.parent().next().removeClass('disabled');
|
||||
nextTab($active);
|
||||
$('.wizard .nav-tabs li.active .connecting-line').css({"border-bottom-left-radius": 0, "border-top-left-radius": 0});
|
||||
});
|
||||
$(".prev-step").click(function (e) {
|
||||
|
||||
var $active = $('.wizard .nav-tabs li a.active');
|
||||
prevTab($active);
|
||||
|
||||
});
|
||||
/*new customer UI func:*/
|
||||
});
|
||||
|
||||
/*customer UI tab btn*/
|
||||
function nextTab(elem) {
|
||||
$(elem).parent().next().find('a[data-toggle="tab"]').click();
|
||||
}
|
||||
function prevTab(elem) {
|
||||
$(elem).parent().prev().find('a[data-toggle="tab"]').click();
|
||||
}
|
||||
/*customer UI tab btn*/
|
||||
|
||||
|
||||
// Read NFC card no from java
|
||||
function getCardNo(){
|
||||
|
||||
Reference in New Issue
Block a user