A venue today has one fixed seating layout: every seat it owns is always on sale. This adds seating configurations, so a venue can be opened in different ways (full house, reduced capacity, choir on stage) and a resource can run under a chosen one, with no seats duplicated.
Model:
- A new content entity
yoyaku_seat_configuration(venue-scoped) stores only what it closes:closed_sectionsandclosed_subsections. The full-house configuration stores nothing. - Seats gain an optional integer
subsectiontag, so a configuration can close half of a section (a slice), not just whole sections. - A seat is open when its section is not closed and its subsection, if any, is not closed.
- The venue gains an optional
default_configuration. A resource keeps itsvenuefield and gains an optionalconfigurationthat overrides the default. The active configuration for a slot is the resource configuration when set, otherwise the venue default, otherwise the whole venue (today behavior).
Behavior:
- The graphical seat map and seat availability show and offer only the seats open in the active configuration.
- Booking a closed seat is forbidden at the engine level: the SeatBookable constraint rejects it under the slot lock, so no booking path can take a closed seat.
- The configuration pickers are scoped to the relevant venue (an AJAX-dependent select on the resource form, a selection handler for the venue default).
The change is additive: no data migration, and venues or resources with no configuration behave exactly as today. Price grade stays on the seat for now.
Follow-ups (separate issues): round-tripping the new seat field and configurations in the import and export submodule, a graphical configuration editor, and per-configuration price-grade overrides.
Issue fork yoyaku-3612148
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedMR !68 opened against 1.x.
Comment #5
mably commented