Add WarningPermanent toast type and upgrade invoice failure notifications

Email delivery failures and PDF generation errors now show a permanent
warning/error toast that requires manual dismissal, so users cannot
accidentally miss critical action-blocking feedback.

- ToastHelper: WarningPermanent TempData key + Warning/WarningPermanent
  extension methods on both ITempDataDictionary and Controller
- SetNotificationResultToast: NotificationStatus.Failed now uses
  ToastWarningPermanent (previously auto-dismissed in 5 s)
- InvoicesController.Send: TempData["Warning"] → TempData["WarningPermanent"]
  when PDF generation or email dispatch fails
- InvoicesController.DownloadPdf: TempData["Error"] → TempData["ErrorPermanent"]
  with the actual exception message so root cause is visible
- _Layout.cshtml: WarningPermanent hidden div
- toast-notifications.js: WarningPermanent handler (timeOut: 0)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-27 16:02:16 -04:00
parent cad728ba66
commit 5631d1d57a
4 changed files with 35 additions and 4 deletions
@@ -890,6 +890,10 @@
{
<div id="tempdata-warning-message" style="display:none;">@TempData["Warning"]</div>
}
@if (TempData["WarningPermanent"] != null)
{
<div id="tempdata-warning-permanent-message" style="display:none;">@TempData["WarningPermanent"]</div>
}
@if (TempData["Info"] != null)
{
<div id="tempdata-info-message" style="display:none;">@TempData["Info"]</div>