Just spit-balling some ideas here, but assuming you have a table with a list of employees…what if you create a column in that employee table that indicates if an employee is on or off duty…then create a relation to that table from whichever table is used when an order is created, so you get a relation of all employees that are currently on duty. Then using that relation, you create a single value column that returns a random employee id. My thought is maybe when an order is created, you write that random employee id to a column in the order, so an employee is assigned an order. The thought is that you could set it up so each employee only gets a subset of orders. If only one employee can see a particular order, then only they can claim it. That of course could get ugly if for some reason an order isn’t claimed and nobody else see’s it. Maybe you could set it up with some timestamps, math, and IF columns to release it after a certain amount of time, but then you are back to your original problem where everybody would then see it.
Another thought is that instead of Claim button, it could be a Queue button. It would function the same and put the employee’s id on the order, but it would also set a timestamp. Then you could have a math column that sets the timestamp plus 20 or 30 seconds. After that time elapses, then you could show who the last person was to claim it, and if the signed in user matches, then show the claim button.
Another thought is to let them however many employees claim an order, but use the same timestamp trick with a math column to add 30 seconds or a minute before the order shows up in a ‘claimed’ list. That way employees can attempt to claim an order, but they still have to see it on a separate ‘claimed’ list before they can begin to fulfill the order. Whoever claims it last will get it, but they can only work with orders that show up in their claimed list.
None of these are great ideas, but hopefully it will give you some other ideas to try. I think you are going to be fighting that few second server delay no matter what, so you either need find a way for an order to be viewable by one employee at a time, or adjust the flow with some delays so they can first confirm that they have successfully claimed the order. I think that’s just the nature of the web. There’s always that slightly disconnected nature between the server and the end user.