vincent15000's avatar

Notifications available for several users

Hello,

By default a notification is attached to a specific user.

What could be the solution if I need that a notification is available for several users (for example the managers can see the notifications) and once a manager has handled the notification, it is destroyed from the database, so that other managers don't see it anymore.

Is it a solution by using the standard Laravel notifications ?

Thanks for your help.

V

1 like
8 replies
Shivamyadav's avatar

As I can think 🤔.. Keep the notification table as a master and bring out the notifications and show to all managers and look if any of the notification is handled by any other manger, then immediately destroy it as you need and no one can see it.

1 like
vincent15000's avatar

Hmmm ... but this way I need to assign the notification to a user ... the superadmin for example.

Oh yes ... effectively I could do that ... assign all notifications to the superadmin (or why not to a specific user like notificationuser) and then retrieve the notifications like you suggest me.

What could be ideal is to generate notifications without assigning them a user.

Is it possible to store an on-demand notification without specifying any user ?

Snapey's avatar

I would send to all individually but look to tag the message with some group id so that you can delete it from managers that did not respond.

1 like
Shivamyadav's avatar

If I am not wrong, the OP has written... Once the notification is handled then it will be removed from the database. So for now there is no need for the group I'd.

1 like
vincent15000's avatar

It looks interesting ... But that means that I need to create several times the same notification (each time sent to another manager).

What could also be interesting is that I have several notifications and if I create a new manager after these notifications has been sent, he also sees the notifications so that he can help to respond them.

Snapey's avatar
Snapey
Best Answer
Level 122

then they are not really notifications. Its just a pool of tasks to be completed.

1 like
vincent15000's avatar

Yes that's another way of looking at things. Interesting too ;). And it's probably the solution I need ...

And now I wonder how to handle an eventual conflict if 2 managers respond to the same task at the same time. Hmmm perhaps when a manager opens a task he can tag it to specify that he will process it and then this task won't appear on the other managers' dashboards. And if he doesn't want to process it, he can also reject it and then it appears once again on all managers' dashboards.

Do you have some tips for this situation ?

Please or to participate in this conversation.