- <%= f.submit mail_identity.new_record? ? "Crea account" : "Salva", class: btn_primary %>
- <%= link_to "Annulla", mail_identities_path, class: btn_secondary %>
+
+ <%= f.submit mail_identity.new_record? ? "Crea account" : "Salva", class: "#{btn_primary} w-full sm:w-auto" %>
+ <%= link_to "Annulla", mail_identities_path, class: "#{btn_secondary} w-full sm:w-auto" %>
<% end %>
diff --git a/app/views/mailings/_form.html.erb b/app/views/mailings/_form.html.erb
index 5d3d4dd..5cbb9b1 100644
--- a/app/views/mailings/_form.html.erb
+++ b/app/views/mailings/_form.html.erb
@@ -1,5 +1,5 @@
<%= form_with model: mailing, class: "grid gap-6 lg:grid-cols-[1fr_16rem]", html: { multipart: true } do |f| %>
-
+
<%= render "shared/errors", object: mailing %>
<% if @mail_identities.blank? %>
@@ -33,8 +33,8 @@
-
- <%= f.check_box :send_window_enabled, { data: { send_window_target: "checkbox", action: "send-window#toggle" } } %>
+
+ <%= f.check_box :send_window_enabled, { class: "mt-0.5 size-5", data: { send_window_target: "checkbox", action: "send-window#toggle" } } %>
Invia solo in fascia oraria
Le email partono solo nei giorni lavorativi (lun–ven, esclusi i festivi italiani). Se la fascia finisce, l’invio riprende dal giorno lavorativo successivo.
@@ -53,8 +53,8 @@
-
- <%= f.check_box :ab_test, { data: { ab_test_target: "checkbox", action: "ab-test#toggle" } } %>
+
+ <%= f.check_box :ab_test, { class: "mt-0.5 size-5", data: { ab_test_target: "checkbox", action: "ab-test#toggle" } } %>
Test A/B su questa comunicazione
Due versioni della stessa email. Carica un template A e un template B nelle colonne: ogni destinatario ne riceve una.
@@ -119,9 +119,9 @@
<% end %>
-
- <%= f.submit mailing.new_record? ? "Crea bozza" : "Salva", class: btn_primary %>
- <%= link_to "Annulla", mailing.new_record? ? dashboard_mailings_path : mailing_path(mailing), class: btn_secondary %>
+
+ <%= f.submit mailing.new_record? ? "Crea bozza" : "Salva", class: "#{btn_primary} w-full sm:w-auto" %>
+ <%= link_to "Annulla", mailing.new_record? ? dashboard_mailings_path : mailing_path(mailing), class: "#{btn_secondary} w-full sm:w-auto" %>
diff --git a/app/views/opportunities/_form.html.erb b/app/views/opportunities/_form.html.erb
index cc1cd7c..c4c666c 100644
--- a/app/views/opportunities/_form.html.erb
+++ b/app/views/opportunities/_form.html.erb
@@ -1,27 +1,97 @@
-
<%= @opportunity.new_record? ? "Nuova opportunità" : "Modifica opportunità" %>
- <%= form_with model: @opportunity, class: "#{card_class} p-6 space-y-4" do |f| %>
+
<%= @opportunity.new_record? ? "Nuova opportunità" : "Modifica opportunità" %>
+ <%= form_with model: @opportunity, class: "#{card_class} p-4 md:p-6 space-y-6" do |f| %>
<%= render "shared/errors", object: @opportunity %>
- <%= f.collection_select :organization_id, @organizations, :id, :name, {}, class: input_class %>
- <%= f.collection_select :project_id, @projects, :id, :name, {}, class: input_class %>
- <%= f.text_field :name, placeholder: "Nome opportunità", required: true, class: input_class %>
- <%= f.select :pipeline_stage, Catalog::PIPELINE_STAGES.map { |k,v| [v,k] }, {}, class: input_class %>
- <%= f.number_field :estimated_value, placeholder: "Valore stimato", step: 0.01, class: input_class %>
- <%= f.number_field :probability, placeholder: "Probabilità %", min: 0, max: 100, class: input_class %>
- <%= f.date_field :expected_close_date, class: input_class %>
- <%= f.select :product, (@products.map(&:name) + %w[Light Full Partnership Evento Altro]).uniq, { include_blank: true }, class: input_class %>
- <%= f.select :ab_variant, Catalog::AB_VARIANTS.map { |k,v| [v,k] }, { include_blank: true }, class: input_class %>
- <%= f.select :send_status, Catalog::SEND_STATUSES.map { |k,v| [v,k] }, { include_blank: true }, class: input_class %>
- <%= f.date_field :sent_on, class: input_class %>
- <%= f.text_field :outcome, placeholder: "Esito", class: input_class %>
-
<%= f.check_box :demo_trial %> Demo / Trial
-
<%= f.check_box :converted %> Conversione
- <%= f.collection_select :assigned_user_id, @users, :id, :full_name, { include_blank: true }, class: input_class %>
- <%= f.select :lost_reason, Catalog::LOST_REASONS.map { |k,v| [v,k] }, { include_blank: true }, class: input_class %>
- <%= f.text_area :notes, rows: 3, class: input_class %>
-
- <%= f.submit class: btn_primary %>
- <%= link_to "Annulla", @opportunity.persisted? ? @opportunity.organization : opportunities_path, class: btn_secondary %>
+
+ Base
+
+
+ Organizzazione
+ <%= f.collection_select :organization_id, @organizations, :id, :name, {}, class: input_class %>
+
+
+ Progetto
+ <%= f.collection_select :project_id, @projects, :id, :name, {}, class: input_class %>
+
+
+ Nome opportunità
+ <%= f.text_field :name, placeholder: "Nome opportunità", required: true, class: input_class %>
+
+
+ Stage
+ <%= f.select :pipeline_stage, Catalog::PIPELINE_STAGES.map { |k,v| [v,k] }, {}, class: input_class %>
+
+
+ Owner
+ <%= f.collection_select :assigned_user_id, @users, :id, :full_name, { include_blank: true }, class: input_class %>
+
+
+
+
+
+ Commerciale
+
+
+ Valore stimato
+ <%= f.number_field :estimated_value, placeholder: "Valore stimato", step: 0.01, class: input_class %>
+
+
+ Probabilità %
+ <%= f.number_field :probability, placeholder: "Probabilità %", min: 0, max: 100, class: input_class %>
+
+
+ Chiusura prevista
+ <%= f.date_field :expected_close_date, class: input_class %>
+
+
+ Prodotto
+ <%= f.select :product, (@products.map(&:name) + %w[Light Full Partnership Evento Altro]).uniq, { include_blank: true }, class: input_class %>
+
+
+ Motivo perdita
+ <%= f.select :lost_reason, Catalog::LOST_REASONS.map { |k,v| [v,k] }, { include_blank: true }, class: input_class %>
+
+
+ Esito
+ <%= f.text_field :outcome, placeholder: "Esito", class: input_class %>
+
+
+
+
+
+ Campagna
+
+
+ Test A/B
+ <%= f.select :ab_variant, Catalog::AB_VARIANTS.map { |k,v| [v,k] }, { include_blank: true }, class: input_class %>
+
+
+ Stato invio
+ <%= f.select :send_status, Catalog::SEND_STATUSES.map { |k,v| [v,k] }, { include_blank: true }, class: input_class %>
+
+
+ Data invio
+ <%= f.date_field :sent_on, class: input_class %>
+
+
+
+ <%= f.check_box :demo_trial, class: "size-5" %>
+ Demo / Trial
+
+
+ <%= f.check_box :converted, class: "size-5" %>
+ Conversione
+
+
+
+
+ Note
+ <%= f.text_area :notes, rows: 4, class: input_class %>
+
+
+
+ <%= f.submit class: "#{btn_primary} w-full sm:w-auto" %>
+ <%= link_to "Annulla", @opportunity.persisted? ? @opportunity.organization : opportunities_path, class: "#{btn_secondary} w-full sm:w-auto" %>
<% end %>
diff --git a/app/views/organizations/_form.html.erb b/app/views/organizations/_form.html.erb
index a80c454..13a8503 100644
--- a/app/views/organizations/_form.html.erb
+++ b/app/views/organizations/_form.html.erb
@@ -1,6 +1,6 @@
-
<%= @organization.new_record? ? "Nuova organizzazione" : "Modifica organizzazione" %>
- <%= form_with model: @organization, class: "#{card_class} p-6 space-y-4" do |f| %>
+
<%= @organization.new_record? ? "Nuova organizzazione" : "Modifica organizzazione" %>
+ <%= form_with model: @organization, class: "#{card_class} p-4 md:p-6 space-y-6" do |f| %>
<%= render "shared/errors", object: @organization %>
<%= f.label :name, class: "mb-1 block text-sm font-medium" %><%= f.text_field :name, required: true, class: input_class %>
@@ -15,10 +15,10 @@
<%= f.label :assigned_user_id, "Owner", class: "mb-1 block text-sm font-medium" %><%= f.collection_select :assigned_user_id, @users, :id, :full_name, { include_blank: true }, class: input_class %>
Progetti
-
+
<% (@projects || Project.active.ordered).each do |project| %>
-
- <%= check_box_tag "organization[project_ids][]", project.id, @organization.project_ids.include?(project.id) || (@organization.new_record? && current_project&.id == project.id), id: "organization_project_#{project.id}" %>
+
+ <%= check_box_tag "organization[project_ids][]", project.id, @organization.project_ids.include?(project.id) || (@organization.new_record? && current_project&.id == project.id), id: "organization_project_#{project.id}", class: "size-5" %>
<%= project.name %>
<% end %>
@@ -39,9 +39,9 @@
<%= f.label :commercial_fit, class: "mb-1 block text-sm font-medium" %><%= f.text_area :commercial_fit, rows: 3, class: input_class %>
<%= f.label :notes, class: "mb-1 block text-sm font-medium" %><%= f.text_area :notes, rows: 4, class: input_class %>
-
- <%= f.submit class: btn_primary %>
- <%= link_to "Annulla", @organization.persisted? ? @organization : organizations_path, class: btn_secondary %>
+
+ <%= f.submit class: "#{btn_primary} w-full sm:w-auto" %>
+ <%= link_to "Annulla", @organization.persisted? ? @organization : organizations_path, class: "#{btn_secondary} w-full sm:w-auto" %>
<% end %>
diff --git a/app/views/pipeline/show.html.erb b/app/views/pipeline/show.html.erb
index 83e649e..ddd560d 100644
--- a/app/views/pipeline/show.html.erb
+++ b/app/views/pipeline/show.html.erb
@@ -1,51 +1,98 @@
-
Pipeline
-
Scorri orizzontalmente · trascina le card o cambia stage dal menu
+
Pipeline
+
Su cellulare la vedi per stage in verticale. Su desktop resta trascinabile.
-