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

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