merge with august spring from phyo
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div class="row">
|
||||
<!-- <div class="row">
|
||||
<div class="col-lg-12">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<%= crm_root_path %>">Home</a></li>
|
||||
@@ -7,17 +7,17 @@
|
||||
</li>
|
||||
<!-- <a href="<%= new_crm_customer_path%>" class="btn btn-primary pull-right">
|
||||
<i class="fa fa-plus-circle fa-lg"></i> Add Customer
|
||||
</a> -->
|
||||
</a>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<div class="col-lg-7 col-md-7 col-sm-7">
|
||||
|
||||
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
|
||||
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
@@ -25,7 +25,7 @@
|
||||
<%= form_tag crm_customers_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" 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> -->
|
||||
|
||||
<!-- <button type="button" class="btn btn-info btn-md" data-toggle="modal" data-target="#myModal">Open Modal</button> -->
|
||||
@@ -48,12 +48,12 @@
|
||||
<tbody>
|
||||
<% @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" %>
|
||||
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||
<%= @i += 1 %>
|
||||
<% end %>
|
||||
</td>
|
||||
@@ -62,15 +62,15 @@
|
||||
<td><%= crm_customer.contact_no %></td>
|
||||
<td><%= crm_customer.email %></td>
|
||||
<td><%= link_to 'Show', crm_customer_path(crm_customer) %></td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
|
||||
<%= paginate @crm_customers %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,9 +98,9 @@ $(function() {
|
||||
$('.datepicker').css('cursor','pointer');
|
||||
|
||||
// Read Card Reader
|
||||
$("#member_acc_no").on('click', function(e){
|
||||
var cardNo = "";
|
||||
$("#sxModal").show();
|
||||
$("#member_acc_no").on('click', function(e){
|
||||
var cardNo = "";
|
||||
$("#sxModal").show();
|
||||
setTimeout(function(){
|
||||
getCardNo();
|
||||
$("#sxModal").hide();
|
||||
@@ -120,13 +120,13 @@ $(document).on('click',".customer_tr",function(){
|
||||
// var url = "/"+customer_id;
|
||||
update_sale(customer_id,sale_id);
|
||||
}else{
|
||||
|
||||
|
||||
var url = "customers/"+customer_id;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
@@ -166,7 +166,7 @@ $(document).on('click',".customer_tr",function(){
|
||||
}else{
|
||||
$('.mdm').prop( "checked", true )
|
||||
}
|
||||
|
||||
|
||||
$('.membership_authentication_code').val(data.membership_authentication_code);
|
||||
|
||||
$('#update_customer').removeAttr('disabled').val('');
|
||||
@@ -185,7 +185,7 @@ $(document).on('click',".customer_tr",function(){
|
||||
}
|
||||
});
|
||||
// }else{
|
||||
|
||||
|
||||
// }
|
||||
})
|
||||
|
||||
@@ -194,44 +194,43 @@ $(document).on('click',".customer_tr",function(){
|
||||
title: 'Confirm!',
|
||||
content: 'Are You Sure to assign this customer!',
|
||||
buttons: {
|
||||
|
||||
|
||||
cancel: function () {
|
||||
|
||||
|
||||
},
|
||||
confirm: {
|
||||
text: 'Confirm',
|
||||
btnClass: 'btn-green',
|
||||
keys: ['enter', 'shift'],
|
||||
action: function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "update_sale/" ,
|
||||
data: {customer_id:customer_id,sale_id:sale_id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
{
|
||||
window.location.href = '/origami'
|
||||
}else{
|
||||
alert('Record not found!');
|
||||
location.reload();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#reset').click(function() {
|
||||
|
||||
|
||||
window.location.href = '/crm/customers'
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="page-header">
|
||||
<!-- <div class="page-header">
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="<%= %>">Home</a></li>
|
||||
<li>Queue</li>
|
||||
@@ -6,19 +6,19 @@
|
||||
<%= link_to t('.new', :default => t("helpers.links.new")),new_crm_dining_queue_path,:class => 'btn btn-primary btn-sm' %>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="row">
|
||||
<!-- Column One -->
|
||||
<div class="col-lg-11 col-md-11 col-sm-11">
|
||||
|
||||
<div class="tab-content" style="max-height:670px; overflow-y:scroll">
|
||||
<div class="tab-content" style="max-height:670px; overflow-y:auto">
|
||||
|
||||
<!--- Panel 1 - Table Orders -->
|
||||
<div class="active" role="tabpanel">
|
||||
<div class="tab-pane" role="tabpanel">
|
||||
<div class="card-columns" style="padding-top:10px; column-gap: 1.2rem;">
|
||||
|
||||
|
||||
<% @dining_queues.each do |queue| %>
|
||||
<% if queue.status == "Assign"
|
||||
@bg_color = "assign"
|
||||
@@ -27,10 +27,10 @@
|
||||
else
|
||||
@bg_color = "normal"
|
||||
end
|
||||
%>
|
||||
%>
|
||||
<div class="card select-queue <%= @bg_color %>" data-id="<%= queue.id %>" style="width: 21.5rem;">
|
||||
<div class="card-block">
|
||||
<p class="hidden queue-id"><%= queue.id %></p>
|
||||
<p class="hidden queue-id"><%= queue.id %></p>
|
||||
<p class="hidden queue-status"><%= queue.status %></p>
|
||||
<span class="card-title"><strong> Queue No : <%= queue.queue_no %></strong></span>
|
||||
<span class="card-title pull-right"><strong> Seater : <%= queue.seater %></strong></span><br>
|
||||
@@ -39,7 +39,7 @@
|
||||
<span class="card-title"> Remark : <%= queue.remark %></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,8 +48,10 @@
|
||||
<!-- tabs - End -->
|
||||
</div>
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<%= link_to t('.new', :default => t("helpers.links.new")),new_crm_dining_queue_path,:class => 'btn btn-primary btn-lg btn-block' %>
|
||||
<hr>
|
||||
<button type="button" id="assign" class="btn btn-primary btn-lg btn-block" disabled>Assign</button>
|
||||
<button type="button" id="cancel" class="btn btn-warning btn-lg btn-block" disabled>Cancel</button>
|
||||
<button type="button" id="cancel" class="btn btn-warning btn-lg btn-block" disabled>Cancel</button>
|
||||
<a href="<%= dashboard_path %>" class="btn btn-primary btn-lg btn-block" role="button" aria-haspopup="true" aria-expanded="false"> Back </a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,7 +73,7 @@ $(function(){
|
||||
$("#cancel").val($(this).find(".queue-id").text());
|
||||
}); //End Click
|
||||
|
||||
|
||||
|
||||
});
|
||||
$('#assign').click(function() {
|
||||
var id = $(this).val();
|
||||
@@ -90,31 +92,31 @@ function cancel_queue(id,url) {
|
||||
title: 'Confirm!',
|
||||
content: 'Are You Sure to cancel this Queue!',
|
||||
buttons: {
|
||||
cancel: function () {
|
||||
cancel: function () {
|
||||
},
|
||||
confirm: {
|
||||
text: 'Confirm',
|
||||
btnClass: 'btn-green',
|
||||
keys: ['enter', 'shift'],
|
||||
action: function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url ,
|
||||
data: {id:id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user