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:
@@ -118,6 +118,12 @@ function displayTempDataMessages() {
|
||||
showWarning(warningMsg.textContent.trim());
|
||||
}
|
||||
|
||||
// Permanent warning — no auto-dismiss
|
||||
const warningPerm = document.getElementById('tempdata-warning-permanent-message');
|
||||
if (warningPerm && warningPerm.textContent.trim()) {
|
||||
toastr.warning(warningPerm.textContent.trim(), 'Warning', { timeOut: 0, extendedTimeOut: 0 });
|
||||
}
|
||||
|
||||
// Info message
|
||||
const infoMsg = document.getElementById('tempdata-info-message');
|
||||
if (infoMsg && infoMsg.textContent.trim()) {
|
||||
|
||||
Reference in New Issue
Block a user