add table to order, add numpad to order edit

This commit is contained in:
pyaephyoeaung
2022-02-21 11:20:16 +06:30
parent 02bd167fe3
commit d3395d6a37
4 changed files with 146 additions and 2 deletions

View File

@@ -13,6 +13,7 @@
<input type="hidden" name="link_type" id="link_type" value="<%= @cashier_type %>">
<input type="hidden" name="display_type" id="display_type" value="<%= @display_type%>">
<input type="hidden" name="order_id" id="order_id" value= "<%= @order_id %>">
<input type="hidden" name="table_id" value="" id="table_id">
<div class="row m-t--10 h-100">
<div class="col-lg-2 col-md-2 col-sm-2 hidden d-flex flex-column h-100" id="menu_data">
<li class="list-menu">
@@ -161,9 +162,12 @@
<div class="col-md-3 col-lg-3 col-sm-3 m-t-10 d-flex flex-column h-100">
<div class="card h-100" style="margin-right: -20px; margin-bottom: 10px;">
<div class="card-header" style="padding: 0.12rem 0.25rem">
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-12" id='app_order'>
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-8" id='app_order'>
Orders
</button>
<button class="btn btn-lg bg-blue waves-effect select_table col-md-3" data-toggle="modal" data-target="#TableModal">Select</button>
<div class="row ">
<div class="col-md-9 col-lg-9 col-sm-9 ">
<strong id="order-title" class="font-14 p-l-10">ORDER DETAILS </strong>
@@ -433,6 +437,82 @@
</div>
</div>
</div>
<div class="modal fade" id="TableModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header" style="margin-top: -1rem;">
<!-- <h4 class="modal-title" id="TableModalLabel">Select Table</h4> -->
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;">&times;</button>
</div>
<div class="modal-body" style="margin-top: -0.75rem;padding-top:5px">
<%@zone.each do |zone| %>
<h5>Zone : <%=zone.name%></h5>
<div class="card-columns" style="column-count: 7;">
<%zone.tables.each do |table| %>
<% if table.status == 'occupied' %>
<% if table.get_booking.nil? %>
<% if table.get_checkout_booking.nil? %>
<% color="red"%>
<% else %>
<% color="orange"%>
<% end %>
<% else %>
<% if table.get_checkout_booking.nil? %>
<% color="blue"%>
<% else %>
<% color="orange"%>
<% end %>
<% end %>
<% else %>
<% color="green"%>
<% end %>
<div class="card tables <%=color%> text-white table_<%= table.id %>" data-id="<%= table.id %>" data-type="<%= table.type %>" data-name="<%= table.name %>">
<div class="card-block">
<%= table.name %>
</div>
</div>
<%end%>
<%zone.rooms.each do |table| %>
<% if table.status == 'occupied' %>
<% if table.get_booking.nil? %>
<% if table.get_checkout_booking.nil? %>
<% color="red"%>
<% else %>
<% color="orange"%>
<% end %>
<% else %>
<% if table.get_checkout_booking.nil? %>
<% color="blue"%>
<% else %>
<% color="orange"%>
<% end %>
<% end %>
<% else %>
<% color="green"%>
<% end %>
<div class="card tables <%=color%> text-white table_<%= table.id %>" data-id="<%= table.id %>" data-type="<%= table.type %>" data-name="<%= table.name %>">
<div class="card-block">
<%= table.name %>
</div>
</div>
<%end%>
</div>
<%end%>
<div class="modal-footer p-r-30">
<button type="button" class="btn btn-link btn-danger waves-effect" data-dismiss="modal">CLOSE</button>
&nbsp; &nbsp;
<button type="button" class="btn btn-link bg-blue waves-effect confirm_table" data-dismiss="modal">Confirm</button>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
</div>
<style type="text/css">