Skip to content

WAIT: Add CE request/payment deadlines to events#1870

Draft
maebeale wants to merge 2 commits into
mainfrom
maebeale/ce-deadline-hours-payment
Draft

WAIT: Add CE request/payment deadlines to events#1870
maebeale wants to merge 2 commits into
mainfrom
maebeale/ce-deadline-hours-payment

Conversation

@maebeale

@maebeale maebeale commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

🤖 PR, suggested 👤 review level: 📖 Read — light-logic: two new event date columns, callout badge/subtitle branching, and view/email display

What is the goal of this PR and why is this important?

  • Lets admins set two per-event CE deadlines — a date to request CE hours and a date for CE payment — so registrants know what's due and when.

How did you approach the change?

  • New date columns ce_hours_request_deadline / ce_payment_due_deadline on events, permitted in EventPolicy and edited in the CE callout section of the event form.
  • MagicTicketCallouts surfaces them dynamically on the CE card: subtitle prompts "Request your hours by " until hours are on file; the amount-due badge becomes "$150 due by " until the fee is paid (it already keys off paid_in_full?, the same signal the CE page uses for "Paid").
  • Surfaced beyond the card too:
    • CE callout detail page (callouts/ce) and the public CE info page (ce_hours).
    • Confirmation and reminder emails, via a shared _ce_deadlines partial (html + text), gated on the registrant having requested CE credit.

Anything else to add?

  • Deadlines only render when set, so events without them are unchanged.
  • Not surfaced in the admin registrant matrix — we don't surface the registration deadline there either.

if complete
return unless amount_cents.positive?
return "#{amount} due"
return "#{amount} due" if registration.paid_in_full? || event.ce_payment_due_deadline.blank?

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: The deadline suffix is suppressed once paid_in_full?. CE payment isn't tracked separately from the event fee, so this reuses the same signal callouts/ce already uses to show CE "Paid".

@maebeale maebeale changed the title Add CE request/payment deadlines to events WAIT: Add CE request/payment deadlines to events Jun 22, 2026
shown in the confirmation and reminder emails. Mirrors the CE callout's
deadline copy. Locals: event (decorated), registration. The deadlines are
plain dates, so no time zone is applied. %>
<% if registration.ce_credit_requested? && (event.ce_hours_request_deadline || event.ce_payment_due_deadline) %>

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: Gated on ce_credit_requested? so only CE registrants see deadlines, and on at least one deadline being set so events without them are unchanged. Same partial backs both confirmation and reminder (html + text) to keep the four templates in sync.

shown in the confirmation and reminder emails. Mirrors the CE callout's
deadline copy. Locals: event (decorated), registration. The deadlines are
plain dates, so no time zone is applied. %>
<% if registration.ce_credit_requested? && (event.ce_hours_request_deadline || event.ce_payment_due_deadline) %>

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: Gated on ce_credit_requested? so only CE registrants see deadlines, and on at least one deadline being set so events without them are unchanged. One partial backs both confirmation and reminder (html + text) to keep the four templates in sync.

maebeale and others added 2 commits June 22, 2026 10:11
Admins set per-event CE deadlines so registrants know when to request
hours and pay; the CE callout, its detail page, and the public CE page
show them dynamically based on what the registrant still owes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Registrants who requested CE credit now see the request/payment
deadlines in their confirmation and reminder emails — email is where a
deadline actually nudges. Shared _ce_deadlines partial keeps the four
templates in sync.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maebeale maebeale force-pushed the maebeale/ce-deadline-hours-payment branch from 5c1492b to ef34e0b Compare June 22, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant