Aggiunge il rilevamento di invio e apertura delle email di campagna.
Ogni destinatario mostra se la mail è partita e se è stata aperta, con conteggi in dashboard. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -176,6 +176,19 @@ module ApplicationHelper
|
||||
class: "inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium #{colors[status] || 'bg-zinc-100 text-zinc-700'}"
|
||||
end
|
||||
|
||||
def mailing_open_badge(recipient)
|
||||
return unless recipient.status == "sent"
|
||||
|
||||
if recipient.opened?
|
||||
content_tag :span, "Aperta",
|
||||
class: "inline-flex items-center rounded-md bg-violet-100 px-2 py-0.5 text-xs font-medium text-violet-800 dark:bg-violet-950 dark:text-violet-200",
|
||||
title: "Prima apertura #{format_dt(recipient.opened_at)}"
|
||||
else
|
||||
content_tag :span, "Non aperta",
|
||||
class: "inline-flex items-center rounded-md bg-zinc-100 px-2 py-0.5 text-xs font-medium text-zinc-600 dark:bg-zinc-800 dark:text-zinc-300"
|
||||
end
|
||||
end
|
||||
|
||||
def ab_variant_badge(variant)
|
||||
return if variant.blank?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user