diff --git a/Gemfile b/Gemfile index 29d5201e..fdba13e9 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,10 @@ gem 'prawn-table' gem 'spreadsheet' gem 'to_xls-rails' +#Reporting gem +gem 'compendium' + + # Use jquery as the JavaScript library gem 'jquery-rails' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks diff --git a/Gemfile.lock b/Gemfile.lock index c89fcd45..4cb481ae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,6 +47,7 @@ GEM sass (>= 3.4.19) builder (3.2.3) byebug (9.0.6) + chunky_png (1.3.8) coffee-rails (4.2.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.2.x) @@ -54,6 +55,30 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) + collection_of (1.0.5) + activesupport (>= 3.0.0) + compass (1.0.3) + chunky_png (~> 1.2) + compass-core (~> 1.0.2) + compass-import-once (~> 1.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + sass (>= 3.3.13, < 3.5) + compass-core (1.0.3) + multi_json (~> 1.0) + sass (>= 3.3.0, < 3.5) + compass-import-once (1.0.5) + sass (>= 3.2, < 3.5) + compass-rails (3.0.2) + compass (~> 1.0.0) + sass-rails (< 5.1) + sprockets (< 4.0) + compendium (1.1.3.4) + collection_of (= 1.0.5) + compass-rails (>= 1.0.0) + inheritable_attr (>= 1.0.0) + rails (>= 3.0.0) + sass-rails (>= 3.0.0) concurrent-ruby (1.0.5) connection_pool (2.2.1) cups (0.0.7) @@ -75,6 +100,8 @@ GEM globalid (0.3.7) activesupport (>= 4.1.0) i18n (0.8.1) + inheritable_attr (1.0.0) + activesupport (>= 3.0.0) jbuilder (2.6.3) activesupport (>= 3.0.0, < 5.2) multi_json (~> 1.2) @@ -222,6 +249,7 @@ DEPENDENCIES bootstrap (~> 4.0.0.alpha3) byebug coffee-rails (~> 4.2) + compendium cups (~> 0.0.7) database_cleaner factory_girl_rails (~> 4.0) diff --git a/app/assets/javascripts/OQS.js b/app/assets/javascripts/OQS.js index 3009bd15..fc91e269 100644 --- a/app/assets/javascripts/OQS.js +++ b/app/assets/javascripts/OQS.js @@ -14,4 +14,4 @@ //= require bootstrap //= require jquery_ujs //= require turbolinks -//= require_tree . +//= require cable diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 3009bd15..fc91e269 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -14,4 +14,4 @@ //= require bootstrap //= require jquery_ujs //= require turbolinks -//= require_tree . +//= require cable diff --git a/app/assets/javascripts/employees.coffee b/app/assets/javascripts/employees.coffee deleted file mode 100644 index 24f83d18..00000000 --- a/app/assets/javascripts/employees.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/home.coffee b/app/assets/javascripts/home.coffee deleted file mode 100644 index 24f83d18..00000000 --- a/app/assets/javascripts/home.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/install.coffee b/app/assets/javascripts/install.coffee deleted file mode 100644 index 24f83d18..00000000 --- a/app/assets/javascripts/install.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/orgiami.js b/app/assets/javascripts/orgiami.js index 3009bd15..fc91e269 100644 --- a/app/assets/javascripts/orgiami.js +++ b/app/assets/javascripts/orgiami.js @@ -14,4 +14,4 @@ //= require bootstrap //= require jquery_ujs //= require turbolinks -//= require_tree . +//= require cable diff --git a/app/assets/javascripts/settings/menu_categories.coffee b/app/assets/javascripts/settings/menu_categories.coffee deleted file mode 100644 index 24f83d18..00000000 --- a/app/assets/javascripts/settings/menu_categories.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/OQS.scss b/app/assets/stylesheets/OQS.scss index b0f802f1..23a49d41 100644 --- a/app/assets/stylesheets/OQS.scss +++ b/app/assets/stylesheets/OQS.scss @@ -7,3 +7,10 @@ // min-height: 75rem; // padding-top: 4.5rem; // } +.order-completed { + background-color: #CCFFDD; +} + +.order-void { + background-color: #FFCCDD; +} diff --git a/app/controllers/crm/home_controller.rb b/app/controllers/crm/home_controller.rb new file mode 100644 index 00000000..ee29270a --- /dev/null +++ b/app/controllers/crm/home_controller.rb @@ -0,0 +1,6 @@ +class Crm::HomeController < BaseCrmController + def index + end + def show + end +end diff --git a/app/controllers/origami/customers_controller.rb b/app/controllers/origami/customers_controller.rb new file mode 100644 index 00000000..d9bfc39b --- /dev/null +++ b/app/controllers/origami/customers_controller.rb @@ -0,0 +1,7 @@ +class Origami::CustomersController < BaseOrigamiController + #Form to add customer - + def index + end + def create + end +end diff --git a/app/controllers/origami/discounts_controller.rb b/app/controllers/origami/discounts_controller.rb new file mode 100644 index 00000000..09ab1103 --- /dev/null +++ b/app/controllers/origami/discounts_controller.rb @@ -0,0 +1,6 @@ +class Origami::DiscountsController < BaseOrigamiController + def index + end + def create + end +end diff --git a/app/controllers/origami/payments_controller.rb b/app/controllers/origami/payments_controller.rb new file mode 100644 index 00000000..447d1282 --- /dev/null +++ b/app/controllers/origami/payments_controller.rb @@ -0,0 +1,6 @@ +class Origami::PaymentsController < BaseOrigamiController + def index + end + def create + end +end diff --git a/app/reports/menu_report.rb b/app/reports/menu_report.rb new file mode 100644 index 00000000..ca430f0a --- /dev/null +++ b/app/reports/menu_report.rb @@ -0,0 +1,5 @@ +class MenuReport < Compendium::Report + query :list, collect: :active_record do |params| + Menu.all + end +end diff --git a/app/views/crm/home/index.html.erb b/app/views/crm/home/index.html.erb new file mode 100644 index 00000000..c094b4a0 --- /dev/null +++ b/app/views/crm/home/index.html.erb @@ -0,0 +1,370 @@ +
+
+ + + + + + +
+ +
+
+
+
+

