more controller for cashier/waiter view

This commit is contained in:
Min Zeya Phyo
2017-05-10 01:10:21 +06:30
parent 62e8615f12
commit c1c72eca30
25 changed files with 634 additions and 44 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -14,4 +14,4 @@
//= require bootstrap
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require cable

View File

@@ -14,4 +14,4 @@
//= require bootstrap
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require cable

View File

@@ -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/

View File

@@ -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/

View File

@@ -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/

View File

@@ -14,4 +14,4 @@
//= require bootstrap
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require cable

View File

@@ -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/

View File

@@ -7,3 +7,10 @@
// min-height: 75rem;
// padding-top: 4.5rem;
// }
.order-completed {
background-color: #CCFFDD;
}
.order-void {
background-color: #FFCCDD;
}

View File

@@ -0,0 +1,6 @@
class Crm::HomeController < BaseCrmController
def index
end
def show
end
end

View File

@@ -0,0 +1,7 @@
class Origami::CustomersController < BaseOrigamiController
#Form to add customer -
def index
end
def create
end
end

View File

@@ -0,0 +1,6 @@
class Origami::DiscountsController < BaseOrigamiController
def index
end
def create
end
end

View File

@@ -0,0 +1,6 @@
class Origami::PaymentsController < BaseOrigamiController
def index
end
def create
end
end

View File

@@ -0,0 +1,5 @@
class MenuReport < Compendium::Report
query :list, collect: :active_record do |params|
Menu.all
end
end

View File

@@ -0,0 +1,370 @@
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<!-- Column One -->
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#completed" role="tab">Queue <span class="badge badge-pill badge-default">2000</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#tables" role="tab">Bookings <span class="badge badge-pill badge-default">18</span></a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#rooms" role="tab">Customers</a>
</li>
</ul>
<!-- Nav tabs - End -->
<div class="tab-content" style="min-height:670px; max-height:670px; overflow-y:scroll">
<!--- Panel 0 - Completed -->
<div class="tab-pane" id="completed" role="tabpanel" style="min-height:670px; max-height:670px; overflow-y:scroll">
<div class="card-columns" style="padding-top:10px">
<div class="card">
<div class="card-block order-completed">
<h4 class="card-title">9. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text">
<small class="text-muted">Order at 12:23, Kyaw Lwin</small> |
<small class="text-muted">Printed at 12:23</small> |
<small class="text-muted">Completed at 12:43</small>
</p>
</div>
</div>
<div class="card">
<div class="card-block order-void">
<h4 class="card-title">9. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">9. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
</div>
</div>
<!-- Panel 1 - Tables -->
<div class="tab-pane active" id="tables" role="tabpanel">
<!--- Booking Items -->
<div class="card-columns" style="padding-top:10px">
<div class="card">
<div class="card-block">
<h4 class="card-title">1. Table 4 - Beef Steak [x1]</h4>
<p class="card-text">Medium, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">2. Table 4 - Beef Steak [x1]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">3. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">4. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">5. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">6. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">7. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">8. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">9. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">10. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">11. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">12. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">13. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">14. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">15. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">16. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">17. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">18. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">19. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<!--- end of Items-->
</div>
</div>
<!-- Panel 1 - Tables - End -->
<!-- Panel 2 - Rooms -->
<div class="tab-pane" id="rooms" role="tabpanel" style="min-height:670px; max-height:670px; overflow-y:scroll">
<!--- Booking Items -->
<div class="card-columns" style="padding-top:10px">
<div class="card">
<div class="card-block">
<h4 class="card-title">Card title that wraps to a new line</h4>
<p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
</div>
</div>
<div class="card p-3">
<blockquote class="card-block card-blockquote">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<footer>
<small class="text-muted">
Someone famous in <cite title="Source Title">Source Title</cite>
</small>
</footer>
</blockquote>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">Card title</h4>
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
<div class="card card-inverse card-primary p-3 text-center">
<blockquote class="card-blockquote">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat.</p>
<footer>
<small>
Someone famous in <cite title="Source Title">Source Title</cite>
</small>
</footer>
</blockquote>
</div>
<div class="card text-center">
<div class="card-block">
<h4 class="card-title">Card title</h4>
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
</div>
<!-- Panel 2 - Rooms - End -->
<!-- Panel 3 - Orders -->
<div class="tab-pane" id="orders" role="tabpanel" style="min-height:670px; max-height:670px; overflow-y:scroll">
<!--- Booking Items -->
<div class="card-columns" style="padding-top:10px">
<div class="card">
<div class="card-block">
<h4 class="card-title">Card title that wraps to a new line</h4>
<p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">Card title</h4>
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
<div class="card text-center">
<div class="card-block">
<h4 class="card-title">Card title</h4>
<p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
</div>
</div>
</div>
</div>
<!-- Panel 3 - Orders - End -->
</div>
</div>
<!-- Column Two -->
<div class="col-lg-5 col-md-5 col-sm-5">
<div class="card" >
<div class="card-header">
<div id="order-title"><strong>ORDER DETAILS</strong> - Table 4</div>
</div>
<div class="card-block">
<div class="card-title">
<table class="table">
<thead>
<tr>
<th style="width:33%; text-align:left">Order By</th>
<th style="width:33%; text-align:right">Order At</td>
<th style="width:33%; text-align:right">Customer</td>
</tr>
</thead>
<tbody>
<tr>
<td style="width:33%; text-align:left">Kyaw Lwin</td>
<td style="width:33%; text-align:right">20/04/17 9:30PM</td>
<td style="width:33%; text-align:right">John Smith</td>
</tr>
<tr>
<td><strong>Table/Room</strong></td>
<td colspan="2">Table 4</td>
</tr>
</tbody>
</table>
<table class="table">
<thead>
<tr>
<th style="width:80%; text-align:left">Items</th>
<th style="width:20%; text-align:right">QTY</td>
</tr>
</thead>
</table>
</div>
<div class="card-text" style="min-height:400px; max-height:400px; overflow-x:scroll">
<table class="table">
<tbody>
<tr>
<td style="width:80%; text-align:left">
Menu Items Name <br/>
Less Sweet, No MSG
</td>
<td style="width:20%; text-align:right">
5
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Column Three--->
<div class="col-lg-1 col-md-1 col-sm-1">
<!-- OQS Buttons -->
<button type="button" class="btn btn-primary btn-lg btn-block" disabled>Print</button>
<button type="button" class="btn btn-primary btn-lg btn-block" disabled>Print <br/>Order<br/>Summary</button>
</div>
</div>

