Dining tables can be allotted to logged in waiters using this script.
Maintenance > Resources
1. Add the below line in ticket.buttons
<event key="ticket.tableselected" code="event.tableselected"/>
2. Create a new text resource with name “event.tableselected” and add the below code to it. The user name checking and table name checking can be changed according to the customer need.
if(place.getName().startsWith("DI") && ( user.getName().equals("Cashier") || user.getName().equals("Manager"))) { javax.swing.JOptionPane.showMessageDialog(null, "You are not allowed to use this table."); return "cancel"; } else if(place.getName().startsWith("TA") && ( user.getName().equals("Administrator") || user.getName().equals("Manager"))) { javax.swing.JOptionPane.showMessageDialog(null, "You are not allowed to use this table."); return "cancel"; } else if(place.getName().startsWith("GA") && ( user.getName().equals("Administrator") || user.getName().equals("Cashier"))) { javax.swing.JOptionPane.showMessageDialog(null, "You are not allowed to use this table."); return "cancel"; } Save & restart