99 lines
2.2 KiB
Ruby
99 lines
2.2 KiB
Ruby
Rails.application.routes.draw do
|
|
root 'home#index'
|
|
|
|
#--------- SmartSales Installation ------------#
|
|
get 'install' => 'install#index'
|
|
post 'install' => 'install#create'
|
|
|
|
#--------- Login/Authentication ------------#
|
|
post 'authenticate' => 'home#create'
|
|
delete 'authenticate' => 'home/destroy'
|
|
|
|
|
|
#--------- API Routes ------------#
|
|
namespace :api, :defaults => { :format => 'json' } do
|
|
#Session Login and Logout
|
|
post 'authenticate' => "autheticate#create"
|
|
delete 'authenticate' => "autheticate#destroy"
|
|
|
|
namespace :restaurant do
|
|
get 'zones' => "zones#index"
|
|
get 'tables' => "#index"
|
|
#Menu Related api
|
|
resources :menu, only: [:index, :show] do
|
|
resources :menu_categories, only: [:index]
|
|
resources :menu_items, only: [:index, :show]
|
|
resources :menu_sold_out, only: [:index]
|
|
end
|
|
end
|
|
|
|
#Order Controller
|
|
resources :orders, only: [:create, :show, :update]
|
|
#Current active bookings
|
|
resources :bookings, only: [:index, :create, :update]
|
|
resources :customers, only: [:index, :show, :create]
|
|
#Generating Invoice and making payments
|
|
resources :invoices, only: [:create, :show, :update :show ] do
|
|
resources :payments, only: [:create]
|
|
end
|
|
end
|
|
|
|
#--------- Cashier ------------#
|
|
namespace :cashier do
|
|
#orders
|
|
#invoices
|
|
#payment
|
|
#receipt
|
|
end
|
|
|
|
#--------- Waiter ------------#
|
|
namespace :waiter do
|
|
#zones
|
|
#tables
|
|
#orders
|
|
end
|
|
|
|
#--------- Customer Relationship Management ------------#
|
|
namespace :crm do
|
|
#customers
|
|
#membership
|
|
#bookings
|
|
#queue
|
|
end
|
|
|
|
#--------- Order Queue Station ------------#
|
|
namespace :oqs do
|
|
#dashboard
|
|
#
|
|
end
|
|
|
|
#--------- System Settings ------------#
|
|
namespace :settings do
|
|
#employees
|
|
resources :employees
|
|
#menu
|
|
#menu_categories
|
|
#menu_items
|
|
#payment_settings
|
|
#tax_profiles
|
|
#lookups
|
|
#cashier_terminals
|
|
#order_job_stations
|
|
#zones
|
|
#tables
|
|
#rooms
|
|
end
|
|
|
|
#--------- Reports ------------#
|
|
namespace :reports do
|
|
#dashboard
|
|
#sales
|
|
#orders
|
|
#shifts
|
|
end
|
|
|
|
|
|
|
|
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
|
end
|