Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/events/_bulk_actions_menu.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
data-dropdown-target="content"
class="hidden absolute right-0 z-10 mt-1 bg-white border border-gray-200 rounded-md shadow-lg py-1 min-w-[180px]">
<%= link_to "Onboarding tracker", onboarding_event_path(@event), class: item_class %>
<%= link_to "Send reminder emails", preview_reminder_event_path(@event), class: item_class %>
<%= link_to "Send bulk emails", preview_reminder_event_path(@event), class: item_class %>
<%= link_to "Bulk payments", bulk_payments_event_path(@event), class: item_class %>
<%= link_to registrants_event_path(@event, format: :csv), class: item_class, data: { turbo_frame: "_top" } do %>
Download CSV <i class="fa-solid fa-download text-gray-400 ml-1"></i>
Expand Down
9 changes: 7 additions & 2 deletions app/views/events/confirm_reminder.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>

<div class="mb-6">
<h1 class="text-2xl font-semibold text-gray-900">Send reminder emails</h1>
<h1 class="text-2xl font-semibold text-gray-900">Send bulk emails</h1>
<p class="text-gray-600 mt-1">
<%= @event.title %><% if @event.start_date.present? %> &bull; <%= @event.date_range %><% end %>
</p>
Expand All @@ -28,11 +28,16 @@
<div class="bg-white border border-gray-200 rounded-lg p-4 mb-6">
<h2 class="text-lg font-semibold text-gray-800 mb-3">Recipients <span class="text-gray-400 font-normal">(<%= count %>)</span></h2>

<h3 class="text-xs font-semibold uppercase tracking-wide text-gray-500 mb-1">Comma-separated</h3>
<h3 class="text-xs font-semibold uppercase tracking-wide text-gray-500 mb-1">Comma-separated names</h3>
<p class="text-sm text-gray-700 mb-4 break-words">
<%= @event_registrations.map { |reg| reg.registrant.full_name }.join(", ") %>
</p>

<h3 class="text-xs font-semibold uppercase tracking-wide text-gray-500 mb-1">Comma-separated emails</h3>
<p class="text-sm text-gray-700 mb-4 break-words">
<%= @event_registrations.map { |reg| reg.registrant.preferred_email }.join(", ") %>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ€– From Claude: Switched this from full_name to preferred_email β€” the "Comma-separated" block exists for copy-pasting addresses, so names were the wrong value. Reusing the same preferred_email accessor already shown in the "Full list" below.

</p>

<h3 class="text-xs font-semibold uppercase tracking-wide text-gray-500 mb-1">Full list</h3>
<ul class="columns-1 sm:columns-2 gap-x-8 text-sm">
<% @event_registrations.each do |reg| %>
Expand Down
55 changes: 30 additions & 25 deletions app/views/events/preview_reminder.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div class="mb-6">
<h1 class="text-2xl font-semibold text-gray-900">
Send reminder emails
Send bulk emails
</h1>
<p class="text-gray-600 mt-1">
<%= @event.title %><% if @event.start_date.present? %> &bull; <%= @event.date_range %><% end %>
Expand All @@ -21,8 +21,8 @@
<h2 class="text-lg font-semibold text-gray-800 mb-2 pb-2 border-b border-gray-200">Recipients</h2>
<p class="text-gray-600 mb-3">
Choose who will receive this reminder. Filters keep everyone in the list and
simply check the registrants who match. Separate multiple values with
<code class="font-mono">--</code> to match any of them (e.g.
check the matches. Separate multiple values with
<code class="font-mono">'--'</code> to match multiple values (e.g.
<code class="font-mono">amy--aisha</code>).
</p>
<%= render "events/reminder_recipient_filters" %>
Expand All @@ -31,27 +31,32 @@
reminder-preview drives the live message/subject preview as the admin types. %>
<%= form_with url: confirm_reminder_event_path(@event), method: :post, data: { controller: "reminder-preview", turbo: false } do |f| %>
<%= render "events/reminder_recipients" %>
<div class="mb-6">
<h2 class="text-lg font-semibold text-gray-800 mb-2 pb-2 border-b border-gray-200">Subject</h2>
<p class="text-gray-600 mb-2">
The subject line recipients will see. Edit it as you like β€” leave it as is to use the default.
</p>
<%= text_field_tag :custom_subject, @custom_subject,
class: "w-full rounded border-gray-300 shadow-sm px-3 py-2 text-sm",
data: { reminder_preview_target: "subjectInput", action: "input->reminder-preview#updateSubject" } %>
</div>
<div class="mb-6">
<h2 class="text-lg font-semibold text-gray-800 mb-2 pb-2 border-b border-gray-200">Message</h2>
<p class="text-gray-600 mb-2">
The intro shown near the top of the reminder, above the event details. Edit it or clear it as you like β€” the event details and the "View ticket" button are always included.
</p>
<p class="text-xs text-gray-500 mb-2">
Accepts basic HTML β€” bold, italics, links, lists, and line breaks.
</p>
<%= text_area_tag :custom_message, @custom_message,
rows: 4,
class: "w-full rounded border-gray-300 shadow-sm px-3 py-2 text-sm font-mono",
data: { reminder_preview_target: "input", action: "input->reminder-preview#update" } %>
<div class="my-14">
<h2 class="text-lg font-semibold text-gray-800 mb-6 pb-2 border-b border-gray-200">Email draft</h2>
<div class="bg-white border border-gray-200 rounded-lg p-6 pb-8 space-y-6">
<div>
<h3 class="font-semibold text-gray-700 mb-2">Subject</h3>
<p class="text-gray-600 mb-2">
The subject line recipients will see. Edit it as you like β€” leave it as is to use the default.
</p>
<%= text_field_tag :custom_subject, @custom_subject,
class: "w-full rounded border-gray-300 shadow-sm px-3 py-2 text-sm bg-white",
data: { reminder_preview_target: "subjectInput", action: "input->reminder-preview#updateSubject" } %>
</div>
<div>
<h3 class="font-semibold text-gray-700 mb-2">Message</h3>
<p class="text-gray-600 mb-2">
The intro shown near the top of the reminder, above the event details. Edit it or clear it as you like β€” the event details and the "View ticket" button are always included.
</p>
<%= text_area_tag :custom_message, @custom_message,
rows: 4,
class: "w-full rounded border-gray-300 shadow-sm px-3 py-2 text-sm font-mono bg-white",
data: { reminder_preview_target: "input", action: "input->reminder-preview#update" } %>
<p class="text-xs text-gray-400 mt-1.5">
Accepts basic HTML β€” bold, italics, links, lists, and line breaks.
</p>
</div>
</div>
</div>
<% if @reminder_preview_html.present? %>
<div class="mb-6">
Expand All @@ -61,7 +66,7 @@
<span class="font-semibold text-gray-500">Subject:</span>
<span data-reminder-preview-target="subjectPreview"><%= @custom_subject %></span>
</div>
<div class="email-preview overflow-auto max-h-[70vh] p-4" style="font-family: Lato, sans-serif;">
<div class="email-preview overflow-auto max-h-[70vh] p-4" style="font-family: Lato, sans-serif; zoom: 0.6;">
<%= raw @reminder_preview_html %>
</div>
</div>
Expand Down