Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -37,8 +37,8 @@ Person and Extra Time
|
||||
category_code = SPL... //for menu categories special
|
||||
1) must create Person in settings/accounts
|
||||
2) must create Adult and Child in settings/item_attributes
|
||||
3) must be P00001 for Adult and P00002 for Child in settings/menu_categories/[cat_id]/simple_menu_items
|
||||
3) must be PI0001 for Adult and PI0002 for Child in settings/simple_menu_items/[item_id]/menu_item_instances
|
||||
3) must be PSA_[a-z/0-9] for Adult and PSC_[a-z/0-9] for Child in settings/menu_categories/[cat_id]/simple_menu_items
|
||||
3) must be PSAI_[a-z/0-9] for Adult and PSCI_[a-z/0-9] for Child in settings/simple_menu_items/[item_id]/menu_item_instances
|
||||
|
||||
For Extra Time
|
||||
item_instance_code
|
||||
@@ -98,6 +98,9 @@ SQL Update after rake clear:data runned
|
||||
i) TableBooking, Order, OrderItem, sale, SaleOrder, SaleItem, SaleTax, SalePayment, SaleAudit, AssignedOrderItem => { current:0, next:0 }
|
||||
** Note :: do not update Customer
|
||||
|
||||
Change type in mysql
|
||||
*run if you got font error for Myanmar, Chinese, etc...
|
||||
=> ALTER TABLE [table_name] CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci
|
||||
|
||||
|
||||
* ToDo list
|
||||
|
||||
@@ -36,7 +36,7 @@ class ApplicationController < ActionController::Base
|
||||
# redirect_to root_url(:host => request.domain) + "store_error"
|
||||
render :json => [{ status: false, message: 'Invalid Access!'}]
|
||||
end
|
||||
else
|
||||
else
|
||||
# check for license file
|
||||
# if check_license
|
||||
# current_license(ENV["SX_PROVISION_URL"])
|
||||
|
||||
@@ -30,7 +30,7 @@ class InstallController < BaseController
|
||||
# end
|
||||
|
||||
@license = License.new(ENV["SX_PROVISION_URL"])
|
||||
response = @license.license_activate(restaurant, license_key, db_host, db_schema, db_user, db_password)
|
||||
response = @license.license_activate(restaurant, license_key, db_host, db_schema, db_user, db_password)
|
||||
if response[:status]
|
||||
redirect_to root_url, notice: response["message"]
|
||||
else
|
||||
|
||||
@@ -4,7 +4,7 @@ class SymControlController < BaseController
|
||||
|
||||
def run
|
||||
sym_path = "/home/yan/symmetric/"
|
||||
check_sym_proc_str = `#{"service SymmetricDS status"}`
|
||||
check_sym_proc_str = `#{"sudo service SymmetricDS status"}`
|
||||
# Check Sym Installed
|
||||
# if sym_install_status[1] == "false"
|
||||
# response = { "status": false, "message": "Activation is success but Symmetric service not Installed. \n Please contact code2lab call center!"}
|
||||
@@ -12,15 +12,15 @@ class SymControlController < BaseController
|
||||
|
||||
if check_sym_proc_str.include? "Active: active (running)" || "Active: active (exited)" #"Server is already running"
|
||||
# Create Sym Table
|
||||
check_sym_table = system(sym_path + "bin/symadmin --engine sx create-sym-tables")
|
||||
check_sym_table = system("sudo " + sym_path + "bin/symadmin --engine sx create-sym-tables")
|
||||
if check_sym_table
|
||||
sym_sql = Rails.root + "db/sym_master.sql"
|
||||
|
||||
if File.exist? (sym_sql)
|
||||
# Import Sym Sql to db and start sym
|
||||
run_sym_sql = system(sym_path + "bin/dbimport --engine sx " + sym_sql.to_s)
|
||||
stop_sym = system("service SymmetricDS stop")
|
||||
run_sym = system("service SymmetricDS start")
|
||||
run_sym_sql = system("sudo " + sym_path + "bin/dbimport --engine sx " + sym_sql.to_s)
|
||||
stop_sym = system("sudo service SymmetricDS stop")
|
||||
run_sym = system("sudo service SymmetricDS start")
|
||||
if run_sym
|
||||
flash[:notice] = 'Success!'
|
||||
end
|
||||
|
||||
@@ -379,7 +379,7 @@ class License
|
||||
# check_sym_proc_str = check_sym_proc_str.split("\n")
|
||||
# sym_install_status = check_sym_proc_str[0].split(": ")
|
||||
|
||||
check_sym_proc_str = `#{"service SymmetricDS status"}`
|
||||
check_sym_proc_str = `#{"sudo service SymmetricDS status"}`
|
||||
|
||||
# Check Sym Installed
|
||||
# if sym_install_status[1] == "false"
|
||||
@@ -390,21 +390,23 @@ class License
|
||||
sym_run_status = check_sym_running(check_sym_proc_str, sym_path)
|
||||
if sym_run_status
|
||||
# Create Sym Table
|
||||
check_sym_table = system(sym_path + "bin/symadmin --engine sx create-sym-tables")
|
||||
check_sym_table = system("sudo " + sym_path + "bin/symadmin --engine sx create-sym-tables")
|
||||
if check_sym_table
|
||||
sym_sql = Rails.root + "db/sym_master.sql"
|
||||
|
||||
if File.exist? (sym_sql)
|
||||
# Import Sym Sql to db and start sym
|
||||
run_sym_sql = system(sym_path + "bin/dbimport --engine sx " + sym_sql.to_s)
|
||||
stop_sym = system("service SymmetricDS stop")
|
||||
run_sym = system("service SymmetricDS start")
|
||||
run_sym_sql = system("sudo " + sym_path + "bin/dbimport --engine sx " + sym_sql.to_s)
|
||||
stop_sym = system("sudo service SymmetricDS stop")
|
||||
run_sym = system("sudo service SymmetricDS start")
|
||||
if run_sym
|
||||
response = { "status": true, "message": "Activation is success and Configuration done..."}
|
||||
end
|
||||
else
|
||||
response = { "status": false, "message": "Activation is success but Symmetric Sql not found. \n Please contact code2lab call center!"}
|
||||
end
|
||||
else
|
||||
response = { "status": false, "message": "Activation is success but Cannot create Sym Tables. \n Please contact code2lab call center!"}
|
||||
end
|
||||
else
|
||||
response = { "status": false, "message": "Activation is success but Symmetric not running. \n Please contact code2lab call center!"}
|
||||
|
||||
@@ -37,11 +37,11 @@ if (@booking)
|
||||
|
||||
json.order_items order_items do |item|
|
||||
# For YGN BBQ
|
||||
if item.item_code == "P00001"
|
||||
if item.item_code.include? ("PSA_")
|
||||
adult_count += item.qty
|
||||
adult_spent += (item.price * item.qty)
|
||||
end
|
||||
if item.item_code == "P00002"
|
||||
if item.item_code.include? ("PSC_")
|
||||
child_count += item.qty
|
||||
child_spent += (item.price * item.qty)
|
||||
end
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.new") %> - <%= t("views.right_panel.detail.new_btn_txt") %> <%= t("views.right_panel.detail.account_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.show") %> - <%= t("views.right_panel.detail.show_btn_txt") %> <%= t("views.right_panel.detail.account_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.edit") %> - <%= t("views.right_panel.detail.edit_btn_txt") %> <%= t("views.right_panel.detail.account_txt") %> <br>
|
||||
3) <%= t("views.right_panel.button.edit") %> - <%= t("views.right_panel.detail.edit_btn_txt") %> <%= t("views.right_panel.detail.account_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
|
||||
@@ -19,10 +19,21 @@
|
||||
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.lookup") + " " + t("views.right_panel.detail.type_txt") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.name_txt2") %> <br>
|
||||
3) <%= t("views.right_panel.detail.value") %> - <%= t("views.right_panel.detail.write_txt") %> <%= t("views.right_panel.detail.value_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.submit") %> - <%= t("views.right_panel.detail.submit_btn_txt") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,29 +11,29 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
|
||||
<div class="m-b-10 clearfix">
|
||||
<%= link_to t("views.btn.new"),new_settings_lookup_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
|
||||
</div>
|
||||
<div class="m-b-10 clearfix">
|
||||
<%= link_to t("views.btn.new"),new_settings_lookup_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
|
||||
</div>
|
||||
<div class="card" id="custom-slimscroll">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Lookup type</th>
|
||||
<th>Name</th>
|
||||
<th>Value</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("views.right_panel.detail.lookup") +" "+ t("views.right_panel.detail.type_txt") %></th>
|
||||
<th><%= t("views.right_panel.detail.name") %></th>
|
||||
<th><%= t("views.right_panel.detail.value") %></th>
|
||||
<th><%= t("views.right_panel.detail.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @settings_lookups.each do |settings_lookup| %>
|
||||
<tr>
|
||||
<td><%= settings_lookup.lookup_type %></td>
|
||||
<td><%= settings_lookup.name %></td>
|
||||
<td><%= settings_lookup.value %></td>
|
||||
<!-- <td><%= link_to t("views.btn.show"), settings_lookup_path(settings_lookup),:class => 'btn btn-info btn-sm waves-effect' %></td> -->
|
||||
<td>
|
||||
<%= link_to t("views.btn.edit"), edit_settings_lookup_path(settings_lookup),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||
<tbody>
|
||||
<% @settings_lookups.each do |settings_lookup| %>
|
||||
<tr>
|
||||
<td><%= settings_lookup.lookup_type %></td>
|
||||
<td><%= settings_lookup.name %></td>
|
||||
<td><%= settings_lookup.value %></td>
|
||||
<!-- <td><%= link_to t("views.btn.show"), settings_lookup_path(settings_lookup),:class => 'btn btn-info btn-sm waves-effect' %></td> -->
|
||||
<td>
|
||||
<%= link_to t("views.btn.edit"), edit_settings_lookup_path(settings_lookup),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||
<!-- <button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_lookup_path(settings_lookup)%>" data-method="delete">
|
||||
<%= t("views.btn.delete") %>
|
||||
</button>
|
||||
@@ -45,20 +45,33 @@
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.detail.lookup") + " " + t("views.right_panel.detail.type_txt") %> - <%= t("views.right_panel.detail.type_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
|
||||
2) <%= t("views.right_panel.detail.name") %> - <%= t("views.right_panel.detail.name_txt2") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
|
||||
3) <%= t("views.right_panel.detail.value") %> - <%= t("views.right_panel.detail.value_txt") %> <%= t("views.right_panel.detail.for") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
|
||||
4) <%= t("views.right_panel.detail.actions") %> - <%= t("views.right_panel.detail.actions_txt") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.button_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.new") %> - <%= t("views.right_panel.detail.new_btn_txt") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.edit") %> - <%= t("views.right_panel.detail.edit_btn_txt") %> <%= t("views.right_panel.detail.lookup_txt") %> <br>
|
||||
</p>
|
||||
<h5><i class="material-icons md-18">list <%= t("views.right_panel.header.link_lists") %></i> </h5>
|
||||
<p>
|
||||
1) <%= t("views.right_panel.button.home") %> - <%= t("views.right_panel.detail.home_txt") %> <br>
|
||||
2) <%= t("views.right_panel.button.back") %> - <%= t("views.right_panel.detail.back_txt") %> <%= t("views.right_panel.detail.dashboard_txt") %> <br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -446,6 +446,7 @@ en:
|
||||
gateway_communication_type: "Gateway communication type"
|
||||
gateway_url: "Gateway url"
|
||||
additional_parameter: "Additional parameter"
|
||||
lookup: "Lookup"
|
||||
|
||||
code_txt: "code "
|
||||
charge_txt: "charge"
|
||||
@@ -611,6 +612,7 @@ en:
|
||||
gateway_communication_type_txt: "gateway communication type"
|
||||
gateway_url_txt: "gateway url"
|
||||
membership_setting_txt: "membership setting"
|
||||
lookup_txt: "lookup"
|
||||
|
||||
cancel_btn_txt: "to cancel "
|
||||
image_btn_txt: "to upload "
|
||||
|
||||
@@ -441,6 +441,7 @@ mm:
|
||||
gateway_url: "အဓိကလမ်းကြောင်းဆက်သွယ်မှုလိပ်စာ"
|
||||
additional_parameter: "ထပ်ဖြည့်အကြောင်းအရာ"
|
||||
survey: "ခြုံငုံလေ့လာခြင်း"
|
||||
lookup: "သတ်မှတ်ချက်များ"
|
||||
|
||||
code_txt: "ကုတ်ဒ် "
|
||||
charge_txt: "ကောက်ခံသည်"
|
||||
@@ -606,6 +607,7 @@ mm:
|
||||
gateway_communication_type_txt: "အဓိကလမ်းကြောင်းဆက်သွယ်မှုအမျိုးအစား"
|
||||
gateway_url_txt: "အဓိကလမ်းကြောင်းဆက်သွယ်မှုလိပ်စာ"
|
||||
membership_setting_txt: "အဖွဲ့၀င်မှုဆိုင်ရာပြင်ဆင်ချက်များ"
|
||||
lookup_txt: "သတ်မှတ်ချက်"
|
||||
|
||||
cancel_btn_txt: "ပြန်ဖျက်ရန်"
|
||||
image_btn_txt: "တင်သွင်းရန်"
|
||||
|
||||
12
db/seeds.rb
12
db/seeds.rb
@@ -163,20 +163,20 @@ menu_pkg_options = MenuItemOption.create([{option_type: "Package", name: "Bottle
|
||||
# menu_item_attribute_adult = MenuItemAttribute.create({attribute_type:"person", name: "Adult", value: "adult"})
|
||||
# menu_item_attribute_child = MenuItemAttribute.create({attribute_type:"person", name: "Child", value: "child"})
|
||||
|
||||
# menu_category1_menu_item0 = SimpleMenuItem.create({item_code:"P00001", name: "Adult", alt_name: "",menu_category: menu_category1 , min_qty: 1, account: person, :item_attributes => "['1']", created_by: "System" })
|
||||
# menu_item0_instance = MenuItemInstance.create({item_instance_name:"",item_instance_code:"PI0001", menu_item: menu_category1_menu_item0, price:15000.00, is_on_promotion:false, is_default:true, :item_attributes => "['1']" })
|
||||
# menu_category1_menu_item0 = SimpleMenuItem.create({item_code:"PSA_00001", name: "Adult", alt_name: "",menu_category: menu_category1 , min_qty: 1, account: person, :item_attributes => "['1']", created_by: "System" })
|
||||
# menu_item0_instance = MenuItemInstance.create({item_instance_name:"",item_instance_code:"PSAI_0001", menu_item: menu_category1_menu_item0, price:15000.00, is_on_promotion:false, is_default:true, :item_attributes => "['1']" })
|
||||
|
||||
# menu_category1_menu_item1 = SimpleMenuItem.create({item_code:"P00002", name: "Child", alt_name: "",menu_category: menu_category1 , min_qty: 1, account: person, :item_attributes => "['2']", created_by: "System" })
|
||||
# menu_item1_instance = MenuItemInstance.create({item_instance_name:"",item_instance_code:"PI0002", menu_item: menu_category1_menu_item1, price:10000.00, is_on_promotion:false, is_default:true, :item_attributes => "['2']" })
|
||||
# menu_category1_menu_item1 = SimpleMenuItem.create({item_code:"PSC_00002", name: "Child", alt_name: "",menu_category: menu_category1 , min_qty: 1, account: person, :item_attributes => "['2']", created_by: "System" })
|
||||
# menu_item1_instance = MenuItemInstance.create({item_instance_name:"",item_instance_code:"PSCI_0002", menu_item: menu_category1_menu_item1, price:10000.00, is_on_promotion:false, is_default:true, :item_attributes => "['2']" })
|
||||
|
||||
# menu_item_attribute_30_min = MenuItemAttribute.create({attribute_type:"Extra Time", name: "30 min", value: "30_min"})
|
||||
# menu_item_attribute_60_min = MenuItemAttribute.create({attribute_type:"Extra Time", name: "1 hrs", value: "60_min"})
|
||||
|
||||
# menu_category1_menu_item2 = SimpleMenuItem.create({item_code:"Ext30", name: "30 minutes", alt_name: "",menu_category: menu_category5 , min_qty: 1, account: extra_time, :item_attributes => "['1']", created_by: "System" })
|
||||
# menu_item0_instance = MenuItemInstance.create({item_instance_name:"",item_instance_code:"Exti30", menu_item: menu_category1_menu_item2, price:15000.00, is_on_promotion:false, is_default:true, :item_attributes => "['1']" })
|
||||
# menu_item0_instance = MenuItemInstance.create({item_instance_name:"",item_instance_code:"Extim_30", menu_item: menu_category1_menu_item2, price:15000.00, is_on_promotion:false, is_default:true, :item_attributes => "['1']" })
|
||||
|
||||
# menu_category1_menu_item3 = SimpleMenuItem.create({item_code:"Ext60", name: "1 hour", alt_name: "",menu_category: menu_category5 , min_qty: 1, account: extra_time, :item_attributes => "['2']", created_by: "System" })
|
||||
# menu_item1_instance = MenuItemInstance.create({item_instance_name:"",item_instance_code:"Exti60", menu_item: menu_category1_menu_item3, price:10000.00, is_on_promotion:false, is_default:true, :item_attributes => "['2']" })
|
||||
# menu_item1_instance = MenuItemInstance.create({item_instance_name:"",item_instance_code:"Extim_60", menu_item: menu_category1_menu_item3, price:10000.00, is_on_promotion:false, is_default:true, :item_attributes => "['2']" })
|
||||
|
||||
# END
|
||||
|
||||
|
||||
Reference in New Issue
Block a user