Remove BreadCrumb on CRM

This commit is contained in:
Phyo
2017-08-08 18:12:50 +06:30
parent a83b2c3acd
commit fe8e246898

View File

@@ -1,4 +1,4 @@
<div class="row"> <!-- <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a href="<%= crm_root_path %>">Home</a></li> <li><a href="<%= crm_root_path %>">Home</a></li>
@@ -7,17 +7,17 @@
</li> </li>
<!-- <a href="<%= new_crm_customer_path%>" class="btn btn-primary pull-right"> <!-- <a href="<%= new_crm_customer_path%>" class="btn btn-primary pull-right">
<i class="fa fa-plus-circle fa-lg"></i> Add Customer <i class="fa fa-plus-circle fa-lg"></i> Add Customer
</a> --> </a>
</ol> </ol>
</div> </div>
</div> </div> -->
<div class="row"> <div class="row">
<div class="col-lg-7 col-md-7 col-sm-7"> <div class="col-lg-7 col-md-7 col-sm-7">
<div class="main-box-body clearfix"> <div class="main-box-body clearfix">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
@@ -25,7 +25,7 @@
<%= form_tag crm_customers_path, :id => "filter_form", :method => :get do %> <%= form_tag crm_customers_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">
<input type="text" name="filter" style="margin-right:10px" placeholder="Search" id="search" class="form-control input-xs col-md-9"> <input type="text" name="filter" style="margin-right:10px" placeholder="Search" id="search" class="form-control input-xs col-md-9">
<button type="submit" class="btn btn-primary btn-md">Search</button> <button type="submit" class="btn btn-primary btn-md">Search</button>
<!-- <a href="modal-window" data-toggle= "modal" data-target="#modal-window" class="btn btn-primary btn-md" id="card_read" >Read Card</a> --> <!-- <a href="modal-window" data-toggle= "modal" data-target="#modal-window" class="btn btn-primary btn-md" id="card_read" >Read Card</a> -->
<!-- <button type="button" class="btn btn-info btn-md" data-toggle="modal" data-target="#myModal">Open Modal</button> --> <!-- <button type="button" class="btn btn-info btn-md" data-toggle="modal" data-target="#myModal">Open Modal</button> -->
@@ -48,12 +48,12 @@
<tbody> <tbody>
<% @i = 0 %> <% @i = 0 %>
<% @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" style="width:20px;" 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 %>
<% end %> <% end %>
</td> </td>
@@ -62,15 +62,15 @@
<td><%= crm_customer.contact_no %></td> <td><%= crm_customer.contact_no %></td>
<td><%= crm_customer.email %></td> <td><%= crm_customer.email %></td>
<td><%= link_to 'Show', crm_customer_path(crm_customer) %></td> <td><%= link_to 'Show', crm_customer_path(crm_customer) %></td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>
</table> </table>
<br> <br>
<%= paginate @crm_customers %> <%= paginate @crm_customers %>
</div> </div>
</div> </div>
@@ -98,9 +98,9 @@ $(function() {
$('.datepicker').css('cursor','pointer'); $('.datepicker').css('cursor','pointer');
// Read Card Reader // Read Card Reader
$("#member_acc_no").on('click', function(e){ $("#member_acc_no").on('click', function(e){
var cardNo = ""; var cardNo = "";
$("#sxModal").show(); $("#sxModal").show();
setTimeout(function(){ setTimeout(function(){
getCardNo(); getCardNo();
$("#sxModal").hide(); $("#sxModal").hide();
@@ -120,16 +120,16 @@ $(document).on('click',".customer_tr",function(){
// var url = "/"+customer_id; // var url = "/"+customer_id;
update_sale(customer_id,sale_id); update_sale(customer_id,sale_id);
}else{ }else{
var url = "customers/"+customer_id; var url = "customers/"+customer_id;
} }
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: url, url: url,
data: {}, data: {},
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
$('#customer_id').val(data.id); $('#customer_id').val(data.id);
$('#customer_name').val(data.name); $('#customer_name').val(data.name);
$('#customer_company').val(data.company); $('#customer_company').val(data.company);
@@ -158,7 +158,7 @@ $(document).on('click',".customer_tr",function(){
}else{ }else{
$('.mdm').prop( "checked", true ) $('.mdm').prop( "checked", true )
} }
$('.membership_authentication_code').val(data.membership_authentication_code); $('.membership_authentication_code').val(data.membership_authentication_code);
$('#update_customer').removeAttr('disabled').val(''); $('#update_customer').removeAttr('disabled').val('');
@@ -177,7 +177,7 @@ $(document).on('click',".customer_tr",function(){
} }
}); });
// }else{ // }else{
// } // }
}) })
@@ -186,44 +186,43 @@ $(document).on('click',".customer_tr",function(){
title: 'Confirm!', title: 'Confirm!',
content: 'Are You Sure to assign this customer!', content: 'Are You Sure to assign this customer!',
buttons: { buttons: {
cancel: function () { cancel: function () {
}, },
confirm: { confirm: {
text: 'Confirm', text: 'Confirm',
btnClass: 'btn-green', btnClass: 'btn-green',
keys: ['enter', 'shift'], keys: ['enter', 'shift'],
action: function(){ action: function(){
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "update_sale/" , url: "update_sale/" ,
data: {customer_id:customer_id,sale_id:sale_id}, data: {customer_id:customer_id,sale_id:sale_id},
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
if(data.status == true) if(data.status == true)
{ {
window.location.href = '/origami' window.location.href = '/origami'
}else{ }else{
alert('Record not found!'); alert('Record not found!');
location.reload(); location.reload();
} }
} }
}); });
} }
} }
} }
}); });
} }
$('#reset').click(function() { $('#reset').click(function() {
window.location.href = '/crm/customers' window.location.href = '/crm/customers'
return false; return false;
}); });
</script> </script>