From 1dcf299a1014cc9ed58b97b63bda86cbf2442a62 Mon Sep 17 00:00:00 2001 From: Oleg Zhuk Date: Tue, 4 Jun 2024 15:55:16 +0200 Subject: [PATCH] VCST-1251: Add unregister notification (#160) fix: Impoved Unregistered Notifcation UX with displaying correct original type. --- .../Model/UnregisteredNotification.cs | 7 ++++++- .../Services/NotificationRegistrar.cs | 1 - .../Services/NotificationService.cs | 2 +- .../Localizations/en.VirtoCommerce.Notifications.json | 2 +- .../Localizations/ru.VirtoCommerce.Notifications.json | 2 +- .../Scripts/blades/notification-templates-list.js | 7 ++++--- .../Scripts/blades/notifications-list.js | 9 +++++---- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/VirtoCommerce.NotificationsModule.Core/Model/UnregisteredNotification.cs b/src/VirtoCommerce.NotificationsModule.Core/Model/UnregisteredNotification.cs index 14c83a48..ecc13e71 100644 --- a/src/VirtoCommerce.NotificationsModule.Core/Model/UnregisteredNotification.cs +++ b/src/VirtoCommerce.NotificationsModule.Core/Model/UnregisteredNotification.cs @@ -6,12 +6,17 @@ namespace VirtoCommerce.NotificationsModule.Core.Model //The special type for handle cases when the system have stored the notification objects with unregistered types. public class UnregisteredNotification : Notification { + public UnregisteredNotification(string type) : base(type) + { + + } + public UnregisteredNotification() : base(nameof(UnregisteredNotification)) { Templates = new List(); } public override string Kind => "undef"; - + public override void SetFromToMembers(string from, string to) { diff --git a/src/VirtoCommerce.NotificationsModule.Data/Services/NotificationRegistrar.cs b/src/VirtoCommerce.NotificationsModule.Data/Services/NotificationRegistrar.cs index b7c547bd..5de9eab5 100644 --- a/src/VirtoCommerce.NotificationsModule.Data/Services/NotificationRegistrar.cs +++ b/src/VirtoCommerce.NotificationsModule.Data/Services/NotificationRegistrar.cs @@ -47,6 +47,5 @@ public NotificationBuilder OverrideNotificationType