From 2fb4a85295472feafba0d3628ac4c0a06fc7a865 Mon Sep 17 00:00:00 2001 From: NyanLinHtut Date: Wed, 29 May 2019 17:32:53 +0630 Subject: [PATCH 1/5] mobile view --- app/assets/stylesheets/application.scss | 11 +- app/assets/stylesheets/login.scss | 10 +- app/views/layouts/_left_sidebar.html.erb | 285 +++++++++++++++++------ app/views/layouts/login.html.erb | 38 +-- 4 files changed, 246 insertions(+), 98 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index b1718ee2..f3cd1157 100755 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -119,9 +119,14 @@ i.logout_icon{ margin-right: 15px; color:#fff !important; # background-color: green !important; -} +} .payment-btn-box { - width: 130px; + width: 130px; height: 50px; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + #setting{ display: none;} + .menu-up{ display: none;} +} diff --git a/app/assets/stylesheets/login.scss b/app/assets/stylesheets/login.scss index f156d4d3..3d2504d0 100755 --- a/app/assets/stylesheets/login.scss +++ b/app/assets/stylesheets/login.scss @@ -22,7 +22,7 @@ display: block; width: 100%; text-align: center; - color: #000; + color: #000; margin-top: -5px; } @@ -117,4 +117,10 @@ .box { margin : 0 -60px 0 -60px; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + .login_pwd{width: 90%;} + .login_ent{width: 10%;} + +} diff --git a/app/views/layouts/_left_sidebar.html.erb b/app/views/layouts/_left_sidebar.html.erb index 21b32859..d9f12423 100644 --- a/app/views/layouts/_left_sidebar.html.erb +++ b/app/views/layouts/_left_sidebar.html.erb @@ -2,12 +2,12 @@ - - <%= javascript_include_tag 'login', 'data-turbolinks-track': 'reload' %> + <%= javascript_include_tag 'login', 'data-turbolinks-track': 'reload' %> @@ -57,8 +57,8 @@ <% flash.each do |type, message| %> - <% - if type == "notice" + <% + if type == "notice" color = "alert-success" elsif type == "error" color = "alert-danger" @@ -67,22 +67,22 @@ else color = "bg-black" end %> - + - <% end %> + <% end %>
- <%= shop_detail.name %> + <%= shop_detail.name %>
@@ -90,13 +90,13 @@
-
+ -
+ +
CLR
+ <% end %> + + +
<% end %> @@ -139,7 +147,7 @@ $("#login_form_password").focus(); $(".pin_pad").click(function (event) { - event.preventDefault(); + event.preventDefault(); var value = $(this).data("value"); if (value == "CLR") { @@ -154,12 +162,12 @@ } }); $(".enter").click(function (event) { - event.preventDefault(); + event.preventDefault(); var value = $(this).data("value"); if (value == "ENT") { $("#new_login_form").submit(); - } + } }); }); function showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit) { @@ -199,5 +207,3 @@ - - From 9440bcfa7e220c68dcd99f8fed4524dfaec1b792 Mon Sep 17 00:00:00 2001 From: PPK Date: Wed, 29 May 2019 17:34:43 +0630 Subject: [PATCH 2/5] Update Reort --- app/controllers/api/orders_controller.rb | 4 ++++ app/views/reports/dailysale/index.html.erb | 20 ++++++++++---------- app/views/reports/dailysale/index.xls.erb | 2 +- app/views/reports/shiftsale/index.html.erb | 4 ++-- dump.rdb | Bin 1084 -> 3868 bytes 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/controllers/api/orders_controller.rb b/app/controllers/api/orders_controller.rb index c893bb64..aab34b42 100755 --- a/app/controllers/api/orders_controller.rb +++ b/app/controllers/api/orders_controller.rb @@ -47,8 +47,12 @@ class Api::OrdersController < Api::ApiController # end @shop = Shop.first + puts "Hello world" + puts @shop.to_json + return @shop.to_json end + # Description # This API allow new order creation # Input Params diff --git a/app/views/reports/dailysale/index.html.erb b/app/views/reports/dailysale/index.html.erb index a6b57134..6b055fc2 100755 --- a/app/views/reports/dailysale/index.html.erb +++ b/app/views/reports/dailysale/index.html.erb @@ -31,34 +31,34 @@ <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.void_amount") %> <% if @payment_methods.include? ("MPU") %> - <%= t("views.right_panel.detail.mpu_sales") %> + <%= t("views.right_panel.detail.mpu_sales") %> <% end %> <% if @payment_methods.include? ("Master") %> - <%= t("views.right_panel.detail.master_sales") %> + <%= t("views.right_panel.detail.master_sales") %> <% end %> <% if @payment_methods.include? ("VISA") %> - <%= t("views.right_panel.detail.visa_sales") %> + <%= t("views.right_panel.detail.visa_sales") %> <% end %> <% if @payment_methods.include? ("JCB") %> - <%= t("views.right_panel.detail.jcb_sales") %> + <%= t("views.right_panel.detail.jcb_sales") %> <% end %> <% if @payment_methods.include? ("UNIONPAY") %> - <%= t("views.right_panel.detail.unionpay_sales") %> + <%= t("views.right_panel.detail.unionpay_sales") %> <% end %> <% if @payment_methods.include? ("Alipay") %> - <%= t("views.right_panel.detail.alipay_sales") %> + <%= t("views.right_panel.detail.alipay_sales") %> <% end %> <% if @payment_methods.include? ("PAYMAL") %> - <%= t("views.right_panel.detail.paymal_sales") %> + <%= t("views.right_panel.detail.paymal_sales") %> <% end %> <% if @payment_methods.include? ("DINGA") %> - <%= t("views.right_panel.detail.dinga_sales") %> + <%= t("views.right_panel.detail.dinga_sales") %> <% end %> <% if @payment_methods.include? ("JunctionPay") %> - <%= t("views.right_panel.detail.junctionpay_sales") %> + <%= t("views.right_panel.detail.junctionpay_sales") %> <% end %> <% if @payment_methods.include? ("Redeem") %> - <%= t("views.right_panel.detail.redeem_sales") %> + <%= t("views.right_panel.detail.redeem_sales") %> <% end %> <%= t("views.right_panel.detail.cash_sales") %> <%= t("views.right_panel.detail.credit_sales") %> diff --git a/app/views/reports/dailysale/index.xls.erb b/app/views/reports/dailysale/index.xls.erb index b8bf01b8..d441e48e 100755 --- a/app/views/reports/dailysale/index.xls.erb +++ b/app/views/reports/dailysale/index.xls.erb @@ -19,7 +19,7 @@ <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.void_amount") %> <% if @payment_methods.include? ("MPU") %> - <%= t("views.right_panel.detail.mpu_sales") %> + <%= t("views.right_panel.detail.mpu_sales") %> <% end %> <% if @payment_methods.include? ("Master") %> <%= t("views.right_panel.detail.master_sales") %> diff --git a/app/views/reports/shiftsale/index.html.erb b/app/views/reports/shiftsale/index.html.erb index f9b4e233..e5382b87 100755 --- a/app/views/reports/shiftsale/index.html.erb +++ b/app/views/reports/shiftsale/index.html.erb @@ -54,8 +54,8 @@ <%= t("views.right_panel.detail.cash_payment") %> <%= t("views.right_panel.detail.credit_payment") %> - <%= t("views.btn.other_payment") %> - <%= t("views.btn.foc") %> <%= t :payment %> + <%= t("views.btn.other_payment") %> + <%= t("views.btn.foc") %> <%= t :payment %> diff --git a/dump.rdb b/dump.rdb index 87e22f1d49653abdc6c0f99faa01b9c718bc686f..99b6899f68e00045419078e588b2d46029c6f5a1 100644 GIT binary patch literal 3868 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 Date: Wed, 29 May 2019 17:49:02 +0630 Subject: [PATCH 3/5] 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 4/5] 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 5/5] 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!