update move table

This commit is contained in:
Aung Myo
2018-06-13 13:43:02 +06:30
parent 676ec4d611
commit f41b882730
2 changed files with 8 additions and 5 deletions

View File

@@ -35,9 +35,9 @@
</div>
<% else %>
<% if table.get_checkout_booking.nil? %>
<div class="card tables blue text-white" data-id="<%= table.id %>">
<div class="card tables blue text-white" data-id="<%= table.id %>" data-name=" <%= table.name %>">
<% else %>
<div class="card tables orange text-white" data-id="<%= table.id %>">
<div class="card tables orange text-white" data-id="<%= table.id %>" data-name=" <%= table.name %>">
<% end %>
<div class="card-block">
<%= table.name %>

View File

@@ -34,9 +34,9 @@
</div>
<% else %>
<% if table.get_checkout_booking.nil? %>
<div class="card tables blue text-white" data-id="<%= table.id %>">
<div class="card tables blue text-white" data-id="<%= table.id %>" data-name=" <%= table.name %>">
<% else %>
<div class="card tables orange text-white" data-id="<%= table.id %>">
<div class="card tables orange text-white" data-id="<%= table.id %>" data-name=" <%= table.name %>">
<% end %>
<div class="card-block">
<%= table.name %>
@@ -351,7 +351,10 @@ end
var dining_name = $(this).attr("data-name");
var dining_id = $(this).attr("data-id");
var change_from = "<%= @dining.id %>";
if ((dining_id == change_from) || (dining_name==undefined)) {
console.log(dining_id);
console.log(change_from);
console.log(dining_name);
if ((dining_id == change_from)) {
swal({
title: "Alert!!",
text: 'Please select another table !',