Skip to content

Add CE request/payment deadlines to events#1870

Open
maebeale wants to merge 11 commits into
mainfrom
maebeale/ce-deadline-hours-payment
Open

Add CE request/payment deadlines to events#1870
maebeale wants to merge 11 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: 🔬 Inspect — reworked onto main's CE cutover (new continuing_education_registrations model); logic + copy changes across card, callout, page, and emails

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

  • Lets admins set two per-event CE deadlines — request CE credit by and CE payment due by — so registrants are nudged before each cutoff.

How did you approach the change?

  • New date columns ce_hours_request_deadline / ce_payment_due_deadline on events; permitted in EventPolicy, edited in the CE callout section of the event form.
  • Surfaced across the new (post-cutover) CE surfaces:
    • CE card (MagicTicketCallouts): payment deadline appended to the amount-due badge until ce_paid_in_full? ($150 due by Aug 15); request deadline appended to the license-needed badge (License number needed by Jul 1).
    • CE callout page: "Request CE credit by …" on the not-yet-requested branch; "Payment due by …" beside the pay button while a balance remains.
    • Public CE page (ce_hours): deadline panel.
    • Confirmation + reminder emails: shared _ce_deadlines partial, gated on event.ce_eligible? (not the individual registrant — the confirmation fires before anyone opts into CE, so event-level is the correct nudge audience).

Anything else to add?

  • Framing shift from main's CE cutover: hours are now event-set (ce_hours_offered), not registrant-requested, so "request your hours by" became "request CE credit by" (the outstanding registrant step is now the professional license). Column names kept as-is.
  • Deadlines only render when set; events without them are unchanged.

Comment thread app/services/magic_ticket_callouts.rb Outdated
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 maebeale force-pushed the maebeale/ce-deadline-hours-payment branch 2 times, most recently from ef34e0b to ef38f5f Compare June 25, 2026 22:44
@maebeale maebeale marked this pull request as ready for review July 14, 2026 10:02
Copilot AI review requested due to automatic review settings July 14, 2026 10:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale changed the title WAIT: Add CE request/payment deadlines to events Add CE request/payment deadlines to events Jul 14, 2026
maebeale and others added 2 commits July 14, 2026 06:15
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 ef38f5f to 2b46c9b Compare July 14, 2026 10:20
Copilot AI review requested due to automatic review settings July 14, 2026 10:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

the event offering CE, not on this registrant having requested it yet (the
confirmation fires before anyone opts in). Locals: event (decorated). The
deadlines are plain dates, so no time zone is applied. %>
<% if event.ce_eligible? && (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 event.ce_eligible?, not registration.ce_registered? — the confirmation email fires at registration time, before anyone opts into CE, so registrant-level gating would hide the deadline from exactly the people it should nudge. Event-level shows it to everyone at a CE-eligible event.

card_for preserves the app's live badge when a built-in CE callout is
materialized into an editable row, so the deadline still shows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 10:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

maebeale and others added 2 commits July 14, 2026 06:57
The deadlines belonged with hours-offered/cost, not buried in the ticket
callout card. Extract a shared _ce_config_fields partial rendering all
four as label-above-input cells so they read as distinct fields.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

- Tint the CE settings box teal (its domain colour) instead of grey, with
  white inputs so each field reads clearly.
- Make the "Enable continuing education" text a real label for the checkbox.
- Match the deadline date inputs to the event start/end date input style.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 11:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 11:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 11:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

maebeale and others added 2 commits July 14, 2026 07:23
Registrants filling out the form see the request/payment cutoffs right
by the CE questions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The public form only asked for a license number; the ticket callout
already captures both type and number. Add a license-type question to
the continuing_education section and thread its answer into the
ProfessionalLicense kind so both are recorded at signup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 11:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

- Capture issuing state (US-states dropdown via the _state suffix) and
  expiry (date input) on the continuing_education section, threaded into
  the ProfessionalLicense.
- Note on the form that license details are optional and can be added
  later from the ticket.
- Make the CE interest question required and always persist its answer
  (Yes or No) as a form answer, not just on Yes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 12:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale maebeale requested a review from jmilljr24 July 14, 2026 12:41

@jmilljr24 jmilljr24 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We just need to add the new questions on the existing portal form.

Also I'm assuming if admin want to make an exception to the deadline, they would just create the ce record manually and the deadline wouldn't block payment etc.?

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.

3 participants