diff --git a/app/assets/javascripts/OQS.js b/app/assets/javascripts/OQS.js new file mode 100644 index 00000000..3009bd15 --- /dev/null +++ b/app/assets/javascripts/OQS.js @@ -0,0 +1,17 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. JavaScript code in this file should be added after the last require_* statement. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require jquery +//= require bootstrap +//= require jquery_ujs +//= require turbolinks +//= require_tree . diff --git a/app/assets/javascripts/orgiami.js b/app/assets/javascripts/orgiami.js new file mode 100644 index 00000000..3009bd15 --- /dev/null +++ b/app/assets/javascripts/orgiami.js @@ -0,0 +1,17 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. JavaScript code in this file should be added after the last require_* statement. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require jquery +//= require bootstrap +//= require jquery_ujs +//= require turbolinks +//= require_tree . diff --git a/app/controllers/base_oqs_controller.rb b/app/controllers/base_oqs_controller.rb new file mode 100644 index 00000000..16fe9b07 --- /dev/null +++ b/app/controllers/base_oqs_controller.rb @@ -0,0 +1,9 @@ +class BaseOqsController < ActionController::Base + include LoginVerification + layout "OQS" + + #before_action :check_installation + protect_from_forgery with: :exception + + +end diff --git a/app/controllers/base_origami_controller.rb b/app/controllers/base_origami_controller.rb new file mode 100644 index 00000000..b250303d --- /dev/null +++ b/app/controllers/base_origami_controller.rb @@ -0,0 +1,9 @@ +class BaseOrigamiController < ActionController::Base + include LoginVerification + layout "origami" + + #before_action :check_installation + protect_from_forgery with: :exception + + +end diff --git a/app/controllers/base_waiter_controller.rb b/app/controllers/base_waiter_controller.rb new file mode 100644 index 00000000..e86433dc --- /dev/null +++ b/app/controllers/base_waiter_controller.rb @@ -0,0 +1,9 @@ +class BaseWaiterController < ActionController::Base + include LoginVerification + layout "waiter" + + #before_action :check_installation + protect_from_forgery with: :exception + + +end diff --git a/app/controllers/oqs/home_controller.rb b/app/controllers/oqs/home_controller.rb new file mode 100644 index 00000000..acf99e41 --- /dev/null +++ b/app/controllers/oqs/home_controller.rb @@ -0,0 +1,6 @@ +class Oqs::HomeController < BaseOqsController + def index + end + def show + end +end diff --git a/app/controllers/origami/home_controller.rb b/app/controllers/origami/home_controller.rb new file mode 100644 index 00000000..8cbc8e55 --- /dev/null +++ b/app/controllers/origami/home_controller.rb @@ -0,0 +1,6 @@ +class Origami::HomeController < BaseOrigamiController + def index + end + def show + end +end diff --git a/app/views/layouts/OQS.html.erb b/app/views/layouts/OQS.html.erb index c6cc4d99..9f736336 100644 --- a/app/views/layouts/OQS.html.erb +++ b/app/views/layouts/OQS.html.erb @@ -9,12 +9,12 @@ SmartSales : Restaurant <%= csrf_meta_tags %> - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> - <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> + <%= stylesheet_link_tag 'OQS', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= javascript_include_tag 'OQS', 'data-turbolinks-track': 'reload' %> - <%= render 'layouts/header' %> + <%= render 'layouts/header_oqs' %>
<% flash.each do |type, message| %>
diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 8eb9209f..4e2253fa 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -25,12 +25,15 @@
-
- -
+ <% if current_login_employee %> +
+ +
+ <% end %> + diff --git a/app/views/layouts/_header_oqs.html.erb b/app/views/layouts/_header_oqs.html.erb new file mode 100644 index 00000000..257b6a0f --- /dev/null +++ b/app/views/layouts/_header_oqs.html.erb @@ -0,0 +1,12 @@ +
+
+
+ ORDE QUEUE STATION +
+
+ <% if current_login_employee %> + <%= current_login_employee.name %> | <%= link_to 'Logout', logout_path, method: :delete, data: { confirm: 'Are you sure?' } %> + <% end %> +
+
+
diff --git a/app/views/layouts/_header_orgiami.html.erb b/app/views/layouts/_header_orgiami.html.erb new file mode 100644 index 00000000..894e7a1f --- /dev/null +++ b/app/views/layouts/_header_orgiami.html.erb @@ -0,0 +1,12 @@ +
+
+
+ CASHIER STATION 1 - CLOCK +
+
+ <% if current_login_employee %> + <%= current_login_employee.name %> | <%= link_to 'Logout', logout_path, method: :delete, data: { confirm: 'Are you sure?' } %> + <% end %> +
+
+
diff --git a/app/views/layouts/origami.html.erb b/app/views/layouts/origami.html.erb index c6cc4d99..2c438597 100644 --- a/app/views/layouts/origami.html.erb +++ b/app/views/layouts/origami.html.erb @@ -9,12 +9,12 @@ SmartSales : Restaurant <%= csrf_meta_tags %> - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> - <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> + <%= stylesheet_link_tag 'orgiami', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= javascript_include_tag 'orgiami', 'data-turbolinks-track': 'reload' %> - <%= render 'layouts/header' %> + <%= render 'layouts/header_orgiami' %>
<% flash.each do |type, message| %>
diff --git a/app/views/oqs/home/index.html.erb b/app/views/oqs/home/index.html.erb new file mode 100644 index 00000000..9ef0074e --- /dev/null +++ b/app/views/oqs/home/index.html.erb @@ -0,0 +1,315 @@ +
+
+ + + + + + +
+ +
+ +
+
+
+

1. Table 4 - Beef Steak [x1]

+

