Skip to content

[GF-FE-22] Build interactive floor plan and seat map view on workspace detail page #1117

Description

@yusuftomilola

Problem

Workspaces are browsable only as text/image cards. Members cannot see where seats are located within a space or pick a specific seat before booking. A visual floor plan is a standard feature on competing platforms (Skedda, OfficeRnD) and significantly improves the booking experience. The backend seat map API (GF-BE-18) provides the data.

Proposed Solution

Create an interactive floor plan component and add it as a tab on the workspace detail page.

New component: frontend/components/workspaces/FloorPlanView.tsx

  • Renders a visual seat grid using the seatLayout JSONB from the workspace
  • Each seat is rendered as a rectangle at the x, y position with its label
  • Color coding: green = available, red = booked, blue = selected (on hover/click)
  • If a floorPlanImageUrl exists, render it as a background behind the seat overlay using an <img> or CSS background

Integration with frontend/app/workspaces/[id]/page.tsx:

  • Add a "Floor Plan" tab alongside the existing workspace info
  • When the tab is active, show FloorPlanView with data from GET /workspaces/:id/seat-map?date=...
  • Clicking an available seat pre-selects it and highlights it; clicking "Book this seat" pre-fills the booking form with that workspace and date

Acceptance Criteria

  • FloorPlanView component created and renders seat rectangles at correct positions
  • Seats are colour-coded by availability (green / red)
  • Selected seat turns blue on click
  • "Floor Plan" tab added to the workspace detail page
  • Seat map data is fetched from GET /workspaces/:id/seat-map?date=...
  • Date changes trigger a re-fetch to update seat availability colours
  • Graceful fallback shown when seatLayout is null (no floor plan uploaded yet)

Depends on: [GF-BE-18] Add floor plan data model and seat map API to workspaces

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions