diff --git a/app/assets/javascripts/origami/addorders.coffee b/app/assets/javascripts/origami/addorders.coffee new file mode 100644 index 00000000..24f83d18 --- /dev/null +++ b/app/assets/javascripts/origami/addorders.coffee @@ -0,0 +1,3 @@ +# 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/origami.scss b/app/assets/stylesheets/origami.scss index 7935b50e..1f195ba5 100644 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -211,3 +211,4 @@ tr.discount-item-row:hover { margin-left:-40px !important; margin-top:-40px !important; } + diff --git a/app/assets/stylesheets/origami/addorders.scss b/app/assets/stylesheets/origami/addorders.scss new file mode 100644 index 00000000..f45d06f3 --- /dev/null +++ b/app/assets/stylesheets/origami/addorders.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the origami/addorders controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/origami/addorders_controller.rb b/app/controllers/origami/addorders_controller.rb new file mode 100644 index 00000000..68a15c71 --- /dev/null +++ b/app/controllers/origami/addorders_controller.rb @@ -0,0 +1,21 @@ +class Origami::AddordersController < BaseOrigamiController + before_action :set_dining, only: [:show] + + def index + @tables = Table.all.active.order('zone_id asc').group("zone_id") + @rooms = Room.all.active.order('zone_id asc').group("zone_id") + @all_table = Table.all.active.order('status desc') + @all_room = Room.all.active.order('status desc') + end + + def show + @menu = MenuCategory.all + end + + private + + def set_dining + @dining = DiningFacility.find(params[:id]) + end + +end diff --git a/app/helpers/origami/addorders_helper.rb b/app/helpers/origami/addorders_helper.rb new file mode 100644 index 00000000..c90e5344 --- /dev/null +++ b/app/helpers/origami/addorders_helper.rb @@ -0,0 +1,2 @@ +module Origami::AddordersHelper +end diff --git a/app/views/origami/addorders/index.html.erb b/app/views/origami/addorders/index.html.erb new file mode 100644 index 00000000..50e52d3e --- /dev/null +++ b/app/views/origami/addorders/index.html.erb @@ -0,0 +1,108 @@ +
<%= table.status %>
+<%= table.name %>
+Seat : <%= table.seater %>
+<%= room.status %>
+<%= room.name %>
+Seat : <%= room.seater %>
+