View File

@@ -14,7 +14,7 @@
</head>
<body>
<%= render 'layouts/header' %>
<%= render 'layouts/header_crm' %>
<div class="container-fluid">
<% flash.each do |type, message| %>
<div class="alert fade in">

View File

@@ -0,0 +1,16 @@
<div class="container-fluid" style="min-height:30px; padding-left:0px !important; padding-right:0px !important; background:#2F3D47; margin-bottom:5px">
<div style="padding-top:5px;padding-bottom:5px;margin-left:15px; margin-right:15px;color:#ffffff ">
<div style="float:left;margin-top:3px;text-align:left; width:100px">
<strong>CRM</strong>
</div>
<div style="float:left;margin-top:3px;text-align:left; width:600px">
Queue | Bookings | Online Orders | Customers
</div>
<div style="float:right; margin-top:3px; text-align:right;width:200px;color:#ffffff">
<% if current_login_employee %>
<%= current_login_employee.name %> | <%= link_to 'Logout', logout_path, method: :delete, data: { confirm: 'Are you sure?' } %>
<% end %>
</div>
</div>
</div>

View File

@@ -1,7 +1,7 @@
<div class="container-fluid" style="min-height:30px; padding-left:0px !important; padding-right:0px !important; background:#2F3D47; margin-bottom:5px">
<div style="padding-top:5px;padding-bottom:5px;margin-left:15px; margin-right:15px;color:#ffffff ">
<div style="float:left;margin-top:3px;text-align:left; width:200px">
<strong>ORDE QUEUE STATION</strong>
<strong>ORDER QUEUE STATION - <%= @station_name %></strong>
</div>
<div style="float:right; margin-top:3px; text-align:right;width:200px;color:#ffffff">
<% if current_login_employee %>

View File

