ProviderDayColumns
ComplexScheduling
<co-provider-day-columns>ProviderDayColumns is the multi-provider day view: one column per provider, time rows, chips, blocks and free slots.
import { ProviderDayColumns } from 'health-components';
Examples
Open Day
Usage
<ProviderDayColumns times={TIMES} providers={providersWithAppts} />
When to use
- Front desk view of everyone's day.
When not to use
- One provider's week: Calendar.
Variants and states
| Variant | What it is |
|---|---|
| appointments | Chips by time. |
| blocks | Lunch, admin, hospital rounds. |
| free | Hover to book. |
Accessibility
- Grid; free cells are links "+ Book 9:40 AM".
Do and don't
- Do: Keep column order stable.
- Don't: More than 8 columns without scrolling.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
times * | string[] | — | Row times, e.g. ['8:00 AM', '8:20 AM']. Required |
providers * | ProviderColumn[] | — | One column per provider. Required |
onBook | (provider: string, time: string) => void | none | Called when a free slot is chosen |
label | string | 'Schedule by provider' | Accessible name of the view |
Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-provider-day-columns>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.
Angular template
<co-provider-day-columns label="…" default-checked [times]="times" (co-book)="onBook($event.detail)"></co-provider-day-columns>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | times | Row times, e.g. ['8:00 AM', '8:20 AM']. Required |
| property / JSON attribute | providers | One column per provider. Required |
| attribute | label | Accessible name of the view; default 'Schedule by provider' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| event | co-book | Called when a free slot is chosen; default none (React: onBook) |