Merge branch 'adminbsb_material_ui'
This commit is contained in:
@@ -776,8 +776,8 @@ $(function() {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$("#oqs_loading_wrapper").show();
|
$("#oqs_loading_wrapper").show();
|
||||||
|
|
||||||
type = window.location.href.indexOf("quick_service");
|
quick_service = window.location.href.indexOf("quick_service");
|
||||||
if (type != -1) {
|
if (quick_service != -1) {
|
||||||
type = 'quick_service'
|
type = 'quick_service'
|
||||||
var table_type = $('#table_type').text();
|
var table_type = $('#table_type').text();
|
||||||
var table_id = $('#table_id').val();
|
var table_id = $('#table_id').val();
|
||||||
@@ -813,7 +813,8 @@ $(function() {
|
|||||||
data: params,
|
data: params,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success:function(result){
|
success:function(result){
|
||||||
customer_display_view(null,"reload");
|
console.log(type)
|
||||||
|
console.log(table_type)
|
||||||
if (type == "quick_service") {
|
if (type == "quick_service") {
|
||||||
window.location.href = "/origami/quick_service"
|
window.location.href = "/origami/quick_service"
|
||||||
}else{
|
}else{
|
||||||
@@ -824,6 +825,7 @@ $(function() {
|
|||||||
window.location.href = "/origami/room/" + table_id
|
window.location.href = "/origami/room/" + table_id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
customer_display_view(null,"reload");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// }else{
|
// }else{
|
||||||
|
|||||||
@@ -10,10 +10,12 @@ App.checkin = App.cable.subscriptions.create('SecondDisplayViewChannel', {
|
|||||||
var tax = data.tax_profiles;
|
var tax = data.tax_profiles;
|
||||||
var status= data.status
|
var status= data.status
|
||||||
if (status == "reload") {
|
if (status == "reload") {
|
||||||
window.location.reload();
|
jQuery('#s_reload').click();
|
||||||
}
|
}
|
||||||
$('#second_display_slider').addClass("hidden")
|
$('#second_display_slider').addClass("hidden")
|
||||||
$('#second_display_items').removeClass("hidden")
|
$('#second_display_items').removeClass("hidden")
|
||||||
|
|
||||||
|
|
||||||
// append items
|
// append items
|
||||||
if (status == "add") {
|
if (status == "add") {
|
||||||
for(var i in items) {
|
for(var i in items) {
|
||||||
@@ -84,8 +86,6 @@ App.checkin = App.cable.subscriptions.create('SecondDisplayViewChannel', {
|
|||||||
var attribute_arr = [];
|
var attribute_arr = [];
|
||||||
var rowCount = $('.second_display_items tbody tr').length+1;
|
var rowCount = $('.second_display_items tbody tr').length+1;
|
||||||
for(var i in items) {
|
for(var i in items) {
|
||||||
|
|
||||||
|
|
||||||
code = items[i].code;
|
code = items[i].code;
|
||||||
item_code = items[i].item_code;
|
item_code = items[i].item_code;
|
||||||
name = items[i].name;
|
name = items[i].name;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
<button type="button" class="hidden" id="s_reload">Reload</button>
|
||||||
<div class="slider" id="second_display_slider">
|
<div class="slider" id="second_display_slider">
|
||||||
<%= render 'slider' %>
|
<%= render 'slider' %>
|
||||||
</div>
|
</div>
|
||||||
@@ -7,5 +8,12 @@
|
|||||||
<%= render 'second_display' %>
|
<%= render 'second_display' %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('#s_reload').on('click', function () {
|
||||||
|
window.location.href = '/origami/second_display';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user