From d38d3184cb06550ad3a9031b43a5188d54d377d2 Mon Sep 17 00:00:00 2001 From: code2lab Date: Wed, 29 May 2019 17:49:02 +0630 Subject: [PATCH 1/3] SX project --- config/database.yml.sample | 91 +++++--------------------------------- config/facebook.yml | 11 +++++ config/puma.rb | 18 ++++---- config/secrets.yml | 15 ++----- 4 files changed, 35 insertions(+), 100 deletions(-) create mode 100644 config/facebook.yml diff --git a/config/database.yml.sample b/config/database.yml.sample index 02c6afe3..211fb2f0 100755 --- a/config/database.yml.sample +++ b/config/database.yml.sample @@ -1,83 +1,16 @@ -# ## SQLIte3 --- Setup -# -# # SQLite version 3.x -# # gem install sqlite3 -# # -# # Ensure the SQLite 3 gem is defined in your Gemfile -# # gem 'sqlite3' -# # -# default: &default -# adapter: sqlite3 -# pool: 5 -# timeout: 5000 -# -# development: -# <<: *default -# database: db/development.sqlite3 -# -# # Warning: The database defined as "test" will be erased and -# # re-generated from your development database when you run "rake". -# # Do not set this db to the same as development or production. -# test: -# <<: *default -# database: db/test.sqlite3 -# -# production: -# <<: *default -# database: db/production.sqlite3 - -# Mysql --- Setup -# MySQL. Versions 5.0 and up are supported. -# -# Install the MySQL driver -# gem install mysql2 -# -# Ensure the MySQL gem is defined in your Gemfile -# gem 'mysql2' -# -# And be sure to use new-style password hashing: -# http://dev.mysql.com/doc/refman/5.7/en/old-client.html -# default: &default - adapter: mysql2 - encoding: utf8 - pool: 5 - username: root - password: - socket: /tmp/mysql.sock + adapter: postgresql + host: localhost + pool: 5 + timeout: 5000 + encoding: unicode + username: wunna + password: admin123 + port: 5432 development: - <<: *default - database: SXRestaurants_development - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - <<: *default - database: SXRestaurants_test - -# As with config/secrets.yml, you never want to store sensitive information, -# like your database password, in your source code. If your source code is -# ever seen by anyone, they now have access to your database. -# -# Instead, provide the password as a unix environment variable when you boot -# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database -# for a full rundown on how to provide these environment variables in a -# production deployment. -# -# On Heroku and other platform providers, you may have a full connection URL -# available as an environment variable. For example: -# -# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase" -# -# You can use this database configuration with: -# -# production: -# url: <%= ENV['DATABASE_URL'] %> -# + <<: *default + database: SXDatabase production: - <<: *default - database: SXRestaurants_production - username: SXRestaurants - password: <%= ENV['SXRESTAURANTS_DATABASE_PASSWORD'] %> + <<: *default + database: paymal diff --git a/config/facebook.yml b/config/facebook.yml new file mode 100644 index 00000000..a60b0def --- /dev/null +++ b/config/facebook.yml @@ -0,0 +1,11 @@ +development: +## with doemal account +app_id: 1049017345154593 +secret: 36b2d6132deb803aa9d503d0034e7a68 + +## My account +#app_id: 434807636720506 +#secret: b94c5e35cde5a2c13cfb2e1ba8be30c6 + + + \ No newline at end of file diff --git a/config/puma.rb b/config/puma.rb index 6f7c4941..b5aa06b3 100755 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,10 +1,10 @@ -application_path="#{File.expand_path("../..", __FILE__)}" -directory application_path +#application_path="#{File.expand_path("../..", __FILE__)}" +#directory application_path # environment ENV.fetch("RAILS_ENV") { "production" } -environment "production" -pidfile "#{application_path}/tmp/puma/pid" -state_path "#{application_path}/tmp/puma/state" -stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" -port ENV.fetch("PORT") { 62158 } -workers 2 -preload_app! +#environment "production" +#pidfile "#{application_path}/tmp/puma/pid" +#state_path "#{application_path}/tmp/puma/state" +#stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" +#port ENV.fetch("PORT") { 62158 } +#workers 2 +#preload_app! diff --git a/config/secrets.yml b/config/secrets.yml index 0282c5fc..0536042a 100755 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -11,21 +11,12 @@ # if you're sharing your code publicly. development: - secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61 - sx_provision_url: connect.smartsales.asia/api #connect.smartsales.dev/api #connect.smartsales.asia/api #provision.zsai.ws/api - server_mode: application - cipher_type: AES-256-CBC - sx_key: Wh@t1$C2L + secret_key_base: a17cafd23cb0d29cf61d909be65790f19f25a117683b25a23419b8cdf87d9ec21135e031130f6192998e385017ec1c3250e493c0e42c2e6241b66e14048c6eb5 test: - secret_key_base: 5c92143fd4a844fdaf8b22aba0cda22ef1fc68f1b26dd3d40656866893718ae5e58625b4c3a5dc86b04c8be0a505ec0ebc0be3bf52249a3d1e0c1334ee591cf0 + secret_key_base: 477062b07514b11d98ad096b82d81cd692af7a9f084e022dc65cfe02b26b01d11dcf950e624927894a3a1850fde5c82c0b27d8a24686b6c2d522154d0adaffec # Do not keep production secrets in the repository, # instead read values from the environment. production: - secret_key_base: c4bc81065013f9a3506d385bcbd49586c42e586488144b0de90c7da36867de9fa880f46b5c4f86f0ce9b7c783bb5a73bdb0e5605a47716567294390e726d3e22 - sx_provision_url: connect.smartsales.asia/api #192.168.1.147:3002/api - server_mode: application - cipher_type: AES-256-CBC - sx_key: Wh@t1$C2L - + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> From 0fef2d5ba25f405d2a4bb3a8033593cc51b7f622 Mon Sep 17 00:00:00 2001 From: code2lab Date: Wed, 29 May 2019 18:37:58 +0630 Subject: [PATCH 2/3] wt updated --- app/assets/images/online_order_icon.png | Bin 0 -> 376 bytes app/assets/images/user_icon.png | Bin 0 -> 819 bytes app/assets/stylesheets/CRM.scss | 61 +++++++++- app/assets/stylesheets/OQS.scss | 53 ++++++++- app/assets/stylesheets/application.scss | 51 ++++++++ .../stylesheets/inventory_definitions.scss | 53 ++++++++- app/assets/stylesheets/origami.scss | 75 ++++++++++-- .../reports/dailysale_controller.rb | 8 +- app/models/sale.rb | 11 -- app/views/home/dashboard.html.erb | 95 +++++++++------ app/views/home/index.html.erb | 10 +- app/views/layouts/_header.html.erb | 64 +++++----- app/views/reports/dailysale/index.html.erb | 110 ++++++++---------- app/views/reports/shiftsale/index.html.erb | 14 +-- config/initializers/action_controller.rb | 10 +- 15 files changed, 439 insertions(+), 176 deletions(-) create mode 100644 app/assets/images/online_order_icon.png create mode 100644 app/assets/images/user_icon.png diff --git a/app/assets/images/online_order_icon.png b/app/assets/images/online_order_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b9e74994e2a0562238abbafa33302aae28fb83cc GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEX7WqAsj$Z!;#Vf4nJ zFzyCnMyofE9{~j=OI#yLg7ec#$`gxH8OqDc^)mCai<1)zQuXqS(r3T3kpe3E>gnPb z;?a3`if!H@2LZSAW&zy}J@p06#SG;q6pNUp{3d8QY3^XL7ZnPb)1ai`biu)y(Us-m z;txs!+Y*mwi$Bp`d-MA<_f04Ea~PM>*&tQ4NOb<_5k zrb;8O3oOqLmdNRWq-MF)+T zZ)Wx*B+$di8wZV;x1oU^MqWB-#Jma(^f2SxM=J#Y7qtt^map!)hq+{Qm>E8(<>80&fJc4fvYC#CM?Iqi>fQ zi7~TJlHMl>`DkXd9(}tSiSSy8NJJJ!o+LQ8{puqISPR@)Mt$4_dh*V93BW$!RJ3ov zFmMBy0e(l@3~(JNR>hqF_U4!QzeEOstH7V=N?!t6&WM3cz~v}rG1Azx5;<2V(M4qy z{T@)RGi<&@hK>RQROVwn(f$Z<1(>fBR|Xyc#{kb|rX>c}1LuGb%cz00%mU|u4W0%J zIMd)NX3acsmbBkcfL>rM2LrW?(c~LSQ x(lS`vP`5^?Oy+)Oo=!T}wDrFyI&^3={sL$jF$kuj;i&)s002ovPDHLkV1l~&SzZ7D literal 0 HcmV?d00001 diff --git a/app/assets/stylesheets/CRM.scss b/app/assets/stylesheets/CRM.scss index de416831..2febb6d0 100755 --- a/app/assets/stylesheets/CRM.scss +++ b/app/assets/stylesheets/CRM.scss @@ -69,11 +69,11 @@ z-index: 1100; } -#sxModal-Content { +#sxModal-Content { position: relative; left: 42%; top: 30%; - background-color: #32ad1a; + background-color: #32ad1a; color: #fff; text-align: center; width: 200px; @@ -92,7 +92,7 @@ #videoElement { width: 480px; height: 375px; - + } .cashier_number{ @@ -243,7 +243,7 @@ i.logout_icon{ span.round-tab:hover{ color: white; border: 1px solid #fff; - background-color:#2196F3; + background-color:#2196F3; } .wizard .nav-tabs > li { width: 25%; @@ -268,4 +268,55 @@ i.logout_icon{ font-size: 14px; color: #FFFFFF; } -/*customer modal UI */ \ No newline at end of file +/*customer modal UI */ + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100%; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } +} diff --git a/app/assets/stylesheets/OQS.scss b/app/assets/stylesheets/OQS.scss index 6a97bdcb..11fa7952 100755 --- a/app/assets/stylesheets/OQS.scss +++ b/app/assets/stylesheets/OQS.scss @@ -120,4 +120,55 @@ i.logout_icon{ .table-width{ width: 100%; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100%; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } +} diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index f3cd1157..6c5f0821 100755 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -130,3 +130,54 @@ i.logout_icon{ #setting{ display: none;} .menu-up{ display: none;} } + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100%; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } +} diff --git a/app/assets/stylesheets/inventory_definitions.scss b/app/assets/stylesheets/inventory_definitions.scss index aa02f08d..e9eb5d80 100755 --- a/app/assets/stylesheets/inventory_definitions.scss +++ b/app/assets/stylesheets/inventory_definitions.scss @@ -279,4 +279,55 @@ tr.discount-item-row:hover { i.logout_icon{ position: relative; top: 5px; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100%; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } +} diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 2558d846..5d933f39 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -62,8 +62,8 @@ select.form-control { /* .order-info { - min-height:300px; - max-height:500px; + min-height:300px; + max-height:500px; overflow:auto } */ @@ -222,7 +222,7 @@ select.form-control { margin-right: 15px; color:#fff !important; # background-color: green !important; -} +} /* Reciept Style */ #order-charges-table td { @@ -336,11 +336,11 @@ tr.discount-item-row:hover { z-index: 1100; } -#sxModal-Content { +#sxModal-Content { position: relative; left: 42%; top: 30%; - background-color: #32ad1a; + background-color: #32ad1a; color: #fff; text-align: center; width: 200px; @@ -373,7 +373,7 @@ tr.discount-item-row:hover { opacity: 1; filter: alpha(opacity=100); /* ie */ -moz-opacity: 1; /* mozilla */ - + } /* For Payment Page */ @@ -465,7 +465,7 @@ iframe { } .tax-btn-box { - width: 230px; + width: 230px; height: 80px; } @@ -518,12 +518,12 @@ nav.pagination .page a:hover, opacity: 1; z-index: 101; filter: alpha(opacity=100); /* ie */ - -moz-opacity: 1; /* mozilla */ + -moz-opacity: 1; /* mozilla */ } .existing_invoice{ background-color:#ffab51; color:#fff; - + } @@ -628,7 +628,7 @@ nav.pagination .page a:hover, span.round-tab:hover{ color: white; border: 1px solid #fff; - background-color:#2196F3; + background-color:#2196F3; } .wizard .nav-tabs > li { width: 25%; @@ -656,6 +656,57 @@ nav.pagination .page a:hover, /*customer modal UI */ .payment-btn-box { - width: 130px; + width: 130px; height: 50px; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100%; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } +} diff --git a/app/controllers/reports/dailysale_controller.rb b/app/controllers/reports/dailysale_controller.rb index 838536a7..6fb7fe3f 100755 --- a/app/controllers/reports/dailysale_controller.rb +++ b/app/controllers/reports/dailysale_controller.rb @@ -1,6 +1,6 @@ class Reports::DailysaleController < BaseReportController authorize_resource :class => false - + def index from, to = get_date_range_from_params @sale_data = Sale.daily_sales_list(from,to) @@ -16,9 +16,9 @@ class Reports::DailysaleController < BaseReportController format.xls end end - + def show - + end - + end diff --git a/app/models/sale.rb b/app/models/sale.rb index 761492b1..21836a6f 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -879,7 +879,6 @@ def self.daily_sales_list(from,to) total_sale.each do |sale| grand_total = sale.grand_total - amount_received = sale.amount_received old_grand_total = sale.old_grand_total total_discount = sale.total_discount void_amount = sale.void_amount @@ -952,7 +951,6 @@ def self.get_by_shiftsales(from,to,shift) end shift_sale_data[shift_sale.id] = { - :shift_id => shift_sale.id, :cashier_terminal_name => shift_sale.cashier_terminal.name, :employee_name => shift_sale.employee.name, :shift_started_at => shift_sale.shift_started_at, @@ -1127,15 +1125,6 @@ def self.get_by_shift_items(shift_sale_range, shift, from, to, status,type,accou return query,other_charges, product, discount_query , total_cash_amount , total_card_amount , total_credit_amount , total_foc_amount , total_grand_total , change_amount end -def self.get_shift_sale_items(sh_id) - query = Sale.select("sales.shift_sale_id as shift_sale_id, i.account_id as account_id, acc.title as account_name, i.item_instance_code as item_code, i.menu_category_name, i.menu_category_code as menu_category_id, i.product_name as product_name, i.unit_price, i.price as price, i.qty as qty, SUM(i.qty) as total_item, SUM(i.qty * i.unit_price) as grand_total, i.status as status_type, i.remark as remark") - .joins("JOIN sale_items i on i.sale_id = sales.sale_id") - .joins("JOIN accounts acc on acc.id = i.account_id") - .where("sales.shift_sale_id=?", sh_id) - .group("acc.title,i.account_id,i.menu_category_code,i.item_instance_code,i.product_name,i.unit_price") - .order("acc.title desc, i.account_id desc, i.menu_category_code desc, i.unit_price asc") -end - def self.get_product_sale() query = Sale.select("i.account_id as account_id, " + "SUM(i.qty * i.unit_price) as grand_total,SUM(i.qty) as total_item," + diff --git a/app/views/home/dashboard.html.erb b/app/views/home/dashboard.html.erb index a65ac631..3dd2c92a 100755 --- a/app/views/home/dashboard.html.erb +++ b/app/views/home/dashboard.html.erb @@ -14,10 +14,10 @@ else delimiter = "" end - %> + %>
-
+
help @@ -30,7 +30,7 @@
-
+
attach_money @@ -44,7 +44,7 @@
-
+
person_add @@ -57,7 +57,7 @@
-
+
credit_card @@ -99,27 +99,27 @@ to_time = '' end %> -
+
-
+
-
+
-
+
-
+

