Fix subscription expiry logic and HTML entities in page titles

Subscription expiry (SubscriptionExpiryBackgroundService):
- Trials with no grace period now go directly Active -> Expired instead
  of briefly entering GracePeriod for a day, which was causing repeated
  'Grace Period Started' admin notification emails
- Remove redundant isTrial variable (query already filters to non-Stripe
  companies, so all processed companies are trials by definition)
- Save per-company inside the loop so a single SaveChangesAsync failure
  no longer discards all other companies' status changes and notification
  log entries (which was the other cause of repeated emails)

HTML entities in page titles (33 views):
- Replace – / — with plain ' - ' in ViewData["Title"] C#
  strings; Razor HTML-encodes these when rendering @ViewData["Title"],
  causing browsers to display the literal text '–' instead of a dash

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 09:43:41 -04:00
parent 19e1ce858f
commit e476b4744d
34 changed files with 131 additions and 94 deletions
@@ -1,8 +1,8 @@
@model PowderCoating.Application.DTOs.Job.JobEditItemsViewModel
@model PowderCoating.Application.DTOs.Job.JobEditItemsViewModel
@using PowderCoating.Core.Entities
@{
ViewData["Title"] = $"Edit Items &mdash; {Model.JobNumber}";
ViewData["Title"] = $"Edit Items - {Model.JobNumber}";
ViewData["PageIcon"] = "bi-list-check";
}
@@ -1,7 +1,7 @@
@model (PowderCoating.Application.DTOs.Job.JobDto Job, PowderCoating.Application.DTOs.Job.IntakeJobDto Form)
@model (PowderCoating.Application.DTOs.Job.JobDto Job, PowderCoating.Application.DTOs.Job.IntakeJobDto Form)
@{
ViewData["Title"] = $"Part Intake &mdash; {Model.Job.JobNumber}";
ViewData["Title"] = $"Part Intake - {Model.Job.JobNumber}";
ViewData["PageIcon"] = "bi-box-seam";
var job = Model.Job;
var form = Model.Form;