Skip to content

Enhance balance due email tracking and update Active Storage schema#98

Merged
rsmoke merged 2 commits intomainfrom
staging
Mar 31, 2026
Merged

Enhance balance due email tracking and update Active Storage schema#98
rsmoke merged 2 commits intomainfrom
staging

Conversation

@rsmoke
Copy link
Copy Markdown
Member

@rsmoke rsmoke commented Mar 31, 2026

This pull request adds tracking for when balance due emails are sent to applicants, displaying this information in the admin dashboard and persisting it in the database. It includes a database migration, updates to the admin UI, controller logic, and relevant tests.

Database changes:

  • Added a new balance_due_emails_last_sent_at datetime column to the application_settings table to store the timestamp of the last sent balance due email. [1] [2]

Admin dashboard improvements:

  • Updated the admin dashboard (dashboard.rb) to display the last sent time for balance due emails, showing either the formatted timestamp or 'never' if no email has been sent.

Controller logic:

  • Modified the send_balance_due action to update the balance_due_emails_last_sent_at field whenever balance due emails are sent.

Testing enhancements:

  • Updated request specs to ensure the balance_due_emails_last_sent_at field is correctly set after sending emails, and improved test setup for application settings. [1] [2] [3]

Schema updates:

  • Refreshed db/schema.rb to reflect the new column and related database structure changes. [1] [2] [3]

rsmoke added 2 commits March 31, 2026 11:30
Updated the applications request spec to include a test for the last sent timestamp of balance due emails. Modified the dashboard to display the last sent date, and ensured the applications controller updates the timestamp when emails are sent. This improves tracking of email notifications for balance dues.
Bumped ActiveRecord schema version to 7.2 and added new columns to the active_storage_blobs and applications tables. Introduced service_name to active_storage_blobs and balance_due_emails_last_sent_at to applications. Also added the active_storage_variant_records table with necessary foreign keys for improved data integrity and functionality.
@rsmoke rsmoke merged commit e92a873 into main Mar 31, 2026
5 checks passed
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