@@ -131,26 +131,29 @@
<% if current_user.role == 'administrator' || current_user.role == 'manager' || current_user.role == 'account' %>
-
-
-
-
-

dashboard<%= (t :top) + " " + (t :products) %>

- - <%= pie_chart @top_products %> + <% isMobile = request.user_agent %> + <% if !isMobile.include? "Mobile" %> +
+
+
+
+

dashboard<%= (t :top) + " " + (t :products) %>

+ + <%= pie_chart @top_products %> +
+
+
+
+
+
+

dashboard<%= (t :bottom) + " " + (t :products) %>

+ + <%= pie_chart @bottom_products %> +
-
-
-
-

dashboard<%= (t :bottom) + " " + (t :products) %>

- - <%= pie_chart @bottom_products %> -
-
-
-
+ <% end %> + <%= pie_chart @top_products %> +
+
+
+
+
+
+

dashboard<%= (t :bottom) + " " + (t :products) %>

+ + <%= pie_chart @bottom_products %> +
+
+
+
+ <% end %>
\ No newline at end of file + diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index a8a6d85c..acb35329 100755 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -154,7 +154,7 @@ $(".collapse.in").each(function () { $(this).siblings(".panel-heading").find(".glyphicon").addClass("glyphicon-minus").removeClass("glyphicon-plus"); }); - + // Toggle plus minus icon on show hide of collapse element $(".collapse").on('show.bs.collapse', function () { $(this).parent().find(".glyphicon").removeClass("glyphicon-plus").addClass("glyphicon-minus"); @@ -164,11 +164,3 @@ }); - - - - - - - - diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 164b6c4f..415e8f2c 100755 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -18,19 +18,19 @@ <%if current_login_employee.role !="waiter" %> <% if current_login_employee.role == "administrator" || current_login_employee.role == "manager" || current_login_employee.role == "account" %> - + <% elsif current_login_employee.role == "supervisor" || current_login_employee.role == "cashier" || current_login_employee.role == "waiter" %> - + <%else%> - + <% end %> <% else %> - + <%end%> Logo SX Restaurant - + @@ -40,11 +40,17 @@ <%= shop_detail.name %>
- + \ No newline at end of file +
diff --git a/app/views/reports/shiftsale/index.html.erb b/app/views/reports/shiftsale/index.html.erb index 8c4a113f..2db05f6e 100755 --- a/app/views/reports/shiftsale/index.html.erb +++ b/app/views/reports/shiftsale/index.html.erb @@ -56,10 +56,10 @@ <%= t("views.right_panel.detail.credit_payment") %> <%= t("views.btn.other_payment") %> <%= t("views.btn.foc") %> <%= t :payment %> - + + - @@ -109,8 +109,8 @@ - <%= number_with_precision(result[:other_sales].to_f, precision:precision.to_i,delimiter:delimiter) rescue '-'%> - + <%= number_with_precision(result[:other_sales].to_f, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <%= number_with_precision(result[:foc_sales].to_f, precision:precision.to_i,delimiter:delimiter) rescue '-'%> <%= number_with_precision(result[:grand_total].to_f, precision:precision.to_i,delimiter:delimiter) rescue '-'%> @@ -138,8 +138,8 @@ <%= number_with_precision(credit, precision:precision.to_i,delimiter:delimiter) rescue '-'%> - <%= number_with_precision(card, precision:precision.to_i,delimiter:delimiter) rescue '-'%> - <%= number_with_precision(foc, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <%= number_with_precision(card, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <%= number_with_precision(foc, precision:precision.to_i,delimiter:delimiter) rescue '-'%> <%= number_with_precision(g_total, precision:precision.to_i,delimiter:delimiter) rescue '-'%> diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index 628875b9..a292a543 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -21,11 +21,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 dddfaeccac19075a3e7b7d8f9370401fe0ec3595 Mon Sep 17 00:00:00 2001 From: code2lab Date: Wed, 29 May 2019 18:39:58 +0630 Subject: [PATCH 3/3] wt updated --- config/initializers/action_controller.rb | 10 +++++----- config/puma.rb | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index a292a543..1265e988 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -21,11 +21,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 diff --git a/config/puma.rb b/config/puma.rb index b5aa06b3..fd89392f 100755 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,10 +1,10 @@ -#application_path="#{File.expand_path("../..", __FILE__)}" -#directory application_path -# environment ENV.fetch("RAILS_ENV") { "production" } -#environment "production" -#pidfile "#{application_path}/tmp/puma/pid" -#state_path "#{application_path}/tmp/puma/state" -#stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" -#port ENV.fetch("PORT") { 62158 } -#workers 2 -#preload_app! +application_path="#{File.expand_path("../..", __FILE__)}" +directory application_path +#environment ENV.fetch("RAILS_ENV") { "production" } +environment "production" +pidfile "#{application_path}/tmp/puma/pid" +state_path "#{application_path}/tmp/puma/state" +stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" +port ENV.fetch("PORT") { 62158 } +workers 2 +preload_app!