Commit iniziale di eminuxCRM: CRM Rails con pipeline, campagne email e Docker.
CI / scan_ruby (push) Failing after 11m20s
CI / scan_js (push) Successful in 10m35s
CI / lint (push) Has been cancelled

Include autenticazione, progetti isolati, mail marketing HTML con SMTP, test A/B e editor WYSIWYG.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-17 23:01:48 +02:00
co-authored by Cursor
commit c4e5f289cf
258 changed files with 11293 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<div class="mx-auto max-w-2xl space-y-4">
<h1 class="text-2xl font-semibold"><%= @opportunity.new_record? ? "Nuova opportunità" : "Modifica opportunità" %></h1>
<%= form_with model: @opportunity, class: "#{card_class} p-6 space-y-4" 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 %>
<label class="flex items-center gap-2 text-sm"><%= f.check_box :demo_trial %> Demo / Trial</label>
<label class="flex items-center gap-2 text-sm"><%= f.check_box :converted %> Conversione</label>
<%= 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 %>
<div class="flex gap-2">
<%= f.submit class: btn_primary %>
<%= link_to "Annulla", @opportunity.persisted? ? @opportunity.organization : opportunities_path, class: btn_secondary %>
</div>
<% end %>
</div>
+1
View File
@@ -0,0 +1 @@
<%= render "form" %>
+28
View File
@@ -0,0 +1,28 @@
<div class="space-y-4">
<div class="flex items-center justify-between">
<h1 class="text-2xl font-semibold">Opportunità</h1>
<div class="flex gap-2">
<%= link_to "Export CSV", opportunities_path(format: :csv), class: btn_secondary %>
<%= link_to "Nuova", new_opportunity_path, class: btn_primary %>
</div>
</div>
<div class="overflow-hidden rounded-xl border border-zinc-200 bg-white text-zinc-900 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-100">
<table class="<%= table_class %>">
<thead class="bg-zinc-50 text-left text-xs uppercase text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400">
<tr><th class="px-4 py-3">Organizzazione</th><th class="px-4 py-3">Nome</th><th class="px-4 py-3">Stage</th><th class="px-4 py-3">Valore</th><th class="px-4 py-3">Owner</th></tr>
</thead>
<tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">
<% @opportunities.each do |opp| %>
<tr>
<td class="px-4 py-3"><%= link_to opp.organization.name, opp.organization, class: "hover:underline" %></td>
<td class="px-4 py-3"><%= opp.name %></td>
<td class="px-4 py-3"><%= stage_badge(opp.pipeline_stage) %></td>
<td class="px-4 py-3"><%= format_money(opp.estimated_value) %></td>
<td class="px-4 py-3"><%= opp.assigned_user&.full_name %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<%== pagy_nav(@pagy) if @pagy.pages > 1 %>
</div>
+1
View File
@@ -0,0 +1 @@
<%= render "form" %>