Files
sx-fc/config/routes.rb
2017-04-15 12:52:40 +06:30

107 lines
2.4 KiB
Ruby

Rails.application.routes.draw do
root 'home#index'
#--------- SmartSales Installation ------------#
get 'install' => 'install#index'
post 'install' => 'install#create'
#--------- Login/Authentication ------------#
post 'login' => 'home#create'
delete 'logout' => 'home#destroy'
#--------- API Routes ------------#
namespace :api, :defaults => { :format => 'json' } do
#Session Login and Logout
post 'authenticate' => "authenticate#create"
delete 'authenticate' => "authenticate#destroy"
namespace :restaurant do
get 'zones' => "zones#index"
get "menu" => "menu#index"
get "menu/:id" => "menu#show"
resources :menu_categories, only: [:index]
resources :menu_items, only: [:index, :show]
resources :menu_items_attributes, only: [:index]
resources :menu_sold_out, only: [:index]
end
#User request move table or bills
post "bill/:booking_id" => "bill#create"
post "move" => "move#update"
#Order Controller
resources :orders, only: [:create, :show, :update] do
post "bill/:orer_id" => "bill#create"
end
#Current active bookings
resources :bookings, only: [:index, :create, :update]
resources :customers, only: [:index, :show, :create, :update]
#Generating Invoice and making payments
resources :invoices, only: [:create, :show, :update ] do
resources :payments, only: [:create, :update]
end
end
#--------- Cashier ------------#
namespace :cashier do
#bookings
#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