/// Stores an informational (blue) toast in the controller's TempData.
/// Convenience wrapper around .
@@ -165,7 +186,7 @@ namespace PowderCoating.Web.Helpers
: $"{channel} notification was skipped.");
break;
case NotificationStatus.Failed:
- controller.ToastWarning(!string.IsNullOrEmpty(log.ErrorMessage)
+ controller.ToastWarningPermanent(!string.IsNullOrEmpty(log.ErrorMessage)
? $"{channel} delivery failed: {log.ErrorMessage}"
: $"{channel} notification failed.");
break;
diff --git a/src/PowderCoating.Web/Views/Shared/_Layout.cshtml b/src/PowderCoating.Web/Views/Shared/_Layout.cshtml
index 449d017..fc9a0e2 100644
--- a/src/PowderCoating.Web/Views/Shared/_Layout.cshtml
+++ b/src/PowderCoating.Web/Views/Shared/_Layout.cshtml
@@ -890,6 +890,10 @@
{
@TempData["Warning"]
}
+ @if (TempData["WarningPermanent"] != null)
+ {
+ @TempData["WarningPermanent"]
+ }
@if (TempData["Info"] != null)
{
@TempData["Info"]
diff --git a/src/PowderCoating.Web/wwwroot/js/toast-notifications.js b/src/PowderCoating.Web/wwwroot/js/toast-notifications.js
index 06087c6..bf85dae 100644
--- a/src/PowderCoating.Web/wwwroot/js/toast-notifications.js
+++ b/src/PowderCoating.Web/wwwroot/js/toast-notifications.js
@@ -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()) {