@@ -5,8 +5,10 @@
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#tables" role="tab">Queue 1 <span class="badge badge-pill badge-default">18</span>
</a>
<a class="nav-link" data-toggle="tab" href="#completed" role="tab">Processed <span class="badge badge-pill badge-default">2000</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#tables" role="tab">Queue 1 <span class="badge badge-pill badge-default">18</span></a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#rooms" role="tab">Queue 2</a>
@@ -18,6 +20,39 @@
<!-- Nav tabs - End -->
<div class="tab-content" style="min-height:670px; max-height:670px; overflow-y:scroll">
<!--- Panel 0 - Completed -->
<div class="tab-pane" id="completed" role="tabpanel" style="min-height:670px; max-height:670px; overflow-y:scroll">
<div class="card-columns" style="padding-top:10px">
<div class="card">
<div class="card-block order-completed">
<h4 class="card-title">9. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text">
<small class="text-muted">Order at 12:23, Kyaw Lwin</small> |
<small class="text-muted">Printed at 12:23</small> |
<small class="text-muted">Completed at 12:43</small>
</p>
</div>
</div>
<div class="card">
<div class="card-block order-void">
<h4 class="card-title">9. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
<div class="card">
<div class="card-block">
<h4 class="card-title">9. Table 4 - Beef Steak [x3]</h4>
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
</div>
</div>
</div>
<!-- Panel 1 - Tables -->
<div class="tab-pane active" id="tables" role="tabpanel">
<!--- Booking Items -->
@@ -28,6 +63,9 @@
<p class="card-text">Medium, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
@@ -35,6 +73,9 @@
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
@@ -42,6 +83,9 @@
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
@@ -49,6 +93,9 @@
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
@@ -56,6 +103,9 @@
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
@@ -63,6 +113,9 @@
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
@@ -70,6 +123,9 @@
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
@@ -77,6 +133,9 @@
<p class="card-text">Well Done, Fries, Salad</p>
<p class="card-text"><small class="text-muted">Order at 12:23, Kyaw Lwin</small></p>
</div>
<div class="card-footer">
<button id="#id" class="btn btn-primary btn-lg btn-block">COMPLETE</button>
</div>
</div>
<div class="card">
<div class="card-block">
@@ -307,9 +366,6 @@
<!-- Column Three--->
<div class="col-lg-1 col-md-1 col-sm-1">
<!-- OQS Buttons -->
<button type="button" class="btn btn-primary btn-lg btn-block" disabled>DONE</button>
<br/><br/><br/><br/>
<button type="button" class="btn btn-primary btn-lg btn-block" disabled>Print</button>
<button type="button" class="btn btn-primary btn-lg btn-block" disabled>Print <br/>Order<br/>Summary</button>

View File

@@ -18,10 +18,10 @@ chdir APP_ROOT do
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml'
# end
puts "\n== Copying sample files =="
unless File.exist?('config/database.yml')
cp 'config/database.yml.sample', 'config/database.yml'
end
puts "\n== Preparing database =="
system! 'bin/rails db:setup'

View File

@@ -0,0 +1,83 @@
# ## 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
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'] %>
#
production:
<<: *default
database: SXRestaurants_production
username: SXRestaurants
password: <%= ENV['SXRESTAURANTS_DATABASE_PASSWORD'] %>

View File

@@ -61,15 +61,16 @@ Rails.application.routes.draw do
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
resources :payments, only: [:index, :create ] #add payment by payment_method
resources :discounts, only: [:index, :create ] #add discount type
resources :customers, only: [:index, :create ] #add customer type
end
end
#--------- Waiter ------------#
namespace :waiter do
#--------- Waiter/Ordering Station ------------#
namespace :oishi do
#zones
#tables
#orders
@@ -77,6 +78,7 @@ Rails.application.routes.draw do
#--------- Customer Relationship Management ------------#
namespace :crm do
root "home#index" #queue number
#customers
resources :customers
#membership
@@ -104,6 +106,8 @@ Rails.application.routes.draw do
resources :menu_categories do
#menu_items
resources :menu_items
resources :simple_menu_items
resources :set_menu_items
end
resources :menu_items do
@@ -135,17 +139,19 @@ Rails.application.routes.draw do
end
#mount_compendium at: '/report' #, controller: 'reports'
#--------- Reports ------------#
namespace :reports do
#dashboard
#sales
#orders
#shifts
resources :shifts do
resources :orders
resources :sales
end
end
# namespace :reports do
# #dashboard
# #sales
# #orders
# #shifts
# resources :shifts do
# resources :orders
# resources :sales
# end
# end

View File

@@ -0,0 +1,6 @@
class OrderItemsCompletedBy < ActiveRecord::Migration[5.0]
def change
add_column :order_items, :completed_by, :string
add_column :order_items, :completed_at, :datetime
end
end

View File

@@ -4,22 +4,18 @@
"item_instance_code"=>"II0021",
"quantity"=>1,
"options"=>[]},
{"order_item_id"=>2,
"item_instance_code"=>"II0042",
"quantity"=>1, "parent_order_item_id"=>1,
"options"=>[]},
{"order_item_id"=>3,
"item_instance_code"=>"II0053",
"quantity"=>1,
"parent_order_item_id"=>1,
"options"=>["mild spicy"]},
{"order_item_id"=>4,
"item_instance_code"=>"II0031",
"quantity"=>1, "options"=>[]},
{"order_item_id"=>5,
"item_instance_code"=>"II0073",
"quantity"=>1, "parent_order_item_id"=>4, "options"=>[]}]