Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into staging
This commit is contained in:
@@ -10,6 +10,7 @@ $(function(){
|
||||
|
||||
//show menu item list when click menu category
|
||||
function show_menu_item_list(url_item){
|
||||
|
||||
var menu_list = $('.menu_items_list');
|
||||
menu_list.empty();
|
||||
//Start Ajax
|
||||
@@ -22,22 +23,11 @@ $(function(){
|
||||
var menu_items_list = $('.menu_items_list');
|
||||
menu_items_list.empty();
|
||||
menu_items = data.menu_items;
|
||||
|
||||
|
||||
for(var field in menu_items) {
|
||||
if (menu_items[field].is_sub_item == false) {
|
||||
instances = menu_items[field].instances ;
|
||||
$(instances).each(function(i){
|
||||
if (instances[i].is_default === true) {
|
||||
code = instances[i].code;
|
||||
name = instances[i].name;
|
||||
price = parseFloat(instances[i].price).toFixed(2);
|
||||
is_available = instances[i].is_available ;
|
||||
is_on_promotion = instances[i].is_on_promotion;
|
||||
item_attributes = instances[i].values;
|
||||
promotion_price = instances[i].promotion_price;
|
||||
code = instances[i].code;
|
||||
}
|
||||
});
|
||||
|
||||
qty = 1;
|
||||
options = [];
|
||||
|
||||
@@ -45,10 +35,32 @@ $(function(){
|
||||
fa_plus = '';
|
||||
menu_item_box = 'set_item_box';
|
||||
data_target = 'sx_item_set_detailModal';
|
||||
|
||||
code = menu_items[field].code;
|
||||
name = menu_items[field].name;
|
||||
price = 0;//parseFloat( menu_items[field].price).toFixed(2);
|
||||
is_available = menu_items[field].is_available ;
|
||||
is_on_promotion = 0;
|
||||
item_attributes = menu_items[field].attributes;
|
||||
promotion_price = menu_items[field].promotion_price;
|
||||
}else{
|
||||
fa_plus = 'fa-plus';
|
||||
menu_item_box = 'menu_item_box';
|
||||
data_target = 'sx_item_detailModal'
|
||||
data_target = 'sx_item_detailModal';
|
||||
|
||||
$(instances).each(function(i){
|
||||
if (instances[i].is_default === true) {
|
||||
code = instances[i].code;
|
||||
name = instances[i].name;
|
||||
price = parseFloat(instances[i].price).toFixed(2);
|
||||
is_available = instances[i].is_available ;
|
||||
is_on_promotion = instances[i].is_on_promotion;
|
||||
item_attributes = instances[i].values;
|
||||
promotion_price = instances[i].promotion_price;
|
||||
code = instances[i].code;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (menu_items[field].image) {
|
||||
@@ -108,6 +120,9 @@ $(function(){
|
||||
item_sets = $(this).data('item-sets');
|
||||
|
||||
for(var field in item_sets) {
|
||||
|
||||
$('.set_order').attr('data-min-qty',item_sets[field]["min_selectable_qty"]);
|
||||
|
||||
value = item_sets[field]["instances"];
|
||||
$(value).each(function(i){
|
||||
$.ajax({
|
||||
@@ -121,6 +136,8 @@ $(function(){
|
||||
+"' data-code='"+result["code"]
|
||||
+"' data-price='"+result["price"]
|
||||
+"' data-option='"+JSON.stringify(result["options"])
|
||||
+"' data-min-qty='"+item_sets[field]["min_selectable_qty"]
|
||||
+"' data-max-qty='"+item_sets[field]["max_selectable_qty"]
|
||||
+"'>"
|
||||
+'<div class="custom-card-head card-head" style="line-height:14px;">'
|
||||
+'<small class="">'+result["name"]+'</small>'
|
||||
@@ -156,46 +173,54 @@ $(function(){
|
||||
|
||||
$(".options-list").empty();
|
||||
|
||||
rowCount = $('.selected-instance');
|
||||
item_options = $(this).data('option');
|
||||
|
||||
min_qty = $(this).data('min-qty');
|
||||
max_qty = $(this).data('max-qty');
|
||||
|
||||
code = $(this).data('code');
|
||||
|
||||
for(var field in item_options) {
|
||||
value = item_options[field]["values"];
|
||||
type = item_options[field]["type"];
|
||||
row = "<p style='font-size:16px;margin-bottom:3px'>"+type+"</p>"
|
||||
$(value).each(function(i){
|
||||
row +="<button class='btn btn-default btn-sm option_btn "+ type +"' data-type='"
|
||||
+type+"' data-value='"+value[i]+"' data-code='"+code+"' data-group='set_menu'>"
|
||||
+value[i]+"</button>";
|
||||
});
|
||||
$(".options-list").append(row);
|
||||
if (rowCount.length+1 <= max_qty) {
|
||||
for(var field in item_options) {
|
||||
value = item_options[field]["values"];
|
||||
type = item_options[field]["type"];
|
||||
row = "<p style='font-size:16px;margin-bottom:3px'>"+type+"</p>"
|
||||
$(value).each(function(i){
|
||||
row +="<button class='btn btn-default btn-sm option_btn "+ type +"' data-type='"
|
||||
+type+"' data-value='"+value[i]+"' data-code='"+code+"' data-group='set_menu'>"
|
||||
+value[i]+"</button>";
|
||||
});
|
||||
$(".options-list").append(row);
|
||||
}
|
||||
}
|
||||
|
||||
if($(this).hasClass('selected-instance') == true){
|
||||
sub_total = $('#set_total_price').text();
|
||||
name = $(this).data('name');
|
||||
price = $(this).data('price');
|
||||
// qty = $('#set_change_qty').val();
|
||||
qty = document.getElementById("set_count").value;
|
||||
total = qty*price;
|
||||
var total_price = +sub_total - +total;
|
||||
$(this).removeClass('selected-instance');
|
||||
$(".options-list").empty();
|
||||
$(this).removeAttr('data-options');
|
||||
$('#instance_option').text('')
|
||||
}else {
|
||||
|
||||
sub_total = $('#set_total_price').text();
|
||||
name = $(this).data('name');
|
||||
price = $(this).data('price');
|
||||
// qty = $('#set_change_qty').val();
|
||||
qty = document.getElementById("set_count").value;
|
||||
total = qty*price;
|
||||
var total_price = +sub_total + +total;
|
||||
$(this).addClass('selected-instance');
|
||||
}
|
||||
$('#set_unit_price').text(price);
|
||||
$('#set_total_price').text(total_price);
|
||||
if($(this).hasClass('selected-instance') == true){
|
||||
sub_total = $('#set_total_price').text();
|
||||
name = $(this).data('name');
|
||||
price = $(this).data('price');
|
||||
// qty = $('#set_change_qty').val();
|
||||
qty = document.getElementById("set_count").value;
|
||||
total = qty*price;
|
||||
var total_price = +sub_total - +total;
|
||||
$(this).removeClass('selected-instance');
|
||||
$(".options-list").empty();
|
||||
$(this).removeAttr('data-options');
|
||||
$('#instance_option').text('')
|
||||
}else {
|
||||
if (rowCount.length+1 <= max_qty) {
|
||||
sub_total = $('#set_total_price').text();
|
||||
name = $(this).data('name');
|
||||
price = $(this).data('price');
|
||||
// qty = $('#set_change_qty').val();
|
||||
qty = document.getElementById("set_count").value;
|
||||
total = qty*price;
|
||||
var total_price = +sub_total + +total;
|
||||
$(this).addClass('selected-instance');
|
||||
}
|
||||
}
|
||||
$('#set_unit_price').text(price);
|
||||
$('#set_total_price').text(total_price);
|
||||
|
||||
}); //End selecct attribute buttom
|
||||
|
||||
// click add order
|
||||
@@ -204,36 +229,49 @@ $(function(){
|
||||
qty = parseInt($('#set_count').val());
|
||||
item_code = $('#set_item_code').text();
|
||||
item_name = $('#set_name').text();
|
||||
min_qty = $(this).data('min-qty');
|
||||
|
||||
var items = $('.selected-instance');
|
||||
|
||||
attribute_arr = []
|
||||
option_arr = []
|
||||
var rowCount = $('.summary-items tbody tr').length+1;
|
||||
$(items).each(function(i){
|
||||
code = $(items[i]).attr('data-code');
|
||||
name = $(items[i]).attr('data-name');
|
||||
price = $(items[i]).attr('data-price');
|
||||
option = $(items[i]).attr('data-options');
|
||||
total = qty * price ;
|
||||
option_arr.push(option);
|
||||
row ="<tr class='item_box' data-price ='"
|
||||
+price+ "' data-toggle='modal' data-target='#sx_itemModal' 'data-instance ='"
|
||||
+name+ "' data-code='"+item_code+"' data-instance-code='"
|
||||
+code+"' data-attributes='"
|
||||
+attribute_arr+"' data-options ='"
|
||||
+option_arr+"' data-row ='"+rowCount+ "'>"
|
||||
+'<td class="item-cell-no">'+rowCount+'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + item_name+ ' ' + name +'</td>'
|
||||
+'<td class="item-cell-qty" id="item_qty">' + qty + '</td>'
|
||||
+'<td class="item-cell-price" id="item_price">'
|
||||
+ parseFloat(total).toFixed(2)
|
||||
+'</td>'
|
||||
+'</tr>';
|
||||
$(".summary-items tbody").append(row);
|
||||
rowCount = rowCount + 1;
|
||||
});
|
||||
calculate_sub_total();
|
||||
if (items.length >= min_qty) {
|
||||
attribute_arr = []
|
||||
option_arr = []
|
||||
var rowCount = $('.summary-items tbody tr').length+1;
|
||||
$(items).each(function(i){
|
||||
code = $(items[i]).attr('data-code');
|
||||
name = $(items[i]).attr('data-name');
|
||||
price = $(items[i]).attr('data-price');
|
||||
option = $(items[i]).attr('data-options');
|
||||
total = qty * price ;
|
||||
option_arr.push(option);
|
||||
row ="<tr class='item_box' data-price ='"
|
||||
+price+ "' data-toggle='modal' data-target='#sx_itemModal' 'data-instance ='"
|
||||
+name+ "' data-code='"+item_code+"' data-instance-code='"
|
||||
+code+"' data-attributes='"
|
||||
+attribute_arr+"' data-options ='"
|
||||
+option_arr+"' data-row ='"+rowCount+ "'>"
|
||||
+'<td class="item-cell-no">'+rowCount+'</td>'
|
||||
+'<td class="item-cell-name" id="item_name" >' + item_name+ ' ' + name +'</td>'
|
||||
+'<td class="item-cell-qty" id="item_qty">' + qty + '</td>'
|
||||
+'<td class="item-cell-price" id="item_price">'
|
||||
+ parseFloat(total).toFixed(2)
|
||||
+'</td>'
|
||||
+'</tr>';
|
||||
$(".summary-items tbody").append(row);
|
||||
rowCount = rowCount + 1;
|
||||
});
|
||||
calculate_sub_total();
|
||||
$(".sx_item_set_detailModal").css({ 'display': "none" });
|
||||
}else{
|
||||
$(".sx_item_set_detailModal").css({ 'display': "block" });
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Please Select Minimum ' + min_qty + " items",
|
||||
type: 'red',
|
||||
typeAnimated: true,
|
||||
btnClass: 'btn-danger',
|
||||
});
|
||||
}
|
||||
|
||||
}); //End add order Click
|
||||
|
||||
@@ -596,6 +634,9 @@ $(function(){
|
||||
$(".item_box").removeAttr("data-active");
|
||||
});
|
||||
|
||||
$('#sx_item_set_detailModal').on('click','#close', function(){
|
||||
$("#sx_item_set_detailModal").css({ 'display': "none" });
|
||||
});
|
||||
//click save buttom after change qty
|
||||
$('#sx_itemModal').on('click','#save', function(){
|
||||
summary_items_filter();
|
||||
|
||||
223
app/assets/stylesheets/sx-sidebar.css
Normal file
223
app/assets/stylesheets/sx-sidebar.css
Normal file
@@ -0,0 +1,223 @@
|
||||
/*!
|
||||
* Start Bootstrap - Simple Sidebar (http://startbootstrap.com/template-overviews/simple-sidebar)
|
||||
* Copyright 2013-2017 Start Bootstrap
|
||||
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-simple-sidebar/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
/**/
|
||||
#wrapper {
|
||||
padding-left: 0;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
|
||||
#wrapper.toggled {
|
||||
padding-left: 200px;
|
||||
}
|
||||
|
||||
#sidebar-wrapper {
|
||||
/* z-index: 1000;*/
|
||||
/*position: fixed;*/
|
||||
z-index: 1;
|
||||
position: ;
|
||||
left: 200px;
|
||||
width: 0;
|
||||
height: 100%;
|
||||
margin-left: -224px;
|
||||
margin-top:-20px;
|
||||
overflow-x: ;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
|
||||
#wrapper.toggled #sidebar-wrapper {
|
||||
width: 216px;
|
||||
}
|
||||
|
||||
#page-content-wrapper {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
padding: 0px;
|
||||
|
||||
}
|
||||
|
||||
#wrapper.toggled #page-content-wrapper {
|
||||
position: absolute;
|
||||
margin-right: -200px;
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar Styles */
|
||||
|
||||
.sidebar-nav {
|
||||
position: absolute;
|
||||
background: #222d32;
|
||||
top: 0;
|
||||
width: 200px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.sidebar-nav li {
|
||||
text-indent: 20px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.sidebar-nav>li.header {
|
||||
color: #4b646f;
|
||||
background-color: #1a2226;
|
||||
line-height: 35px !important;
|
||||
}
|
||||
.main-nav {
|
||||
|
||||
/* background-color: #161926 !important;*/
|
||||
}
|
||||
/*.main-nav a {
|
||||
color: #fff !important;
|
||||
}
|
||||
*/
|
||||
.sidebar-nav li a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.sidebar-nav li a:hover {
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.sidebar-nav li a:active,
|
||||
.sidebar-nav li a:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sidebar-nav > .sidebar-brand {
|
||||
height: 65px;
|
||||
font-size: 18px;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
.sidebar-nav > .sidebar-brand a {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.sidebar-nav > .sidebar-brand a:hover {
|
||||
color: #fff;
|
||||
background: none;
|
||||
}
|
||||
|
||||
@media(min-width:768px) {
|
||||
#wrapper {
|
||||
padding-left: 0;
|
||||
}
|
||||
#wrapper.toggled {
|
||||
padding-left: 210px;
|
||||
}
|
||||
#sidebar-wrapper {
|
||||
width: 0;
|
||||
}
|
||||
#wrapper.toggled #sidebar-wrapper {
|
||||
width: 216px;
|
||||
}
|
||||
#page-content-wrapper {
|
||||
padding: 0px;
|
||||
position: relative;
|
||||
}
|
||||
#wrapper.toggled #page-content-wrapper {
|
||||
position: relative;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.accordion {
|
||||
width: 200px;
|
||||
list-style: none;
|
||||
font-size: 14px;
|
||||
color: #999999 ;
|
||||
padding: 0px !important;
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.accordion .link {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
/* padding: 15px 15px 15px 42px;
|
||||
color: #4D4D4D;*/
|
||||
/* font-size: 14px;
|
||||
font-weight: 700;*/
|
||||
/*border-bottom: 1px solid #CCC;*/
|
||||
position: relative;
|
||||
-webkit-transition: all 0.4s ease;
|
||||
-o-transition: all 0.4s ease;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
|
||||
/*.accordion li:last-child .link { border-bottom: 0; }*/
|
||||
|
||||
.accordion li i {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
left: 12px;
|
||||
font-size: 16px;
|
||||
color: #999999;
|
||||
-webkit-transition: all 0.4s ease;
|
||||
-o-transition: all 0.4s ease;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
|
||||
.accordion li i.fa-chevron-down {
|
||||
right: 12px;
|
||||
left: auto;
|
||||
font-size: 16px;
|
||||
}
|
||||
.accordion li .link:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
color: #FFF;
|
||||
}
|
||||
.accordion li.open .link { color: #fff; }
|
||||
|
||||
.accordion li.open .link > .submenu { display: block;overflow: hidden;}
|
||||
|
||||
.accordion li.open i { color: #fff; }
|
||||
|
||||
.accordion li.open i.fa-chevron-down {
|
||||
-webkit-transform: rotateX(180deg);
|
||||
-ms-transform: rotateX(180deg);
|
||||
-o-transform: rotateX(180deg);
|
||||
transform: rotateX(180deg);
|
||||
}
|
||||
|
||||
.submenu {
|
||||
display: none;
|
||||
list-style: none;
|
||||
margin-left: ;
|
||||
background: #161926;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.submenu li {
|
||||
margin-left: -38px;
|
||||
}
|
||||
|
||||
.submenu a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: #d9d9d9;
|
||||
padding-left:20px;
|
||||
-webkit-transition: all 0.25s ease;
|
||||
-o-transition: all 0.25s ease;
|
||||
transition: all 0.25s ease;
|
||||
}
|
||||
|
||||
.submenu a:hover {
|
||||
background: #b63b4d;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ class Crm::DiningQueuesController < BaseCrmController
|
||||
# GET /crm/dining_queues.json
|
||||
def index
|
||||
today = DateTime.now.strftime('%Y-%m-%d')
|
||||
@dining_queues = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? ", today).order("queue_no asc")
|
||||
@dining_queues = DiningQueue.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and status is NULL ", today).order("queue_no asc")
|
||||
end
|
||||
|
||||
# GET /crm/dining_queues/1
|
||||
|
||||
@@ -9,7 +9,7 @@ class Origami::AddordersController < BaseOrigamiController
|
||||
end
|
||||
|
||||
def detail
|
||||
@menu = MenuCategory.all
|
||||
@menu = MenuCategory.all.active
|
||||
@table_id = params[:id]
|
||||
@table = DiningFacility.find(@table_id)
|
||||
@booking = @table.get_booking
|
||||
@@ -36,6 +36,7 @@ class Origami::AddordersController < BaseOrigamiController
|
||||
if (params[:id])
|
||||
#Pull this menu
|
||||
@menu = MenuCategory.find_by_id(params[:id])
|
||||
puts @menu.menu_items[1].item_attributes.to_json
|
||||
return @menu
|
||||
else
|
||||
MenuCategory.current_menu
|
||||
|
||||
@@ -4,7 +4,7 @@ class Origami::HomeController < BaseOrigamiController
|
||||
def index
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
@complete = Sale.where("sale_status != 'new'")
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.all.order('date desc')
|
||||
@shop = Shop.find_by_id(1)
|
||||
|
||||
@@ -15,7 +15,7 @@ class Origami::HomeController < BaseOrigamiController
|
||||
def show
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
@complete = Sale.where("sale_status != 'new'")
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.all.order('date desc')
|
||||
|
||||
@status_order = ""
|
||||
|
||||
@@ -3,7 +3,7 @@ class Origami::OrdersController < BaseOrigamiController
|
||||
def show
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
@complete = Sale.where("sale_status != 'new'")
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.all.order('status desc')
|
||||
@order = Order.find(params[:order_id])
|
||||
sale_order = SaleOrder.find_by_order_id(@order.order_id)
|
||||
|
||||
@@ -3,7 +3,7 @@ class Origami::RoomsController < BaseOrigamiController
|
||||
def index
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
@complete = Sale.where("sale_status != 'new'")
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.all.order('date desc')
|
||||
# @shift = ShiftSale.current_open_shift(current_user.id)
|
||||
end
|
||||
@@ -11,7 +11,7 @@ class Origami::RoomsController < BaseOrigamiController
|
||||
def show
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
@complete = Sale.where("sale_status != 'new'")
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.all.order('date desc')
|
||||
|
||||
@room = DiningFacility.find(params[:room_id])
|
||||
|
||||
@@ -3,7 +3,7 @@ class Origami::SalesController < BaseOrigamiController
|
||||
def show
|
||||
@tables = Table.all.active.order('status desc')
|
||||
@rooms = Room.all.active.order('status desc')
|
||||
@complete = Sale.where("sale_status != 'new'")
|
||||
@complete = Sale.where("DATE_FORMAT(created_at,'%Y-%m-%d') = ? and sale_status != 'new'",DateTime.now.strftime('%Y-%m-%d'))
|
||||
@orders = Order.all.order('date desc')
|
||||
@sale = Sale.find(params[:sale_id])
|
||||
end
|
||||
|
||||
@@ -125,7 +125,8 @@ class Settings::SetMenuItemsController < ApplicationController
|
||||
end
|
||||
|
||||
def set_settings_item_attribute
|
||||
@item_attributes = MenuItemAttribute.all.order("id asc").map{|a| [a.name, a.value]}
|
||||
@item_attributes = MenuItemAttribute.all.order("id asc")#.map{|a| [a.name, a.value]}
|
||||
|
||||
end
|
||||
|
||||
def set_settings_item_option
|
||||
|
||||
@@ -9,6 +9,7 @@ class MenuCategory < ApplicationRecord
|
||||
validates_presence_of :name, :menu, :order_by
|
||||
|
||||
default_scope { order('order_by asc') }
|
||||
scope :active, -> {where("is_available = 1")}
|
||||
|
||||
def self.destroyCategory(menu_category)
|
||||
# find the sub menu item of current item
|
||||
|
||||
@@ -23,7 +23,7 @@ class Promotion < ApplicationRecord
|
||||
end
|
||||
|
||||
def self.is_between_promo_datetime(current_day,current_time) #database is not local time
|
||||
promoList = Promotion.where("(Date_Format(promo_start_date, 'YYYY-MM-DD') <=? AND Date_Format(promo_end_date, 'YYYY-MM-DD') >=?) AND (promo_start_hour < ? AND promo_end_hour > ?)", current_day, current_day, current_time, current_time)
|
||||
promoList = Promotion.where("(Date_Format(promo_start_date, '%Y-%m-%d') <=? AND Date_Format(promo_end_date, '%Y-%m-%d') >=?) AND (promo_start_hour < ? AND promo_end_hour > ?)", current_day, current_day, current_time, current_time)
|
||||
return promoList
|
||||
end
|
||||
|
||||
|
||||
@@ -95,7 +95,9 @@ json.instances item.menu_item_instances do |is|
|
||||
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -196,9 +196,9 @@
|
||||
<button id="remove-all" class="btn btn-warning btn-block action-btn">Remove All</button>
|
||||
<button id="pay-discount" class="btn btn-danger btn-block action-btn">Enter</button>
|
||||
<% if @member_discount%>
|
||||
<hr />
|
||||
<!-- <hr />
|
||||
<button id="member-discount" class="btn btn-success btn-block action-btn
|
||||
<%= @sale_data.customer.membership_id ? " " : "disabled"%>">Member Discount</button>
|
||||
<%= @sale_data.customer.membership_id ? " " : "disabled"%>">Member Discount</button> -->
|
||||
<%end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@ div.form-inputs span{
|
||||
<%= f.input :is_active %>
|
||||
|
||||
<%= f.input :printer_name %>
|
||||
<%= f.input :font_size %>
|
||||
<!-- <%= f.input :font_size %> -->
|
||||
<%= f.input :print_copy %>
|
||||
<%= f.hidden_field :processing_items %>
|
||||
<%= f.label "Select Zones", :class => 'control-label' %>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<!-- <h1>Editing Settings Order Queue Station</h1>
|
||||
|
||||
<%= render 'form', settings_order_queue_station: @settings_order_queue_station %> -->
|
||||
|
||||
<div class="span12">
|
||||
<div class="page-header">
|
||||
|
||||
@@ -16,14 +16,16 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Station name</th>
|
||||
<th>Printer name</th>
|
||||
<th>Is active</th>
|
||||
<th>Auto Print</th>
|
||||
<th>Print copy</th>
|
||||
<th>Printer name</th>
|
||||
<th>Cut per item</th>
|
||||
<th>Use alternate name</th>
|
||||
<th>Alternate name</th>
|
||||
<th>Created by</th>
|
||||
<th colspan="3"></th>
|
||||
<th> Created At</th>
|
||||
<th>Updated At</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -31,13 +33,16 @@
|
||||
<% @settings_order_queue_stations.each do |settings_order_queue_station| %>
|
||||
<tr>
|
||||
<td><%= link_to settings_order_queue_station.station_name, settings_order_queue_station_path(settings_order_queue_station) %></td>
|
||||
<td><%= settings_order_queue_station.printer_name %></td>
|
||||
<td><%= settings_order_queue_station.is_active %></td>
|
||||
<td><%= settings_order_queue_station.auto_print %></td>
|
||||
<td><%= settings_order_queue_station.print_copy %></td>
|
||||
<td><%= settings_order_queue_station.printer_name %></td>
|
||||
|
||||
<td><%= settings_order_queue_station.cut_per_item %></td>
|
||||
<td><%= settings_order_queue_station.use_alternate_name %></td>
|
||||
<td><%= settings_order_queue_station.created_by %></td>
|
||||
<td><%= settings_order_queue_station.created_at.strftime("%m-%d-%Y") %></td>
|
||||
<td><%= settings_order_queue_station.updated_at.strftime("%m-%d-%Y") %></td>
|
||||
<td><%= link_to 'Assign Processing Items', new_settings_order_queue_station_processing_item_path(settings_order_queue_station) %></td>
|
||||
<td><%= link_to 'Edit', edit_settings_order_queue_station_path(settings_order_queue_station) %></td>
|
||||
</tr>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<h4 class="card-title">Menu Item Option</h4>
|
||||
<h4 class="card-title">Order Queue Station</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
<%= f.error_notification %>
|
||||
<%= f.input :processing_items, as: :hidden %>
|
||||
<strong>Select Menu Items</strong><br/><br/>
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, class:'pull-right', label: "Add Menu Items to Queue Station" %>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<% @menu_categories.each do |category|%>
|
||||
|
||||
|
||||
@@ -48,10 +48,18 @@ delete from sym_node;
|
||||
|
||||
|
||||
# Create Channels for logically grouped tables
|
||||
insert into sym_channel
|
||||
(channel_id, processing_order, max_batch_size, enabled, description)
|
||||
values('setting', 1, 100000, 1, 'All Settings');
|
||||
|
||||
insert into sym_channel
|
||||
(channel_id, processing_order, max_batch_size, enabled, description)
|
||||
values('dining', 1, 100000, 1, 'sale_transactional data from register and back office');
|
||||
|
||||
insert into sym_channel
|
||||
(channel_id, processing_order, max_batch_size, enabled, description)
|
||||
values('commission', 1, 100000, 1, 'Commission ,Commissioners ,Products and Promotion');
|
||||
|
||||
insert into sym_channel
|
||||
(channel_id, processing_order, max_batch_size, enabled, description)
|
||||
values('menu', 1, 100000, 1, 'Item and pricing data');
|
||||
@@ -60,6 +68,14 @@ insert into sym_channel
|
||||
(channel_id, processing_order, max_batch_size, enabled, description)
|
||||
values('order', 1, 100000, 1, 'Item and pricing data');
|
||||
|
||||
insert into sym_channel
|
||||
(channel_id, processing_order, max_batch_size, enabled, description)
|
||||
values('sale', 1, 100000, 1, 'Sale data');
|
||||
|
||||
insert into sym_channel
|
||||
(channel_id, processing_order, max_batch_size, enabled, description)
|
||||
values('oqs', 1, 100000, 1, 'OQS and cashier temenal');
|
||||
|
||||
# Create Node Groups and Links
|
||||
insert into sym_node_group (node_group_id) values ('sx');
|
||||
insert into sym_node_group (node_group_id) values ('store');
|
||||
@@ -67,27 +83,95 @@ insert into sym_node_group (node_group_id) values ('store');
|
||||
insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action) values ('sx', 'store', 'W');
|
||||
insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action) values ('store', 'sx', 'P');
|
||||
|
||||
# Create Trigger for Tables
|
||||
# Create Trigger for Setting Channel
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('lookups','lookups','setting',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('membership_actions','membership_actions','setting',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('membership_settings','membership_settings','setting',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('payment_method_settings','payment_method_settings','setting',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('print_settings','print_settings','setting',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('shops','shops','setting',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('customers','customers','setting',current_timestamp,current_timestamp);
|
||||
|
||||
# Create Trigger for Dining Channel
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('zones','zones','dining',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menus','menus','menu',current_timestamp,current_timestamp);
|
||||
values('dining_charges','dining_charges','dining',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menu_categories','menu_categories','menu',current_timestamp,current_timestamp);
|
||||
values('dining_facilities','dining_facilities','dining',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('dining_queues','dining_queues','dining',current_timestamp,current_timestamp);
|
||||
|
||||
|
||||
# Create Trigger for Commission Channel
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('commissioners','commissioners','commission',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('commissions','commissions','commission',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('employees','employees','commission',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('in_duties','in_duties','commission',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('inventory_definitions','inventory_definitions','commission',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('product_commissions','product_commissions','commission',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('products','products','commission',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('promotion_products','promotion_products','commission',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('promotions','promotions','commission',current_timestamp,current_timestamp);
|
||||
|
||||
# Create Trigger for Menu Channel
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('accounts','accounts','menu',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menu_items','menu_items','menu',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menu_item_attributes','menu_item_attributes','menu',current_timestamp,current_timestamp);
|
||||
@@ -96,10 +180,35 @@ insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menu_item_options','menu_item_options','menu',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menus','menus','menu',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menu_categories','menu_categories','menu',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menu_items','menu_items','menu',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menu_item_instances','menu_item_instances','menu',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('item_sets','item_sets','menu',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menu_item_sets','menu_item_sets','menu',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('menu_instance_item_sets','menu_instance_item_sets','menu',current_timestamp,current_timestamp);
|
||||
|
||||
# Create Trigger for Order Channel
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('orders','orders','order',current_timestamp,current_timestamp);
|
||||
@@ -108,6 +217,68 @@ insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('order_items','order_items','order',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('bookings','bookings','order',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('booking_orders','booking_orders','order',current_timestamp,current_timestamp);
|
||||
|
||||
# Create Trigger for Sale Channel
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('sales','sales','sale',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('sale_items','sale_items','sale',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('sale_audits','sale_audits','sale',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('sale_orders','sale_orders','sale',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('sale_payments','sale_payments','sale',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('sale_taxes','sale_taxes','sale',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('payment_journals','payment_journals','sale',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('shift_sales','shift_sales','sale',current_timestamp,current_timestamp);
|
||||
|
||||
# Create Trigger for Order Channel
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('assigned_order_items','assigned_order_items','oqs',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('cashier_terminals','cashier_terminals','oqs',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('cashier_login_logs','cashier_login_logs','oqs',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('order_queue_process_by_zones','order_queue_process_by_zones','oqs',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('order_queue_stations','order_queue_stations','oqs',current_timestamp,current_timestamp);
|
||||
|
||||
|
||||
# Create Routers for Nodes
|
||||
insert into sym_router
|
||||
@@ -115,8 +286,8 @@ insert into sym_router
|
||||
values('sx_2_store', 'sx', 'store', 'default',current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_router
|
||||
(router_id,source_node_group_id,target_node_group_id,router_type,create_time,last_update_time)
|
||||
values('store_2_sx', 'store', 'sx', 'default',current_timestamp, current_timestamp);
|
||||
(router_id,source_node_group_id,target_node_group_id,router_type,sync_on_delete,create_time,last_update_time)
|
||||
values('store_2_sx', 'store', 'sx', 'default',0,current_timestamp, current_timestamp);
|
||||
|
||||
-- insert into sym_router
|
||||
-- (router_id,source_node_group_id,target_node_group_id,router_type,router_expression,create_time,last_update_time)
|
||||
@@ -124,14 +295,263 @@ values('store_2_sx', 'store', 'sx', 'default',current_timestamp, current_timesta
|
||||
|
||||
|
||||
# Add triggers for tables with router
|
||||
|
||||
# Setting Channel # From Store to Master
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('lookups','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('membership_actions','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('membership_settings','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('payment_method_settings','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('print_settings','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('shops','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('customers','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
# Setting Channel # From Master to Store
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('lookups','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('membership_actions','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('membership_settings','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('payment_method_settings','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('print_settings','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('shops','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('customers','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
#End Setting Channel
|
||||
|
||||
# Dining Channel # From Store to SX
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('zones','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('dining_charges','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('dining_facilities','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('dining_queues','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
# Dining Channel # From SX to Store
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('zones','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('dining_charges','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('dining_facilities','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('dining_queues','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
#end Dining Channel
|
||||
|
||||
# Commission/Promotion/Product Channel # From Store to SX
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('commissioners','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('commissions','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('employees','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('in_duties','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('inventory_definitions','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('product_commissions','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('products','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('promotion_products','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('promotions','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
# Commission/Promotion/Product Channel # From SX to Store
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('commissioners','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('commissions','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('employees','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('in_duties','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('inventory_definitions','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('product_commissions','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('products','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('promotion_products','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('promotions','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
#end Commission/Promotion/Product Channel
|
||||
|
||||
# Menu Channel # From Store to SX
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('accounts','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_item_attributes','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_item_options','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menus','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_categories','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_items','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_item_instances','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('item_sets','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_item_sets','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_instance_item_sets','store_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
# Menu Channel # From SX to Store
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('accounts','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
-- insert into sym_trigger_router
|
||||
-- (trigger_id,router_id,initial_load_order,initial_load_select,last_update_time,create_time)
|
||||
-- values('accounts','sx_2_one_store',100,'store_id=''$(externalId)''',current_timestamp,current_timestamp);
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_item_attributes','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_item_options','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menus','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_categories','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_items','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_item_instances','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('item_sets','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_item_sets','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('menu_instance_item_sets','sx_2_store', 100, current_timestamp, current_timestamp);
|
||||
#End Menu Channel
|
||||
|
||||
# Order Channel # From Store to Sx
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('orders','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
@@ -140,19 +560,156 @@ insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('order_items','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('bookings','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('booking_orders','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
# Order Channel # From SX to Store
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('orders','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('order_items','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('bookings','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('booking_orders','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
# End Order Channel
|
||||
|
||||
# Sale Channel # From Store to Sx
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sales','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sale_items','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sale_audits','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sale_orders','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sale_payments','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sale_taxes','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('payment_journals','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('shift_sales','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
# Sale Channel # From SX to Store
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sales','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sale_items','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sale_audits','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sale_orders','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sale_payments','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('sale_taxes','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('payment_journals','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('shift_sales','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
# End Sale Channel
|
||||
|
||||
# Oqs Channel # From Store to Sx
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('assigned_order_items','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('cashier_terminals','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('cashier_login_logs','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('order_queue_process_by_zones','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('order_queue_stations','store_2_sx', 200, current_timestamp, current_timestamp);
|
||||
|
||||
# Oqs Channel # From SX to Store
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('assigned_order_items','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('cashier_terminals','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('cashier_login_logs','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('order_queue_process_by_zones','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('order_queue_stations','sx_2_store', 200, current_timestamp, current_timestamp);
|
||||
# End Oqs Channel
|
||||
|
||||
|
||||
insert into sym_node (node_id,node_group_id,external_id,sync_enabled,sync_url,schema_version,symmetric_version,database_type,database_version,heartbeat_time,timezone_offset,batch_to_send_count,batch_in_error_count,created_at_node_id)
|
||||
values ('000','sx','000',1,null,null,null,null,null,current_timestamp,null,0,0,'000');
|
||||
insert into sym_node (node_id,node_group_id,external_id,sync_enabled,sync_url,schema_version,symmetric_version,database_type,database_version,heartbeat_time,timezone_offset,batch_to_send_count,batch_in_error_count,created_at_node_id)
|
||||
values ('001','store','001',1,null,null,null,null,null,current_timestamp,null,0,0,'000');
|
||||
insert into sym_node (node_id,node_group_id,external_id,sync_enabled,sync_url,schema_version,symmetric_version,database_type,database_version,heartbeat_time,timezone_offset,batch_to_send_count,batch_in_error_count,created_at_node_id)
|
||||
values ('002','store','002',1,null,null,null,null,null,current_timestamp,null,0,0,'000');
|
||||
-- insert into sym_node (node_id,node_group_id,external_id,sync_enabled,sync_url,schema_version,symmetric_version,database_type,database_version,heartbeat_time,timezone_offset,batch_to_send_count,batch_in_error_count,created_at_node_id)
|
||||
-- values ('002','store','002',1,null,null,null,null,null,current_timestamp,null,0,0,'000');
|
||||
|
||||
|
||||
insert into sym_node_security (node_id,node_password,registration_enabled,registration_time,initial_load_enabled,initial_load_time,created_at_node_id)
|
||||
values ('000','acd36ce830d1fda466eec921433f38',0,current_timestamp,0,current_timestamp,'000');
|
||||
insert into sym_node_security (node_id,node_password,registration_enabled,registration_time,initial_load_enabled,initial_load_time,created_at_node_id)
|
||||
values ('001','acd36ce830d1fda466eec921433f38',1,null,1,null,'000');
|
||||
insert into sym_node_security (node_id,node_password,registration_enabled,registration_time,initial_load_enabled,initial_load_time,created_at_node_id)
|
||||
values ('002','acd36ce830d1fda466eec921433f38',1,null,1,null,'000');
|
||||
-- insert into sym_node_security (node_id,node_password,registration_enabled,registration_time,initial_load_enabled,initial_load_time,created_at_node_id)
|
||||
-- values ('002','acd36ce830d1fda466eec921433f38',1,null,1,null,'000');
|
||||
|
||||
insert into sym_node_identity values ('000');
|
||||
|
||||
Reference in New Issue
Block a user