Hi there is a possibility to link/open to a modal dialog about a notification, like the url-link? (https://support.aspnetzero.com/QA/Questions/7492/How-can-we-add-URL-in-notifications-using-backend-c)
For example to open the "Change password" dialog by link about notifications.
We use Version 10.3 with MVC/.net 5
Regards
Hi
okay thats fine (maybe) but when is fire this event? In my scenarios doesn't fire when I click on a notification.
Regrads
Hi
Version is 10.3, MVC, .Net5.0
My LDAP connection to my company AD works fine, but in this AD are stored more informations (for example: Organisation Unit and Roles). How get this informations? At the moment I get about the SignInManger or Authorization the normal User Identity with the roles from the ASPNETZERO framework.
Regards
Hi
Yes for existing notification types the click works fine, with the notifictions like open a modal service it work the open only when is build the notifications, then open the modal window. This is my getURL code, the last case is only the example to work normal (App.WelcomeToTheApplication)
function getUrl(userNotification) {
switch (userNotification.notification.notificationName) {
case 'App.NewUserRegistered':
return '/App/users?filterText=' + userNotification.notification.data.properties.emailAddress;
case 'App.NewTenantRegistered':
return '/App/tenants?filterText=' + userNotification.notification.data.properties.tenancyName;
case 'App.GdprDataPrepared':
return '/File/DownloadBinaryFile?id=' + userNotification.notification.data.properties.binaryObjectId + '&contentType=application/zip&fileName=collectedData.zip';
case 'App.DownloadInvalidImportUsers':
return '/File/DownloadTempFile?fileToken=' + userNotification.notification.data.properties.fileToken + '&fileType=' + userNotification.notification.data.properties.fileType + '&fileName=' + userNotification.notification.data.properties.fileName;
//Add your custom notification names to navigate to a URL when user clicks to a notification.
case 'App.NewVersionAvailable':
return openReleaseNotesModal;
case 'App.WelcomeToTheApplication':
return '/App/users?filterText=' + userNotification.notification.data.properties.emailAddress;
}
//No url for this notification
return '#';
};
The 'App.NewVersionAvailable' case is my request for open a Modal Window the code for this is:
var openReleaseNotesModal = function () {
new app.ModalManager({
viewUrl: abp.appPath + 'App/Profile/ReleaseNotesModal',
scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/Profile/_ReleaseNotesModal.js',
modalClass: 'ReleaseNotesModal'
});
};
and when I add '.open()' then will open this initially.
Thanks Regards
Hi my "show" code is orginal.
var show = function (userNotification) {
//Application notification
abp.notifications.showUiNotifyForUserNotification(userNotification, {
'onclick': function () {
//Take action when user clicks to live toastr notification
var url = getUrl(userNotification);
if (url) {
location.href = url;
}
}
});
//Desktop notification
Push.create("Badger", {
body: format(userNotification).text,
//icon: abp.appPath + 'Common/Images/app-logo-small.svg',
icon: abp.appPath + 'Common/Images/inSight_Logo_Side_With_N3.png',
timeout: 6000,
onClick: function () {
window.focus();
this.close();
}
});
};
Hi
I would like to take up this topic again. I read your comment in your last statment "//Take action when user clicks to live toastr notification" My intension is the link in the notification list not on the toast. I can link to a side but not open a modal popup.
Can you look please again. Regards
Hi the sub items from the menu doesn't shows correctly when the menu is minimized. http://c1c74570.demo.aspnetzero.com/app/main/dashboard In your demo it this effekt also, minimize the menu that you can see only the icons and the click on the administration icon. Shortly there are open the sub items but then are close automatically.
And the Quick Nav Bar shows not fine.
Ragards
Hi
that's nice your links but we don't use angular, we are using MVC. And in MVC is the structure others. And when I read right, then is the problem in your links not the same. In my project works the menu fine when is expand, it doesn't work when the menu is collapse and then I while click on a item whit sub items. And you can replicate this bug, on your own demo project (I wrote this info in my first statement).
Regards
Yes thanks
Hi
how can I implement SSO with Kestrel? I use this documentation, but it doesn't work. https://learn.microsoft.com/de-de/aspnet/core/security/authentication/windowsauth?view=aspnetcore-7.0&tabs=visual-studio
Regards