Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
@@ -178,6 +178,9 @@ For MoveTablePdf in print settings
|
|||||||
/* Tax Profile Group Types in lookups */
|
/* Tax Profile Group Types in lookups */
|
||||||
>>>>>>> 1c13b0469758fb968c0dfcc1f0a876ed2c5e395a
|
>>>>>>> 1c13b0469758fb968c0dfcc1f0a876ed2c5e395a
|
||||||
|
|
||||||
|
Add Kitchen Role of Employee
|
||||||
|
=> 1) settings/lookups => { type:employee_roles, name: Kitchen, value:kitchen }
|
||||||
|
|
||||||
* ToDo list
|
* ToDo list
|
||||||
|
|
||||||
1. Migration
|
1. Migration
|
||||||
|
|||||||
@@ -266,11 +266,22 @@ $(function() {
|
|||||||
$('.set_order').attr('data-min-qty',item_sets[field]["min_selectable_qty"]);
|
$('.set_order').attr('data-min-qty',item_sets[field]["min_selectable_qty"]);
|
||||||
|
|
||||||
value = item_sets[field]["instances"];
|
value = item_sets[field]["instances"];
|
||||||
|
|
||||||
$(value).each(function(i){
|
$(value).each(function(i){
|
||||||
|
if (type != -1 && modify_order != -1) {
|
||||||
|
url = '../../../../api/restaurant/menu_item_instances/'+value[i]["id"];
|
||||||
|
console.log("ssssssss")
|
||||||
|
}
|
||||||
|
if(modify_order == -1 && type != -1){
|
||||||
|
url = '../../api/restaurant/menu_item_instances/'+value[i]["id"] ;
|
||||||
|
console.log("aaaaaa")
|
||||||
|
}
|
||||||
|
if (type ==-1 && modify_order == -1){
|
||||||
|
url = '../../api/restaurant/menu_item_instances/'+value[i]["id"];
|
||||||
|
console.log("cccccccccc")
|
||||||
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: '../../api/restaurant/menu_item_instances/'+value[i]["id"],
|
url: url,
|
||||||
data: {id:value[i]},
|
data: {id:value[i]},
|
||||||
success:function(result){
|
success:function(result){
|
||||||
|
|
||||||
@@ -370,7 +381,7 @@ $(function() {
|
|||||||
// $(this).removeAttr('data-options');
|
// $(this).removeAttr('data-options');
|
||||||
// $('#instance_option').text('')
|
// $('#instance_option').text('')
|
||||||
// }else {
|
// }else {
|
||||||
if (rowCount.length+1 <= max_qty) {
|
if (setCount.length+1 <= max_qty) {
|
||||||
sub_total = $('#set_total_price').text();
|
sub_total = $('#set_total_price').text();
|
||||||
name = $(this).data('name');
|
name = $(this).data('name');
|
||||||
price = $(this).data('price');
|
price = $(this).data('price');
|
||||||
@@ -1317,9 +1328,18 @@ console.log(d_option)
|
|||||||
}
|
}
|
||||||
|
|
||||||
function customer_display_view(data,status) {
|
function customer_display_view(data,status) {
|
||||||
|
if (type != -1 && modify_order != -1) {
|
||||||
|
url = '../../../../origami/customer_view';
|
||||||
|
}
|
||||||
|
if(modify_order == -1 && type != -1){
|
||||||
|
url = '../../origami/customer_view';
|
||||||
|
}
|
||||||
|
if (type ==-1 && modify_order == -1){
|
||||||
|
url = '../../origami/customer_view';
|
||||||
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: '../../origami/customer_view',
|
url: url,
|
||||||
data: {"data":data,"status":status},
|
data: {"data":data,"status":status},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success:function(result){
|
success:function(result){
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ class HomeController < ApplicationController
|
|||||||
elsif @employee.role == "account"
|
elsif @employee.role == "account"
|
||||||
session[:session_token] = @employee.token_session
|
session[:session_token] = @employee.token_session
|
||||||
redirect_to reports_dailysale_index_path
|
redirect_to reports_dailysale_index_path
|
||||||
|
elsif @employee.role == "kitchen"
|
||||||
|
session[:session_token] = @employee.token_session
|
||||||
|
redirect_to oqs_root_path
|
||||||
else
|
else
|
||||||
render :index
|
render :index
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
class Oqs::EditController < BaseOqsController
|
class Oqs::EditController < BaseOqsController
|
||||||
|
authorize_resource :class => false
|
||||||
def index
|
def index
|
||||||
assigned_item_id = params[:id]
|
assigned_item_id = params[:id]
|
||||||
@link_type = params[:type]
|
@link_type = params[:type]
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
class Oqs::HomeController < BaseOqsController
|
class Oqs::HomeController < BaseOqsController
|
||||||
|
authorize_resource :class => false
|
||||||
def index
|
def index
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Query for OQS with delivery status false
|
# Query for OQS with delivery status false
|
||||||
# @queue_items_details = queue_items_query(false)
|
# @queue_items_details = queue_items_query(false)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
class Oqs::PrintController < ApplicationController
|
class Oqs::PrintController < ApplicationController
|
||||||
|
authorize_resource :class => false
|
||||||
# Print Order Item
|
# Print Order Item
|
||||||
def print
|
def print
|
||||||
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
if ENV["SERVER_MODE"] != "cloud" #no print in cloud server
|
||||||
|
|||||||
@@ -98,6 +98,22 @@ class Ability
|
|||||||
can :create, :split_bill
|
can :create, :split_bill
|
||||||
can :update_sale, :split_bill
|
can :update_sale, :split_bill
|
||||||
|
|
||||||
|
#oqs Home
|
||||||
|
can :index, :home
|
||||||
|
can :index, :show
|
||||||
|
can :get_order_items, :home
|
||||||
|
can :get_items_by_oqs, :home
|
||||||
|
can :update_delivery_status, :home
|
||||||
|
can :queue_items_query, :home
|
||||||
|
can :completed_order, :home
|
||||||
|
can :queue_items_count_query, :home
|
||||||
|
|
||||||
|
can :index, :edit
|
||||||
|
can :update, :edit
|
||||||
|
|
||||||
|
can :print, :print
|
||||||
|
can :print_order_summary, :print
|
||||||
|
|
||||||
elsif user.role == "cashier"
|
elsif user.role == "cashier"
|
||||||
|
|
||||||
# can :overall_void, :void
|
# can :overall_void, :void
|
||||||
@@ -145,6 +161,22 @@ class Ability
|
|||||||
can :create, :split_bill
|
can :create, :split_bill
|
||||||
can :update_sale, :split_bill
|
can :update_sale, :split_bill
|
||||||
|
|
||||||
|
#oqs Home
|
||||||
|
can :index, :home
|
||||||
|
can :index, :show
|
||||||
|
can :get_order_items, :home
|
||||||
|
can :get_items_by_oqs, :home
|
||||||
|
can :update_delivery_status, :home
|
||||||
|
can :queue_items_query, :home
|
||||||
|
can :completed_order, :home
|
||||||
|
can :queue_items_count_query, :home
|
||||||
|
|
||||||
|
can :index, :edit
|
||||||
|
can :update, :edit
|
||||||
|
|
||||||
|
can :print, :print
|
||||||
|
can :print_order_summary, :print
|
||||||
|
|
||||||
elsif user.role == "account"
|
elsif user.role == "account"
|
||||||
|
|
||||||
can :index, :dailysale
|
can :index, :dailysale
|
||||||
@@ -206,6 +238,23 @@ class Ability
|
|||||||
can :index, :split_bill
|
can :index, :split_bill
|
||||||
can :create, :split_bill
|
can :create, :split_bill
|
||||||
can :update_sale, :split_bill
|
can :update_sale, :split_bill
|
||||||
|
|
||||||
|
#oqs Home
|
||||||
|
can :index, :home
|
||||||
|
can :index, :show
|
||||||
|
can :get_order_items, :home
|
||||||
|
can :get_items_by_oqs, :home
|
||||||
|
can :update_delivery_status, :home
|
||||||
|
can :queue_items_query, :home
|
||||||
|
can :completed_order, :home
|
||||||
|
can :queue_items_count_query, :home
|
||||||
|
|
||||||
|
can :index, :edit
|
||||||
|
can :update, :edit
|
||||||
|
|
||||||
|
can :print, :print
|
||||||
|
can :print_order_summary, :print
|
||||||
|
|
||||||
elsif user.role == "waiter"
|
elsif user.role == "waiter"
|
||||||
can :index, :home
|
can :index, :home
|
||||||
can :show, :home
|
can :show, :home
|
||||||
@@ -232,6 +281,40 @@ class Ability
|
|||||||
#ability for split_bill
|
#ability for split_bill
|
||||||
can :index, :split_bill
|
can :index, :split_bill
|
||||||
can :create, :split_bill
|
can :create, :split_bill
|
||||||
|
|
||||||
|
#oqs Home
|
||||||
|
can :index, :home
|
||||||
|
can :index, :show
|
||||||
|
can :get_order_items, :home
|
||||||
|
can :get_items_by_oqs, :home
|
||||||
|
can :update_delivery_status, :home
|
||||||
|
can :queue_items_query, :home
|
||||||
|
can :completed_order, :home
|
||||||
|
can :queue_items_count_query, :home
|
||||||
|
|
||||||
|
can :index, :edit
|
||||||
|
can :update, :edit
|
||||||
|
|
||||||
|
can :print, :print
|
||||||
|
can :print_order_summary, :print
|
||||||
|
|
||||||
|
elsif user.role == "kitchen"
|
||||||
|
|
||||||
|
#oqs Home
|
||||||
|
can :index, :home
|
||||||
|
can :index, :show
|
||||||
|
can :get_order_items, :home
|
||||||
|
can :get_items_by_oqs, :home
|
||||||
|
can :update_delivery_status, :home
|
||||||
|
can :queue_items_query, :home
|
||||||
|
can :completed_order, :home
|
||||||
|
can :queue_items_count_query, :home
|
||||||
|
|
||||||
|
can :index, :edit
|
||||||
|
can :update, :edit
|
||||||
|
|
||||||
|
can :print, :print
|
||||||
|
can :print_order_summary, :print
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -193,8 +193,6 @@
|
|||||||
<button type="button" data-href="<%=origami_second_display_index_path%>" target="_blank" id="second_view" class="btn action-btn bg-blue waves-effect second_view hidden" style="height: 45px">Customer View</button>
|
<button type="button" data-href="<%=origami_second_display_index_path%>" target="_blank" id="second_view" class="btn action-btn bg-blue waves-effect second_view hidden" style="height: 45px">Customer View</button>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(".cashier_view").on('click', function() {
|
$(".cashier_view").on('click', function() {
|
||||||
window.location.href = '/origami';
|
window.location.href = '/origami';
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user