Use redmine_qbo_calendar's configurable statuses; skip call-outs

The "statuses that get reminders" setting lists the statuses set up in redmine_qbo_calendar
(falling back to the old fixed list on older versions). Reminder runs and the appointment page's
reminder panel skip employee call-outs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-02 20:22:52 -05:00
1 parent acad2614c7
commit 48275a25be
4 files changed
+10 -6

No files matched your search

@@ -1,6 +1,7 @@
<%# The reminder's status on an appointment's page (redmine_qbo_calendar's show_customer_appointment hook) %>
<% appointment = local_assigns[:appointment] %>
<% if appointment %>
<%# Not on an employee's call-out (redmine_qbo_calendar), which has no customer to remind %>
<% if appointment && !(appointment.respond_to?(:call_out?) && appointment.call_out?) %>
<% rs = RedmineQboReminders::ReminderStatus.for(appointment) %>
<% can_send = User.current.allowed_to?(:send_appointment_reminders, nil, global: true) %>
<div class="box appointment-reminder appointment-reminder-<%= rs.state %>">
@@ -14,7 +15,7 @@
when :scheduled then l(:text_reminder_scheduled, time: format_time(rs.at), email: rs.email)
when :off then l(:text_reminder_off)
when :opted_out then l(:text_reminder_opted_out)
when :status then l(:text_reminder_status, status: appointment.status.to_s.humanize)
when :status then l(:text_reminder_status, status: appointment.respond_to?(:status_record) ? appointment.status_record.name : appointment.status.to_s.humanize)
when :no_customer then l(:text_reminder_no_customer)
when :no_email then l(:text_reminder_no_email)
else l(:text_reminder_too_late)