Replies: 4 comments 1 reply
-
Hey @GregaUNK Backpack currently doesn't include pre-built support for @pxpm, do you have any suggestions you could give here? @tabacitu, what do you think of this feature? Should we add to What features should we build next? |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks, but this does not help in case, if two users want to edit the same entity at the time. |
Beta Was this translation helpful? Give feedback.
-
What do you think about my approach? I will implement Pusher through broadcasting and create a widget that will be included on CRUD edit pages. When someone tries to edit an entry, they will join the channel of the entry ID. Of course, I will also implement "leaving" from an entry, so the channel is cleared and the entry is open for editing. If anyone else tries to open the same entry, all fields will be disabled and an alert will be shown indicating that someone else is already editing it. I'll also add an override option to take over the entry and force the other person out of it. Something like that:
|
Beta Was this translation helpful? Give feedback.
-
Hey @GregaUNK that's a possible approach. I would probably approach this from the server side, like having a table If you want to LOCK until the owner unlocks it manually or the entry is saved and automatically unlocked, I don't think you need any JS. You can sprinkle a simple js pooling every 10s to check for post locking requests and notify the user, if you are not already using pusher etc in your application, I think it would be overkill to add extra dependencies, 3rd party apis etc to solve some that should be "technically" simple. Cheers |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
is there any already made implementation of optimistic locking records? Do you have any suggestions how to do some kind of implementation?
Maybe thru websocket?
Beta Was this translation helpful? Give feedback.
All reactions