Files
eminuxCRM/config/routes.rb
T
eminuxandCursor 1f946f63ba
CI / scan_ruby (push) Failing after 18m40s
CI / scan_js (push) Successful in 11m46s
CI / lint (push) Failing after 13m8s
Aggiunge filtri avanzati per i destinatari delle campagne email.
La scelta della lista passa da un wizard a tre passi, con anteprima del conteggio e lista congelata solo dopo la conferma.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 21:00:11 +02:00

71 lines
2.1 KiB
Ruby

Rails.application.routes.draw do
get "up" => "rails/health#show", as: :rails_health_check
get "t/o/:token.gif", to: "mail_opens#show", as: :mail_open, constraints: { token: /[A-Za-z0-9_-]+/ }
get "login", to: "sessions#new"
post "login", to: "sessions#create"
delete "logout", to: "sessions#destroy"
resource :password, only: %i[edit update]
resources :password_resets, only: %i[new create], path: "password_reset" do
collection do
get ":token/edit", action: :edit, as: :edit
patch ":token", action: :update, as: :update
end
end
# Launcher: scegli il progetto (istanza CRM)
root "home#index"
get "impostazioni", to: "admin#show", as: :admin
# CRUD progetti anche fuori da un'istanza (bootstrap admin)
resources :projects, only: %i[create edit update destroy]
resources :users, except: %i[show]
resources :mail_identities, except: %i[show]
# Ogni progetto = istanza CRM dedicata
scope "/p/:project_code" do
get "/", to: "dashboard#show", as: :project_root
get "/today", to: "today#show", as: :today
get "/pipeline", to: "pipeline#show", as: :pipeline
get "/search", to: "search#show", as: :search
get "/reports", to: "reports#index", as: :reports
get "/settings", to: "settings#show", as: :settings
patch "/settings/goal(/:id)", to: "settings#update_goal", as: :update_goal_settings
resources :organizations do
resources :activities, only: %i[create edit update destroy]
end
resources :contacts
resources :opportunities do
member do
patch :update_stage
end
end
resources :tasks do
member do
patch :complete
end
end
resources :imports, only: %i[new create]
resources :mail_templates, except: %i[show]
resources :mail_images, only: %i[create]
resources :mailings do
collection do
get :dashboard
end
member do
post :queue
post :cancel
post :test_send
get :test_preview
post :refresh_recipients
patch :update_recipients
get :preview
get :audience
patch :audience, action: :update_audience
end
end
end
end