Skip to main content

SpaceResourcesPanel

packages/leisure/components/organisms/SpaceResourcesPanel.js · Tier: organism · Module: leisure · Rendering: Client Component ('use client')

Purpose​

Renders the list of bookable resources of a public space. Read-only for citizens; operators/admins additionally get add / edit / delete controls through a single shared modal. Each resource links to its reservations page.

Props​

PropTypeRequiredDefaultDescription
spaceIdstring | numberyes—Owning space id.
resourcesArray<{ id, name, description?, resourceType }>yes—The bookable resources.
canManagebooleanyes—Enables add/edit/delete.
tobjectyes—leisure.resources dictionary.
tFormobjectyes—leisure.resourceForm dictionary.
tTypesRecord<string,string>yes—leisure.resourceTypes labels.
langstringyes—Locale.

Behaviour​

A single shared modal handles create/edit; delete uses a confirmation. Each resource row links to /sports-spaces/{spaceId}/resources/{id}.

Composition​

  • Uses: molecules/core/Modal, atoms/core/FormField, atoms/core/Button, atoms/core/Icon, the space-resource server actions.
  • Used by: organisms/leisure/SpaceDetailView.

Internationalisation​

Copy from leisure.resources / resourceForm / resourceTypes.

Accessibility​

The create/edit modal is the accessible core/Modal; resource rows are labelled links.

organisms/leisure/ResourceReservationsPanel, organisms/leisure/SpaceDetailView, molecules/core/Modal.