Skip to content

Commit eef03ce

Browse files
authored
Merge pull request #8 from IntentFile/docs/calendar-additional-page
docs: a calendar view adds a page; a document's line-items calendar is the items pane
2 parents f0083c0 + fbfe74f commit eef03ce

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

docs/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The quick lookup surface: one line and a minimal snippet per construct. For rule
2828
| [`function: Attachment` / `Snapshot`](/spec/entities#attachments-and-snapshots) | a Files panel / immutable versioned printed copies |
2929
| [`forms`](/spec/processes#forms) | task data-entry pages |
3030
| [`actions`](/spec/processes#actions-custom-buttons) | developer-defined buttons opening custom pages |
31-
| [`view`](/spec/presentation#view-calendar-range-slots) | calendar / range / slot-booking pages |
31+
| [`view`](/spec/presentation#view-calendar-range-slots) | an additional calendar / range page, or a slot-booking page |
3232
| [`documentItemsLayout: chat`](/spec/presentation#documentitemslayout-chat-conversation-threads) | render a document's items as a chat thread |
3333
| [`reports`](/spec/presentation#reports) | aggregations, charts, dashboard KPI tiles, balance reports |
3434
| [`scope`](/spec/presentation#lifecycle-scope) | which lifecycle rows an aggregating report counts |

docs/spec/presentation.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ widgets:
141141

142142
## view — calendar, range, slots
143143

144-
`view:` (with a `calendar:` / `slots:` descriptor) renders an entity as a time-based page instead of a table:
144+
`view:` (with a `calendar:` / `slots:` descriptor) places an entity's records on a time surface:
145145

146146
```yaml
147147
- name: DayAllocation
@@ -157,6 +157,36 @@ widgets:
157157

158158
`view: calendar` is also expressible as the role alias `function: Calendar`.
159159

160+
### A view adds a page
161+
162+
`view: calendar`, `view: range` and `view: slots` **add** a page; they never take one away. The entity keeps the page family its structure already implies — a list, a master-detail, or a document editor — and the view joins it:
163+
164+
| Route | Page |
165+
|---|---|
166+
| `/<Entity>` | the calendar, or the slot picker |
167+
| `/<Entity>/list` | the entity's own browse page (list / master / document list) |
168+
| `/<Entity>/create`, `/<Entity>/<id>/edit` | the entity's own editor |
169+
170+
Both browse pages offer a switch to the other, and choosing a day, an event or a free slot opens the entity's own editor. So a document master may be browsed on a calendar — or booked from a slot picker — and still be edited as a document, with its line items, printing and workflow tasks intact: declaring a view never costs an entity its editing surface. A picker is how a record is *created*; the list or document page is how it is worked with afterwards, and an author needs both.
171+
172+
### A document's line items on a calendar
173+
174+
When the entity declaring `view: calendar` is a document's **line-items** child, the document's items pane *is* the calendar instead of the row grid — the shape for a day-grained line, such as a booked day or an allocated hour:
175+
176+
```yaml
177+
- name: Roster
178+
function: Document
179+
- name: RosterItem
180+
function: DocumentItem
181+
view: calendar
182+
calendar: { start: day, title: Person }
183+
fields:
184+
- { name: day, type: date, required: true }
185+
- { name: hours, type: decimal, precision: 18, scale: 2 }
186+
```
187+
188+
The document keeps its header, totals and printing; only the items pane changes. Clicking an event edits that line, clicking an empty day adds one with that date filled in. It cannot be combined with `documentItemsLayout: chat`, which claims the same pane.
189+
160190
## documentItemsLayout: chat — conversation threads
161191

162192
A document master can render its line-items child as a chat thread (message bubbles + a composer) instead of an editable items table — support cases, tickets, comment threads. The header, status pill, workflow tasks and print stay as in a normal document:

0 commit comments

Comments
 (0)