Skip to content

Availability module #30

Description

@bart-krakowski

Parent

#25

What to build

Extract resource availability and advisory conflict detection into a proper module. When registered, the module adds availability-aware validation to the write pipeline and exposes read helpers for rendering blocked time.

Resources carry availability windows (weekday + start/end time), capacity, and before/after buffers. Advisory conflict checking runs over the events currently loaded — it is instant UX feedback, not authoritative. Authoritative validation is the server package's responsibility.

Acceptance criteria

  • `AvailabilityModule` plugs into the kernel via the module API (Kernel + module registration API #28)
  • `getUnavailableRanges(date)` returns fractional minute ranges (`{ startFraction, endFraction }`) — no pixel values, no `containerHeight` parameter
  • `getUnavailabilityDetails()` returns per-resource reasons (outside hours / over capacity / no availability defined)
  • Advisory conflict detection fires on `addEvent` and `editEvent`, returning a `conflicts[]` array before the write commits
  • Capacity rules (multiple resources, consumption arrays) are correctly checked against overlapping events
  • Buffer rules (before/after minutes) are respected in conflict detection
  • Removing the `AvailabilityModule` causes availability code to tree-shake out of the bundle

Blocked by

#28

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions