sde1000 / quicktill

Figure out where all the money and stock went to
GNU General Public License v3.0
43 stars 9 forks source link

System info message display #213

Open sde1000 opened 4 years ago

sde1000 commented 4 years ago

It would be useful to be able to feed messages into the till to be displayed to users while they are working on the register, for example from plugins like the online ordering system to indicate waiting orders.

Currently we support lock screen plugins that can fetch and display information from external systems, but people don't often look at the lock screen: often the monitor has gone to sleep and by the time it wakes up when a user token is presented, the lock screen is gone and the main register is displayed.

It might be possible to add a hook to display messages in the status bar above the register, but the issue here is how long it takes to fetch the message and the responsiveness of the till to user input while this is happening. The till is still single-threaded and there will be a noticeable pause.

A better approach might be to have a background task reading the status of waiting orders and feeding this information into the till asynchronously, for example by postgres NOTIFY. We already have a suitable NOTIFY listener in the till. This also means that all till terminals can display the message without having to fetch it explicitly themselves.

Where could these messages be displayed? The status bar at the top of the screen is largely unused at the moment, especially on wide screens. The message could be displayed centered.

sde1000 commented 4 years ago

Displaying messages in the middle of the header is implemented in 17a1c6945d963b117ad4afaeca51fa2a7b4fc5f2. Currently nothing writes these messages.

sde1000 commented 3 years ago

(Well, the ipladmin-client code does, but that's currently in a private repo.)