require 'sidekiq/web'

Rails.application.routes.draw do

scope "(:locale)", locale: /en|mm/ do

  root 'home#index'
  mount Sidekiq::Web => '/kiq'

  mount PdfjsViewer::Rails::Engine => "/pdfjs", as: 'pdfjs'

  # Action Cable Creation
  # if ENV["SERVER_MODE"] !=  "cloud"
    mount ActionCable.server => "/cable"
  # end


  #--------- SmartSales Activation ------------#
  get 'activate' => 'install#index'
  post 'activate' => 'install#activate'
  get 'run_sym' => 'sym_control#run'
  get 'get_key' => 'sym_control#get_key'

  #--------- Login/Authentication ------------#
  get 'auth/:emp_id' => 'home#show', as: :emp_login
  patch "auth/:emp_id" => 'home#update', as: :emp_login_update

  post 'login' => 'home#create'
  delete 'logout' => 'home#destroy'
  get 'dashboard' => 'home#dashboard'

  namespace :induties do
    # resources :assign_in_duties
    get ':booking_id/assign' => 'assign_in_duties#index', as: :assign_in_duties
    get "/assign_in_duties/get_all_occupied_dining/:id" =>'assign_in_duties#get_all_occupied_dining', as: :get_all_occupied_dining
    post ':booking_id/assign_create' => 'assign_in_duties#induties_create', as: :induties_create
    post ':booking_id/assign_checkout/:induty_id' => 'assign_in_duties#induties_checkout', as: :induties_checkout
    delete ':booking_id/assign_remove/:induty_id' => 'assign_in_duties#induties_remove', as: :induties_remove
    get ':booking_id/get_current_booking' => 'assign_in_duties#get_current_booking'

  end
  #--------- 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, :show]
      resources :menu_items, only: [:index, :show]
      resources :menu_item_attributes, only: [:index, :show]
      resources :menu_item_options, only: [:index]
      resources :menu_sold_out, only: [:index]
      resources :menu_item_instances, only: [:show]
      get "item_sets" => "item_sets#index"
    end
    namespace :payment do
        post 'mobilepayment/:cashier_id/:receipt_no/cash' =>"mobilepayment#cash"
    end
    #User request move table or bills
    post "bill/:booking_id" => "bill#create"
    post "move" => "move#create"


    #Order Controller
    resources :orders, only: [:create, :show, :update] do
      post "bill" => "bill#create"
    end
    get 'view_orders' => "orders#view_orders"
    post "update_order_item" => "orders#update"

    #Current active bookings
    resources :bookings, only: [:index, :show, :create, :update]
    resources :customers
    #get customer details by order items
    get "customers/get_order/:id" => "customers#get_customer_order"

    #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"
      resources :receipt, only: [:create, :show] #generate receipt, show receipt
    end

    namespace :origami do
      get "check_in/:dining_id" => "check_in_process#check_in_time"
      post "check_in" => "check_in_process#check_in_process"
      post "request_time" => "check_in_process#request_time"
      post "call_waiter" => "call_waiters#index"
      get "survey/:id" => "survey#index"
      post "survey/:id" => "survey#create"
      post "check_out" => "check_in_process#check_out_process"
    end

    #order and reservation api
    namespace :order_reserve do
      post "customer" => "order_reservation#check_customer"
      post "order" => "order_reservation#create"
      post "callback/:id" => "order_reservation#update_status"
      get "get_tax_profile" => "order_reservation#get_tax_profile"
    end

    post "sound_effect" => "sound_effect#sound_effect"

    #API for cashier app
    post 'authenticate_cashier' => "authenticate#create_cashier"
    post "shifts/new" => "shifts#create"
    post "shifts/close" => "shifts#update"
    post "request_bill" => "bill#request_bill"
    post "paymal_payment" => "payments#paymal_payment"
    get ":sale_id/void" => "void#overall_void"

    #API for sync cloud
    post 'sync_data' => 'sync#sync_data'
  end

  #--------- Cashier ------------#
  namespace :origami do
    root "home#index"

    post '/check_emp_access_code/:code' => 'home#check_emp_access_code', :defaults => { :format => 'json' }

    get "dashboard" => "dashboard#index"
    get "get_all_menu" => "dashboard#get_all_menu"

    get "quick_service" => "quick_service#index"

    get ":type/pending_order" => "pending_order#index"
    get ":type/pending_order/:sale_id" => "pending_order#show"
    get ":type/completed_sale/:sale_id" => "pending_order#completed_sale"

    get "quick_service/modify_order/:id/:sale_id" => "quick_service#modify_order"
    get "quick_service/modify_order/:sale_id" => "quick_service#modify_order"
    post 'quick_service/update_modify_order' => "quick_service#update_modify_order", :defaults => { :format => 'json' }

    get ":type/cash_ins" => "pending_order#cash_ins"
    get ":type/cash_outs" => "pending_order#cash_outs"

    #food court routes
    get "food_court" => "food_court#index"
    get "food_court/modify_order/:id/:sale_id" => "food_court#modify_order"
    get "food_court/modify_order/:sale_id" => "food_court#modify_order"
    post 'food_court/update_modify_order' => "food_court#update_modify_order", :defaults => { :format => 'json' }
    #food court routes

    resources :cash_ins, only: [:new, :create]
    resources :cash_outs, only: [:new, :create]

    get "table/:dining_id" => "home#show" do #origami/:booking_id will show
      # resources :discounts, only: [:index,:new, :create ] #add discount type
      resources :customers #add customer type
    end
    post 'moving' => "movetable#moving"
    get "/table/:table_id/sale/:sale_id/:type/edit" => "sale_edit#edit"
    get "/table/sale/:sale_id/:type/edit" => "sale_edit#edit"
    post 'item_void' => "sale_edit#item_void"
    post 'item_foc' => "sale_edit#item_foc"
    post 'item_edit' => "sale_edit#item_edit"
    post 'item_void_cancel' => "sale_edit#item_void_cancel"
    post 'cancel_all_void' => 'sale_edit#cancel_all_void'
    post 'apply_void' => 'sale_edit#apply_void'
    # in_duties
    get '/table/:sale_id/assign_in_duty' => 'in_duties#assign_in_duty', as: 'assign_in_duty'
    get 'assign_in_duty/:booking_id' => 'in_duties#index_in_duty', as: 'index_in_duty'
    post 'assign_in_duty/:booking_id' => 'in_duties#create_for_in_duty'

    get 'assign_in_duty/:id/edit' => 'in_duties#edit_in_duty' ,as: 'edit_in_duty'
    patch 'edit_in_duty/:id' => 'in_duties#update_for_in_duty', as: 'update_for_in_duty'
    delete 'table/:table_id/:booking_id/destroy_in_duty/:id' => 'in_duties#destroy_in_duty', as: 'destroy_in_duty'

    get 'table/:dining_id/movetable' => "movetable#move_dining"
    get 'table/:dining_id/moveroom' => "moveroom#move_dining"
    get 'sale/:sale_id' => 'sales#show'
    post 'sale/append_order' => 'sales#add_to_existing_invoice'
    get 'room/:room_id' => 'rooms#show'
    get 'order/:order_id' => "orders#show"

    # post '/:booking_id' => 'home#item_show'

    # Other Charges
    get "/:sale_id/:type/other_charges" => "other_charges#index"
    post "/:sale_id/other_charges" => "other_charges#create"

    # Discount
    get "/:id/:type/discount" => "discounts#index"
    post "/:id/discount" => "discounts#create"
    get "/:id/:type/remove_all_discount" => "discounts#remove_all_discount"
    post "/:id/remove_discount_items" => "discounts#remove_discount_items"

    # Discount for Member
    post "/:id/member_discount" => "discounts#member_discount"

    get "/:id/request_bills" => "request_bills#print", :as => "request_bill"
    get '/:sale_id/reprint' => 'payments#reprint', :defaults => {:format => 'json'}

    #---------Shift ---------------#
    resources :shifts, only: [:index, :new, :create, :edit]
    post 'close_shift' => 'shifts#update_shift'
    get 'shift/:type/close' => 'shifts#show'
    get 'shift/sale_summary' => 'shifts#sale_summary'
    #shift - index (open/close shift landing page)
    #shift - show (sales summary display)
    #shift - new (open shift)
    #shift - edit (close shift)

    resources :cash_mgmt, only: [:new, :create]
    #payment - accepting or expending money from cashier - [Cash Journal]
    #payment - Incoming payments - [accept all payment types (cash, other payments (except rebate))
    #payment - Outing payments - Cash only [ *Misc expeness tracking]

    #--------- Payment ------------#
    post 'sale/:sale_id/rounding_adj' => 'payments#rounding_adj', :as => "calculate_rouding_adjs"
    get 'sale/:sale_id/first_bill' => 'payments#first_bill', :defaults => {:format => 'json'}
    get 'sale/:sale_id/:type/payment' => 'payments#show'
    post 'sale/:sale_id/:type/payment/print' => 'payments#print' #route for print receipt

    post 'payment/:type/foc' => 'payments#foc', :defaults => {:format => 'json'}
    post 'payment/cash' => 'payments#create'
    # post 'payment/kbz_query/:sale_id' => 'payments#kbz_query', :defaults => {:format => 'json'}
    post 'payment/mpu' => "mpu#create"
    post 'payment/jcb' => "jcb#create"
    post 'payment/master' => "master#create"
    post 'payment/visa' => "visa#create"
    post 'payment/unionpay' => "unionpay#create"
    post 'payment/paypar' => 'paypar_payments#create'
    post 'payment/credit' => 'credit_payments#create'
    post 'payment/voucher' => 'voucher_payments#create'
    post 'payment/paymal' => 'paymal#create'
    post 'payment/alipay' => 'alipay#create'
    post 'payment/junctionpay' => 'junction_pay#create'
    post 'payment/dinga' => 'dinga#create'
    post 'payment/gift_voucher' => 'gift_voucher#create'
    post 'payment/credit_payment' => 'credit_payments#create_credit_payment'

    post 'payment/:type/change_tax' => 'payments#change_tax', :defaults => {:format => 'json'}

    get 'sale/:sale_id/:type/payment/credit_payment' => "credit_payments#index"
    get 'sale/:sale_id/:type/payment/others_payment' => "others_payments#index"
    get 'sale/:sale_id/:type/payment/others_payment/MPU' => "mpu#index"
    get 'sale/:sale_id/:type/payment/others_payment/VISA' => "visa#index"
    get 'sale/:sale_id/:type/payment/others_payment/Master' => "master#index"
    get 'sale/:sale_id/:type/payment/others_payment/JCB' => "jcb#index"
    get 'sale/:sale_id/:type/payment/others_payment/PAYMAL' => "paymal#index"
    get 'sale/:sale_id/:type/payment/others_payment/UNIONPAY' => "unionpay#index"
    get 'sale/:sale_id/:type/payment/others_payment/Redeem' => "redeem_payments#index"
    get 'sale/:sale_id/:type/payment/others_payment/Voucher' => "voucher#index"
    get 'sale/:sale_id/:type/payment/others_payment/JunctionPay' => "junction_pay#index"
    get 'sale/:sale_id/:type/payment/others_payment/Alipay' => "alipay#index"
    get 'sale/:sale_id/:type/payment/others_payment/DINGA' => "dinga#index"
    get 'sale/:sale_id/:type/payment/others_payment/GiftVoucher' => "gift_voucher#index"

    #---------Void --------------#
    post 'sale/:sale_id/:type/void' => 'void#overall_void'

    post 'sale/:sale_id/:type/waste_and_spoilage' => "waste_spoile#waste_and_spoilage"

    #---------Multiple Invoices --------------#
    get 'table/:table_id/table_invoices' => "table_invoices#index", :as => "table_invoice_index"
    get 'table/:table_id/table_invoice/:invoice_id' => "table_invoices#show", :as => "table_invoice_show"
    get 'room/:room_id/room_invoices' => "room_invoices#index", :as => "room_invoice_index"
    get 'room/:room_id/room_invoice/:invoice_id' => "room_invoices#show", :as => "room_invoice_show"

    #---------Add Customer --------------#
    #resources :customers
    get '/:sale_id/:type/customers/:dir_page', to: "customers#add_customer"
    get '/:customer_id/get_customer' => 'home#get_customer', :as => "show_customer_details"
    post '/:sale_id/:type/customers/update_sale', to: "customers#update_sale_by_customer" # update customer id in sale table

    post '/:sale_id/get_customer' => "customers#get_customer"
    post '/:sale_id/send_account' => "customers#send_account"

    get '/:id/:type/surveys', to: "surveys#new"
    match '/:id/create_survey', to: "surveys#create", as: "create_surveys", via: [:post, :patch, :put]

    get '/addorders/get_menu/:id' => "addorders#get_menu",:as => "get_menu", :defaults => { :format => 'json' }
    get '/addorders/get_menu_category/:id' => "addorders#get_menu_category",:as => "get_menu_category", :defaults => { :format => 'json' }
    get '/addorders/get_menu_sub_category/:id' => "addorders#get_menu_sub_category",:as => "get_menu_sub_category", :defaults => { :format => 'json' }
    get '/addorders/products/list' => "addorders#get_all_product",:as => "get_all_product", :defaults => { :format => 'json' }

    get '/:addorders/:id' => "addorders#detail"
    post '/:addorders/create' => "addorders#create",:as => "addorder_create", :defaults => { :format => 'json' }


    get '/addorders/get_item_instance/:id' => "addorders#get_item_instance",:as => "get_item_instance", :defaults => { :format => 'json' }

    resources :commissions
    resources :commissioners

    # resources :addorders
    resources :in_duties

    # product_commission
    get 'table/:table_id/sale/:sale_id/load_commissioners' => 'product_commissions#load_commissioners', as: 'load_commissioners'
    post 'select_sale_item' => 'product_commissions#select_sale_item', as: 'select_sale_item'
    post 'select_commissioner' => 'product_commissions#set_commissioner_to_sale_item', as: 'select_commissioner'

    #check_in
    post '/check_in' => "check_in_process#check_in_process"

    #CB ECR Trans
    post "bank_integration/settle_trans", to: "bank_integration#settle_trans", as:"settle_trans"
    post "bank_integration/sale_trans", to: "bank_integration#sale_trans", as:"sale_trans"

    #split bill
    get '/table/:dining_id/:type/split_bills' => 'split_bill#index'
    get '/room/:dining_id/:type/split_bills' => 'split_bill#index'
    post '/split_bills', to: 'split_bill#create', as:"order_item_split_bills"

    post '/split_bills/equal_person', to: 'split_bill#update_sale'

    resources :second_display #second display routes

    post '/customer_view' => "second_display#customer_view",:as => "customer_view", :defaults => { :format => 'json' }

    #order and reservation
    resources :order_reservation
    get 'order_reservation/get_order/:id' => "order_reservation#get_order",:as => "get_order", :defaults => { :format => 'json' }
    post 'order_reservation/update', to: "order_reservation#update" , :defaults => { :format => 'json' }
    post 'order_reservation/send_status', to: "order_reservation#send_status", :defaults => { :format => 'json' }
    get 'get_order_info', to: "order_reservation#get_order_info", :as => "get_order_info", :defaults => { :format => 'json' }

    #credit payment routes
    post '/:type/credit_sales' => "dashboard#get_credit_sales", :as => "get_credit_sales", :defaults => { :format => 'json' }
    get '/cashier/credit_sales/:sale_id' => "credit_sales#show"
    get '/quick_service/credit_sales/:sale_id' => "pending_order#credit_sale"
    get 'sale/:sale_id/:type/credit_payment' => "payments#show"

    post 'credit_payment/cash' => 'payments#create'
    post 'credit_payment/mpu' => "mpu#create"
    post 'credit_payment/jcb' => "jcb#create"
    post 'credit_payment/master' => "master#create"
    post 'credit_payment/visa' => "visa#create"
    post 'credit_payment/unionpay' => "unionpay#create"
    # post 'credit_payment/paypar' => 'paypar_payments#create'
    # post 'credit_payment/voucher' => 'voucher_payments#create'
    # post 'credit_payment/paymal' => 'paymal#create'
    post 'credit_payment/alipay' => 'alipay#create'
    # post 'credit_payment/junctionpay' => 'junction_pay#create'
    # post 'credit_payment/dinga' => 'dinga#create'
    # post 'credit_payment/gift_voucher' => 'gift_voucher#create'

    get 'sale/:sale_id/:type/credit_payment/others_payment' => "others_payments#index"
    get 'sale/:sale_id/:type/credit_payment/others_payment/MPU' => "mpu#index"
    get 'sale/:sale_id/:type/credit_payment/others_payment/VISA' => "visa#index"
    get 'sale/:sale_id/:type/credit_payment/others_payment/Master' => "master#index"
    get 'sale/:sale_id/:type/credit_payment/others_payment/JCB' => "jcb#index"
    # get 'sale/:sale_id/:type/credit_payment/others_payment/PAYMAL' => "paymal#index"
    get 'sale/:sale_id/:type/credit_payment/others_payment/UNIONPAY' => "unionpay#index"
    # get 'sale/:sale_id/:type/credit_payment/others_payment/Redeem' => "redeem_payments#index"
    # get 'sale/:sale_id/:type/credit_payment/others_payment/Voucher' => "voucher#index"
    # get 'sale/:sale_id/:type/credit_payment/others_payment/JunctionPay' => "junction_pay#index"
    get 'sale/:sale_id/:type/credit_payment/others_payment/Alipay' => "alipay#index"
    # get 'sale/:sale_id/:type/credit_payment/others_payment/DINGA' => "dinga#index"
    # get 'sale/:sale_id/:type/credit_payment/others_payment/GiftVoucher' => "gift_voucher#index"

    #------------- Start Reservation -------------------#
    resources :reservation
    #------------- End Reservation -------------------#
  end

  #--------- Waiter/Ordering Station ------------#
  namespace :oishi do
    #zones
    #tables
    #orders
  end

  #--------- Customer Relationship Management ------------#
  namespace :crm do
    root "home#index"
    resources :customers
    get "/customers/:id/sync" => "customers#sync", as:"customer_sync"
    get "/customers/:id/customer_update_phone_email_member_type" => "customers#customer_update_phone_email_member_type", as:"customer_update_phone_email_member_type"
    resources :dining_queues
    post "update_booking", to: "bookings#update_booking", as: "update_booking" #assign and cancel
    get '/print/:id', to: "home#print_order" #print order for crm

    get "/dining_queues/:id/assign" => "dining_queues#assign", :as => "assign"
    post "/dining_queues/assign_table" => "dining_queues#assign_table", :as => "assign_table"
    post "/dining_queues/cancel_queue" => "dining_queues#cancel_queue", :as => "cancel_queue"

  end

  #--------- Order Queue Station ------------#
  namespace :oqs do
    root "home#index"
    get "/:order_no", to: "home#get_order_items"

    post 'update_delivery', to: "home#update_delivery_status"

    # qty update
    get "/:id/edit/:type", to: "edit#index"
    post "/:id", to: "edit#update"

    # Pass assigned_order_item_id
    get 'print/print/:id', to: "print#print"
    get 'print/print_order_summary/:id', to: "print#print_order_summary"

    get "/get_items/:id" => "home#get_items_by_oqs", :as => "get_order_items_by_oqs"
    #dashboard
    #
  end

  #--------- System Settings ------------#
  namespace :settings do
    resources :shops do
      resources :display_images
    end
    #employees
    resources :employees
    #menu
    resources :menus do
      collection do
        post :import
      end
      resources :menu_categories, only: [:new, :create, :edit, :delete]
    end

    get '/menus/:id/export' => 'menus#export'

    resources :item_sets

    resources :menu_item_sets

    #accounts
    resources :accounts

    resources :menu_categories do
      #menu_items
      # resources :menu_items
      resources :simple_menu_items
      resources :set_menu_items
    end

    resources :simple_menu_items do
      resources :menu_item_instances
    end
    resources :set_menu_items do
      resources :menu_item_instances
    end
    #menu_item_attributes
    resources :menu_item_attributes
    #menu_item_options
    resources :menu_item_options
    #tax_profiles
    resources :tax_profiles
    #products
    resources :products
    #lookups
    resources :lookups
    #cashier_terminals
    resources :cashier_terminals
    #order_job_stations

    #order_queue_stations
    resources :order_queue_stations do
      resources :processing_items, :only => [:new, :create]
    end
    #payment method settings
    resources :payment_method_settings
    #membership_settings
    resources :membership_settings
    resources :membership_actions

    #zones
    resources :zones do
      #tables
      resources :tables do
        resources :dining_charges
      end
      #rooms
      resources :rooms do
        resources :dining_charges
      end
    end

    #promotion
    resources :promotions do
      resources :promotion_products
    end
    get '/find_item_instance' => 'promotions#find_item_instance', as:'find_item_instance'
    get '/find_parent_item' => 'promotions#find_parent_item', as:'find_parent_item'

    # commission
     #commissions
    resources :commissions do
      resources :assign_products, :only => [:new, :create]
    end
    resources :commissioners

    get '/get_transactions_by_commissioner' => 'commissioners#get_transaction_by_commissioner', as:'get_transaction_by_commissioner'

    # get 'menu_item_instances/get_instance/:id' => 'menu_item_instances#get_instance',:as => "show_instance"
  end

  #--------- Transactions Sections ------------#
  namespace :transactions do
    resources :sales
    resources :orders
    resources :credit_notes
    resources :bookings
    resources :shift_sales
    resources :surveys
    resources :order_reservations
    resources :card_sale_trans
    resources :card_settle_trans

    get "/sales/:sale_id/manual_complete_sale" => "manual_sales#manual_complete_sale", :as => "manual_complete_sale"
    get "/sales/:sale_id/void" => "manual_sales#void", :as => "void"
    post "sales/:sale_id/manual_void_sale", to: "manual_sales#manual_void_sale", :as => "manual_void_sale"
    post "sales/:sale_id/:type/void" => "sales#overall_void"
    get "/bookings/update_status/:booking_id" => "bookings#update_status", :default => { :format => 'json' }
  end

  #--------- Reports Controller Sections ------------#
  namespace :reports do
    resources :receipt_no
    resources :receipt_no_detail
    resources :dailysale, :only => [:index, :show]
    resources :saleitem, :only => [:index, :show]
    resources :hourly_saleitem, :only => [:index, :show]
    resources :shiftsale, :only => [:index, :show]
    resources :credit_payment, :only => [:index, :show]
    resources :void_sale, :only => [:index, :show]
    resources :waste_and_spoilage, :only => [:index, :show]
    resources :commission, :only => [:index, :show]
    resources :stock_check, :only => [:index, :show]
    resources :payment_method
    resources :product_sale, :only => [:index, :show]
    resources :order_reservation, :only => [:index, :show]
    resources :induty, :only => [:index, :show]
    resources :card_sale_tran
    resources :card_settle_tran

    get "saleitem/get_shift_by_date", to: "saleitem#show", as: "get_shift_by_sale_item"
    get "hourly_saleitem/get_shift_by_date", to: "hourly_saleitem#show", as: "get_shift_by_hourly_saleitem"
    get "receipt_no/get_shift_by_date", to: "receipt_no#get_shift_by_date", as: "get_shift_by_date"
    get "order_reservation/get_shift_by_date", to: "order_reservation#show", as: "get_shift_by_order_reservation"
    get "induty/get_shift_by_date", to: "induty#show", as: "get_shift_by_induty"
    get "shiftsale_print/:id" , to: "shiftsale#print_close_receipt", as: "get_shift_id"
    post "print_sale_items", to: "saleitem#print_sale_items", as: "print_sale_items"
    get "sync_data", to:'receipt_no#sync_data', as:'sync_data'
  end

  # ----------- Inventory ---------------------------

  namespace :inventory do
    get '/' => 'inventory#index'
    get '/stock_checks' => 'stock_checks#index'
    post 'save_stock' => 'stock_checks#create', as:'stock_check_save'
    get '/stock_checks/:id' => 'stock_checks#show'
    post 'save_to_journal' => 'stock_checks#save_to_journal', as: 'save_to_journal'
    post 'print_stock_check' => 'stock_checks#print_stock_check', as: 'print_stock_check'
    # resources :stock_checks
    resources :stock_journals
    resources :inventory_definitions
    get ':inventory_definition_id/show' => 'inventory#show'

    get 'get_menu_category/:id' => "stock_checks#get_menu_category",:as => "get_menu_category", :defaults => { :format => 'json' }

    post 'inventory_definitions/create_inventory' => 'inventory_definitions#create_inventory'
  end
  #mount_compendium at: '/report' #, controller: 'reports'

  #--------- Reports ------------#
  # namespace :reports do
  #   #dashboard
  #   #sales
  #   #orders
  #   #shifts
  #   resources :shifts do
  #     resources :orders
  #     resources :sales
  #   end
  # end

  #----------- Print Setup --------#
  resources :print_settings
  delete '/:id/print_settings' => 'print_settings#destroy'

  get '/get_printer_options/:printer_name' => 'print_settings#get_printer_options'

  resources :commissioners

  post '/run_teamviewer' => 'home#run_teamviewer', :defaults => { :format => 'json' }
  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
end
