Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
superuser
2017-06-26 20:02:39 +06:30
125 changed files with 3941 additions and 636 deletions

View File

@@ -27,7 +27,7 @@ $(document).ready(function(){
$('.queue_station').on('click',function(){
var orderZone=$(this).children().children().children('.order-zone').text().trim();
// var orderItem=$(this).children().children().children('.order-item').text();
//var assigned_item_id = $(this).children().find(".assigned-order-item").text();
var assigned_item_id = $(this).children().find(".assigned-order-item").text();
var orderQty = $(this).children().children().children('.order-qty').text();
var orderBy = $(this).children().children().children().children('.order-by').text();
var orderAt = $(this).children().children().children().children('.order-at').text();
@@ -68,6 +68,12 @@ $(document).ready(function(){
$(this).addClass('selected-item');
});
$(".order-item-edit").on('click', function(){
var _self = $(this); // To know in ajax return
var assigned_item_id=$(this).attr('id').substr(5);
window.location.href = '/oqs/'+ assigned_item_id + "/edit"
});
// complete for queue item
$('.order-complete').on('click',function(e){
//e.preventDefault();
@@ -134,4 +140,21 @@ $(document).ready(function(){
success: function(data){ }
});
});
// Qty update for OQS Edit Controller
$('#qty-update').on('click', function(){
var qty_weight = $("input[name='qty_weight']").val();
var remarks = $("textarea[name='remarks']").val();
var order_items_id = $(this).attr('data-id');
var params = { 'order_items_id': order_items_id, 'qty_weight': qty_weight, 'remarks': remarks }
$.ajax({
type: 'POST',
url: '/oqs/' + order_items_id,
data: params,
success: function(result){
alert("Updated!");
window.location.href = '/oqs';
}
});
});
});

View File

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View File

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View File

@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View File

@@ -19,3 +19,9 @@
color: #fff !important;
background-color: blue;
}
.order-item {
width: 49%;
font-size: 18px;
margin: 0px 0px 5px 0px;
}

View File

@@ -148,6 +148,10 @@
background-color:#7a62d3;
}
.orange{
background-color:#FF7F50;
}
.red {
background-color:#ff0000;
}
@@ -160,6 +164,10 @@
background-color: #FF8C00
}
.blue{
background-color: blue
}
.left{
margin-left:1px;
}

View File

@@ -0,0 +1,3 @@
// Place all the styles related to the reports/daily_sales controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@@ -0,0 +1,3 @@
// Place all the styles related to the reports/dailysales controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@@ -0,0 +1,3 @@
// Place all the styles related to the reports/sale_items controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/