Skip to content

Receive Live Updates #6

@eediallo

Description

@eediallo

Story

  • As a HaveALook employee,
  • I Want the desk map to update automatically when someone else makes a booking,
  • So That I am always looking at the most current information without needing to refresh my browser.

Acceptance Criteria

  1. Given I am viewing the desk grid and another user books an available desk,
    • When that booking is confirmed,
    • Then the corresponding desk on my screen should automatically change from "Available" to "Unavailable" within a few seconds.
  2. Given I am viewing the desk grid and another user cancels their booking,
    • When that cancellation is confirmed,
    • Then the corresponding desk on my screen should automatically change from "Unavailable" to "Available".

Implementation Notes

  1. Implement a real-time update mechanism. This can be done via WebSockets for instant updates or by long-polling the GET /api/v1/bookings endpoint every 5-10 seconds.
  2. The fetched data should be compared with the current state in the React Context, and the UI should re-render if there are any changes.

Checklist:

  • I have defined the user story
  • I have defined some acceptance criteria
  • I have included any implementation notes
  • I have included all relevant links

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Prioritised

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions