From d800a5d28d5165598e6d68c4a60c69131b8d0c29 Mon Sep 17 00:00:00 2001 From: phyusin Date: Thu, 12 Apr 2018 11:11:51 +0630 Subject: [PATCH 1/4] license --- config/initializers/action_controller.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index 802324cf..2facee87 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -20,11 +20,11 @@ class ActionController::Base end else #check for license file - # if check_license - # current_license(ENV["SX_PROVISION_URL"]) - # else - # redirect_to activate_path - # end + if check_license + current_license(ENV["SX_PROVISION_URL"]) + else + redirect_to activate_path + end end end From a009f359fadb2cec92c0e5cc00ef62602383a8b2 Mon Sep 17 00:00:00 2001 From: San Wai Lwin Date: Wed, 18 Apr 2018 14:44:25 +0630 Subject: [PATCH 2/4] update puma production --- config/puma.rb | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100755 config/puma.rb diff --git a/config/puma.rb b/config/puma.rb deleted file mode 100755 index c8e0145e..00000000 --- a/config/puma.rb +++ /dev/null @@ -1,48 +0,0 @@ -# Puma can serve each request in a thread from an internal thread pool. -# The `threads` method setting takes two numbers a minimum and maximum. -# Any libraries that use thread pools should be configured to match -# the maximum value specified for Puma. Default is set to 5 threads for minimum -# and maximum, this matches the default thread size of Active Record. -# -threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i -threads threads_count, threads_count - -# Specifies the `port` that Puma will listen on to receive requests, default is 3000. -# -port ENV.fetch("PORT") { 3000 } - -# Specifies the `environment` that Puma will run in. -# -environment ENV.fetch("RAILS_ENV") { "development" } - -# Specifies the number of `workers` to boot in clustered mode. -# Workers are forked webserver processes. If using threads and workers together -# the concurrency of the application would be max `threads` * `workers`. -# Workers do not work on JRuby or Windows (both of which do not support -# processes). -# -# workers ENV.fetch("WEB_CONCURRENCY") { 2 } - -# Use the `preload_app!` method when specifying a `workers` number. -# This directive tells Puma to first boot the application and load code -# before forking the application. This takes advantage of Copy On Write -# process behavior so workers use less memory. If you use this option -# you need to make sure to reconnect any threads in the `on_worker_boot` -# block. -# -# preload_app! - -# The code in the `on_worker_boot` will be called if you are using -# clustered mode by specifying a number of `workers`. After each worker -# process is booted this block will be run, if you are using `preload_app!` -# option you will want to use this block to reconnect to any threads -# or connections that may have been created at application boot, Ruby -# cannot share connections between processes. -# -# on_worker_boot do -# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) -# end - -# Allow puma to be restarted by `rails restart` command. - -plugin :tmp_restart From 924edd823a96221c707d7637981342996ef36689 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 19 Apr 2018 10:49:58 +0630 Subject: [PATCH 3/4] update shift_sale migration file and secret yml --- config/secrets.yml | 2 +- db/migrate/20170626191519_create_shift_sales.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/secrets.yml b/config/secrets.yml index 6e8b73d4..b0d7c5c8 100755 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -24,7 +24,7 @@ test: # instead read values from the environment. production: secret_key_base: c4bc81065013f9a3506d385bcbd49586c42e586488144b0de90c7da36867de9fa880f46b5c4f86f0ce9b7c783bb5a73bdb0e5605a47716567294390e726d3e22 - sx_provision_url: connect.smartsales.asia/api #192.168.1.147:3002/api + sx_provision_url: https://connect.pos-myanmar.com/api #192.168.1.147:3002/api server_mode: application cipher_type: AES-256-CBC sx_key: Wh@t1$C2L diff --git a/db/migrate/20170626191519_create_shift_sales.rb b/db/migrate/20170626191519_create_shift_sales.rb index f18a2c1c..bd19a8cf 100755 --- a/db/migrate/20170626191519_create_shift_sales.rb +++ b/db/migrate/20170626191519_create_shift_sales.rb @@ -21,7 +21,7 @@ class CreateShiftSales < ActiveRecord::Migration[5.1] t.integer :dining_count, :default => 0 t.integer :takeaway_count, :default => 0 t.integer :member_count, :default => 0 - t.decimal :total_rounding,, :precision => 10, :scale => 2, :null => false, :default => 0.00 + t.decimal :total_rounding, :precision => 10, :scale => 2, :null => false, :default => 0.00 t.integer :total_receipt, :default => 0 t.decimal :total_void, :default => 0 t.timestamps From f239a3f87c8ba2d053e099e39ecb7440a0d7a4ea Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 10 May 2018 15:40:56 +0630 Subject: [PATCH 4/4] update pdf view height --- app/assets/javascripts/custom.js | 1 + app/assets/stylesheets/origami.scss | 4 +++ app/views/origami/addorders/detail.html.erb | 36 ++++++++++----------- app/views/origami/dashboard/index.html.erb | 1 - app/views/origami/payments/show.html.erb | 16 ++++----- 5 files changed, 30 insertions(+), 28 deletions(-) diff --git a/app/assets/javascripts/custom.js b/app/assets/javascripts/custom.js index ca1bd0b9..94f05663 100644 --- a/app/assets/javascripts/custom.js +++ b/app/assets/javascripts/custom.js @@ -62,6 +62,7 @@ $(document).ready(function() { railBorderRadius: '0', touchScrollStep : 45 }); + // $('.delete').click(function(){ // var method = $(this).attr('data-method'); diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 212c5288..3aadc6a9 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -452,6 +452,10 @@ iframe { width: 150%; height: 100%; } + +#receipt_pdf { + height: 400px; +} /* End iframe */ /* section class for webview */ diff --git a/app/views/origami/addorders/detail.html.erb b/app/views/origami/addorders/detail.html.erb index 5a9ff8ec..93f7f2a2 100644 --- a/app/views/origami/addorders/detail.html.erb +++ b/app/views/origami/addorders/detail.html.erb @@ -548,19 +548,18 @@ jQuery(function(){ var menus = JSON.parse(localStorage.getItem("menus")); if (menus != null) { - console.log("menu") - id = menus[0]["id"]; + var id = menus[0]["categories"][0]["id"]; + console.log(id); }else{ - id = 1; + var id = 1; } - jQuery('.first_'+id).click(); }); $(document).ready(function () { var menus = JSON.parse(localStorage.getItem("menus")); if (menus != null) { - console.log("menu") + console.log("menu"); menu_cache_append(menus); }else{ $("#menu_data").removeClass("hidden"); @@ -599,27 +598,26 @@ var category = menus[0]["categories"]; for(var ii in category) { - // - if (category[ii]["valid_time"]== true){ - if (category[ii]["parent_id"] == null ){ - if(type){ + if (category[ii]["is_available"]== true){ + if (category[ii]["valid_time"]== true){ + if (category[ii]["parent_id"] == null ){ + if(type){ + if (category[ii]["code"].includes("SPL") != true) { + category_list_template(category[ii]); + } + }else{ + if ($("#table_get_current").text()) { if (category[ii]["code"].includes("SPL") != true) { category_list_template(category[ii]); - } - }else{ - if ($("#table_get_current").text()) { - if (category[ii]["code"].includes("SPL") != true) { - category_list_template(category[ii]); - }else { - category_list_template(category[ii]); - } + }else { + category_list_template(category[ii]); } } } } + } } + } } $(".tables").on('click', function () { diff --git a/app/views/origami/dashboard/index.html.erb b/app/views/origami/dashboard/index.html.erb index 2b5cca1e..4712a481 100644 --- a/app/views/origami/dashboard/index.html.erb +++ b/app/views/origami/dashboard/index.html.erb @@ -208,7 +208,6 @@ " id="server_mode"> \ No newline at end of file +