Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: Notification entry navigates to the relevant view #2786

Merged

Conversation

Ayush8923
Copy link
Contributor

@Ayush8923 Ayush8923 commented Jan 14, 2025

closes: #2754

Visible/Frontend Changes

  • Implement the logic to after clicking on the notification user will be redirected to the relevant view.

@Ayush8923 Ayush8923 self-assigned this Jan 14, 2025
Copy link
Contributor

Deployed to https://pr-2786.aam-digital.net/

@Ayush8923 Ayush8923 changed the title feat: added the logic to redirect the notification relevent view [Feat]: Notification entry navigates to the relevant view Jan 14, 2025
@Ayush8923
Copy link
Contributor Author

Ayush8923 commented Jan 15, 2025

@tomwwinter I have implemented logic for notification entries to navigate to the relevant view. Currently, we save the endpoint in the actionUrl for each notification event. To make this dynamic, I think we need to save notificationType and entityType in the notification event. This way, when a user clicks on any notification, the system can determine the corresponding action URL based on the entityType and redirect the user to the appropriate page. Can you please take a look at this logic and share your suggestions/inputs on this?

@Ayush8923 Ayush8923 requested a review from tomwwinter January 15, 2025 11:02
@Ayush8923 Ayush8923 marked this pull request as ready for review January 17, 2025 08:53
@tomwwinter tomwwinter merged commit ddbf265 into feat/1055_notifications-final Jan 17, 2025
12 checks passed
@tomwwinter tomwwinter deleted the feat/notification-to-relevant-view branch January 17, 2025 15:28
@Ayush8923
Copy link
Contributor Author

@sleidig Currently, I have implemented the logic for a dynamic URL in this way (you can check it in the file changes of this PR). It is working correctly in most cases, but for some entities, it is not generating the action URL because we are not getting the entitytype inside the config. Please review the logic and share your suggestions so that I can update the code accordingly.

Comment on lines +154 to +155
default:
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default: return notification.actionUrl?

@Ayush8923
Copy link
Contributor Author

Ayush8923 commented Jan 21, 2025

Here is the new draft PR that updates the logic for redirecting the notification to the relevant view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

click on Notification entry navigates to the relevant view (e.g. details of the changed entity)
3 participants