Medium, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

2. Table 4 - Beef Steak [x1]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

3. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

4. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

5. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

6. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

7. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

8. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

9. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

10. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

11. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

12. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

13. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

14. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

15. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

16. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

17. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

18. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+
+
+

19. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

Order at 12:23, Kyaw Lwin

+
+
+ +
+
+ + +
+ +
+
+
+

Card title that wraps to a new line

+

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
+ + Someone famous in Source Title + +
+
+
+
+
+

Card title

+

This card has supporting text below as a natural lead-in to additional content.

+

Last updated 3 mins ago

+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat.

+
+ + Someone famous in Source Title + +
+
+
+
+
+

Card title

+

This card has supporting text below as a natural lead-in to additional content.

+

Last updated 3 mins ago

+
+
+
+ + +
+ + +
+ + +
+
+
+

Card title that wraps to a new line

+

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+
+
+

Card title

+

This card has supporting text below as a natural lead-in to additional content.

+

Last updated 3 mins ago

+
+
+ +
+
+

Card title

+

This card has supporting text below as a natural lead-in to additional content.

+

Last updated 3 mins ago

+
+
+
+ + +
+ +
+ + + +
+ +
+
+
+
ORDER DETAILS - Table 4
+
+
+
+ + + + + + + + + + + + + + + + + +
Order ByOrder At + Customer +
Kyaw Lwin20/04/17 9:30PMJohn Smith
Table/RoomTable 4
+ + + + + + +
ItemsQTY +
+
+
+ + + + + + + + + +
+ Menu Items Name
+ Less Sweet, No MSG +
+ 5 +
+
+ +
+
+
+ +
+ + + +



+ + + +
+
diff --git a/app/views/origami/home/index.html.erb b/app/views/origami/home/index.html.erb new file mode 100644 index 00000000..051c9a26 --- /dev/null +++ b/app/views/origami/home/index.html.erb @@ -0,0 +1,351 @@ +
+
+ + + + + + +
+ +
+ +
+
+
+

Card title that wraps to a new line

+

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
+ + Someone famous in Source Title + +
+
+
+
+
+

Card title

+

This card has supporting text below as a natural lead-in to additional content.

+

Last updated 3 mins ago

+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat.

+
+ + Someone famous in Source Title + +
+
+
+
+
+

Card title

+

This card has supporting text below as a natural lead-in to additional content.

+

Last updated 3 mins ago

+
+
+ +
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
+ + Someone famous in Source Title + +
+
+
+
+
+

Card title

+

This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.

+

Last updated 3 mins ago

+
+
+
+ +
+ + +
+ +
+
+
+

Card title that wraps to a new line

+

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+
+ + Someone famous in Source Title + +
+
+
+
+
+

Card title

+

This card has supporting text below as a natural lead-in to additional content.

+

Last updated 3 mins ago

+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat.

+
+ + Someone famous in Source Title + +
+
+
+
+
+

Card title

+

This card has supporting text below as a natural lead-in to additional content.

+

Last updated 3 mins ago

+
+
+
+ + +
+ + +
+ + +
+
+
+

Card title that wraps to a new line

+

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+
+
+

Card title

+

This card has supporting text below as a natural lead-in to additional content.

+

Last updated 3 mins ago

+
+
+ +
+
+

Card title

+

This card has supporting text below as a natural lead-in to additional content.

+

Last updated 3 mins ago

+
+
+
+ + +
+ +
+ + + +
+ +
+
+
+
ORDER DETAILS - Table 4
+
+
+
+ + + + + + +
ItemsQTY + Price +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Menu Items Name @ 50.00 + + 5 + + 250.00 +
+ Menu Items Name @ 50.00 + + 5 + + 250.00 +
+ Menu Items Name @ 50.00 + + 5 + + 250.00 +
+ Menu Items Name @ 50.00 + + 5 + + 250.00 +
+ Menu Items Name @ 50.00 + + 5 + + 250.00 +
+ Menu Items Name @ 50.00 + + 5 + + 250.00 +
+ Menu Items Name @ 50.00 + + 5 + + 250.00 +
+ Menu Items Name @ 50.00 + + 5 + + 250.00 +
+ Menu Items Name @ 50.00 + + 5 + + 250.00 +
+ Menu Items Name @ 50.00 + + 5 + + 250.00 +
+
+ + +
+
+
+ +
+ + + + + + + + + + + + +
+
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 01ef3e66..25035088 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -9,3 +9,10 @@ Rails.application.config.assets.version = '1.0' # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # Rails.application.config.assets.precompile += %w( search.js ) + +# --- Waiter/ Cashier - Orgiami ---- +Rails.application.config.assets.precompile += %w( orgiami.css ) +Rails.application.config.assets.precompile += %w( orgiami.js ) +# -- Order Queue Station ----- +Rails.application.config.assets.precompile += %w( OQS.css ) +Rails.application.config.assets.precompile += %w( OQS.js ) diff --git a/config/routes.rb b/config/routes.rb index b0aa38f5..d00c7453 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -58,13 +58,16 @@ Rails.application.routes.draw do end #--------- Cashier ------------# - resources :origami, only: [:index, :show] do - resources :payment, only: [:create ] #add payment by payment_method - resources :discount, only: [:create ] #add discount type - + namespace :origami do + root "home#index" + get "/:booking_id" => "home#show" do #origami/:booking_id will show + resources :payment, only: [:create ] #add payment by payment_method + resources :discount, only: [:create ] #add discount type + end end + #--------- Waiter ------------# namespace :waiter do #zones @@ -83,6 +86,7 @@ Rails.application.routes.draw do #--------- Order Queue Station ------------# namespace :oqs do + root "home#index" #dashboard # end