Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
const positionUpdateHubMethodName = 'position-update'
hubConnection.on(positionUpdateHubMethodName, (message: any) => {
        const { position } = JSON.parse(message) as Position;
        if (position) {
              ...
        }
      });



The position message contains the following properties:

Code Block
{
  "position": {
    "id": "5387920d-dfdd-4904-8a51-3f007effcffa",
    "_ts": 1605613557,
    "status": "notified",
    "priority": 0,
    "location": null,
    "label": "A3",
    "customerInfo": [
        "Jörgen",
        "Svensson",
        "2200001910105"
    ],
    "type": "anonymous",
    "queue": "c179a3a2-9fd7-4e12-96e7-19d9e957e094",
    "createdAt": "2020-11-17T11:45:57.114Z",
    "numberInTheQueue": 6
  }
}