Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into ui_design
This commit is contained in:
@@ -92,9 +92,12 @@ json.options opt_format
|
||||
json.instances item.menu_item_instances do |is|
|
||||
# Convert id to name for attributes
|
||||
instance_attr = []
|
||||
|
||||
is.item_attributes.each do |ia|
|
||||
# mItemAttr = MenuItemAttribute.find(is)
|
||||
instance_attr.push(ia)
|
||||
# instance_attr.push(ia)
|
||||
mItemAttr = MenuItemAttribute.find(ia).name
|
||||
instance_attr.push(mItemAttr)
|
||||
end
|
||||
|
||||
json.id is.id
|
||||
|
||||
@@ -138,7 +138,29 @@
|
||||
<div id="sxModal">
|
||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
||||
</div>
|
||||
<!-- The modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="modalLabelLarge" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" style="margin-left:-380px">
|
||||
<div class="modal-content">
|
||||
|
||||
<!-- <div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabelLarge">Large Shoes</h4>
|
||||
</div> -->
|
||||
|
||||
<div class="modal-body">
|
||||
<div id="container">
|
||||
<video autoplay="true" id="videoElement">
|
||||
|
||||
</video>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
// Read Card Reader
|
||||
|
||||
@@ -33,6 +33,11 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<button id="member_acc_no" class="btn btn-success btn-md"><span class="fa fa-credit-card"></span> Member Card</button>
|
||||
<button id="qr_code" class="btn btn-danger btn-md">
|
||||
<span class="fa fa-credit-card"></span> QR CODE
|
||||
</button>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -91,6 +96,7 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
|
||||
$('.datepicker').datepicker({
|
||||
format : 'dd-mm-yyyy',
|
||||
autoclose: true
|
||||
@@ -108,6 +114,27 @@ $(function() {
|
||||
$("#filter_form").submit();
|
||||
},100);
|
||||
});
|
||||
|
||||
// QR Code Reader
|
||||
$("#qr_code").on('click', function(e){
|
||||
var code = "";
|
||||
setTimeout(function(){
|
||||
var hi=getQRCode();
|
||||
alert(hi);
|
||||
},100);
|
||||
});
|
||||
|
||||
// Read qrcode from java
|
||||
function getQRCode(){
|
||||
return code2lab.readQRCode();
|
||||
}
|
||||
|
||||
// get QRCode from Java
|
||||
function setQRCode(code){
|
||||
$("#qr_code").text(code);
|
||||
$("#search").val(code);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click',".customer_tr",function(){
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<div class="modal-dialog custom-modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title"></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -97,12 +97,12 @@
|
||||
|
||||
<!-- Menu Item modal -->
|
||||
|
||||
<div class="item-modal modal sx_item_detailModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||
<div class="item-modal modal sx_item_detailModal" id="sx_item_detailModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog custom-modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #54A5AF;">
|
||||
<h4 class="modal-title" style="color:#fff;" id="title_name"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#fff;">×</button>
|
||||
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#fff;">×</button>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -159,12 +159,12 @@
|
||||
|
||||
|
||||
<!-- Large modal -->
|
||||
<div class=" modal sx_item_set_detailModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" >
|
||||
<div class=" modal sx_item_set_detailModal" id="sx_item_set_detailModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" >
|
||||
<div class="modal-dialog custom-modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header" style="background-color: #54A5AF;">
|
||||
<h4 class="modal-title" style="color:#fff;" id="set_name"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#fff;">×</button>
|
||||
<button type="button" class="close" id="close" data-dismiss="modal" aria-hidden="true" style="font-size: 20px;color:#fff;">×</button>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -197,7 +197,7 @@
|
||||
<p class="hidden" id="set_item_instances"></p>
|
||||
<p class="hidden" id="set_item_code"></p>
|
||||
<p></p>
|
||||
<br><br><br><br>
|
||||
|
||||
<div class="options-list">
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
if @menu.menu_items
|
||||
json.menu_items @menu.menu_items do |item|
|
||||
json.partial! 'origami/addorders/menu_item', item: item
|
||||
if item.is_available
|
||||
json.partial! 'origami/addorders/menu_item', item: item
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -147,6 +147,7 @@ $(document).on('click', '.cashier_number', function(event){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#redeem").click(function(){
|
||||
valid_amount = $("#valid_amount").val();
|
||||
sale_id = $("#valid_amount").attr('data-value');
|
||||
|
||||
Reference in New Issue
Block a user