require 'sidekiq/web' Rails.application.routes.draw do root 'home#index' mount Sidekiq::Web => '/kiq' #--------- 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" resources :menu, only:[:index, :show] resources :menu_categories, only: [:index] resources :menu_items, only: [:index, :show] resources :menu_item_attributes, only: [:index] resources :menu_item_options, only: [:index] resources :menu_sold_out, only: [:index] end #User request move table or bills post "bill" => "bill#create" post "move" => "move#create" #Order Controller resources :orders, only: [:create, :show, :update] do post "bill" => "bill#create" end #Current active bookings resources :bookings, only: [:index, :create, :update] resources :customers, only: [:index, :show, :create, :update] #Generating Invoice and making payments - output render @sale resources :invoices, only: [:index, :show, :create, :update, :destroy ] do resources :sale_items, only:[:create, :update, :destroy] resources :discounts, only: [:create, :update, :destroy] resources :memberships, only:[:create] post "payment/:payment_method" => "payment#create" put "payment/:id" => "payment#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