Mks::Edm::Engine.routes.draw do resources :equipment_locations, only: %i[index create update] resources :location_types, only: %i[index create update] resources :equipment_types, only: %i[index show create update] do member do get 'categories', controller: :equipment_categories, action: :index get 'nodes', controller: :equipment_categories, action: :nodes end end get '/equipment_types/nodes', controller: :equipment_types, action: :nodes resources :equipment_categories, only: %i[show create update] do member do get 'equipments', controller: :equipments, action: :index get 'nodes', controller: :equipments, action: :nodes end end resources :equipments, only: %i[show create update] do member do get 'items', controller: :equipment_items, action: :index get 'nodes', controller: :equipment_items, action: :nodes end end resources :equipment_items, only: %i[show create update] do member do get 'valuations', controller: :equipment_valuations, action: :index get 'valuation', controller: :equipment_valuations, action: :valuation get 'components', controller: :equipment_components, action: :index end end resources :equipment_valuations, only: %i[show create update] resources :equipment_components, except: %i[index] get '/filtered_equipments', controller: :equipments, action: :filter get '/filtered_items', controller: :equipment_items, action: :filter get '/service_providers', controller: :equipment_locations, action: :service_providers get '/stores', controller: :equipment_locations, action: :stores end