Skip to content
Source
Sign inSign up
TanStack/time

Availability module #30

Openbart-krakowski(GitHub profile, opens in a new tab) opened this issue 0 comments

Parent

https://github.com/TanStack/time/issues/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 (#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

https://github.com/TanStack/time/issues/28

  1. bart-krakowski(GitHub profile, opens in a new tab) added labelsenhancement

Sign in to join this conversation.