9. Table 4 - Beef Steak [x3]

+

Well Done, Fries, Salad

+

+ Order at 12:23, Kyaw Lwin | + Printed at 12:23 | + Completed at 12:43 +

+ + +
+
+
+
+

9. 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

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

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.

+

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

+
+
+ +
+
+

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/layouts/CRM.html.erb b/app/views/layouts/CRM.html.erb index c6cc4d99..4bd98526 100644 --- a/app/views/layouts/CRM.html.erb +++ b/app/views/layouts/CRM.html.erb @@ -14,7 +14,7 @@ - <%= render 'layouts/header' %> + <%= render 'layouts/header_crm' %>
<% flash.each do |type, message| %>
diff --git a/app/views/layouts/_header_crm.html.erb b/app/views/layouts/_header_crm.html.erb new file mode 100644 index 00000000..7e497f1e --- /dev/null +++ b/app/views/layouts/_header_crm.html.erb @@ -0,0 +1,16 @@ +
+
+
+ CRM +
+
+ Queue | Bookings | Online Orders | Customers +
+ +
+ <% 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_oqs.html.erb b/app/views/layouts/_header_oqs.html.erb index 257b6a0f..22c059c9 100644 --- a/app/views/layouts/_header_oqs.html.erb +++ b/app/views/layouts/_header_oqs.html.erb @@ -1,7 +1,7 @@
- ORDE QUEUE STATION + ORDER QUEUE STATION - <%= @station_name %>
<% if current_login_employee %> diff --git a/app/views/oqs/home/index.html.erb b/app/views/oqs/home/index.html.erb index 5a41bade..35815331 100644 --- a/app/views/oqs/home/index.html.erb +++ b/app/views/oqs/home/index.html.erb @@ -5,8 +5,10 @@