# Standalone shift editor. Install in an empty example space. # Commands are application behavior, not a permission boundary. # Create identity is content-derived from fields and event time; do not assume atomic allocation. concept!: &volunteer-shift with: title: {description: "Shift or duty", the: xyz.tonk.examples.shift/title, as: text, cardinality: one} volunteer: {description: "Volunteer name (or Unassigned)", the: xyz.tonk.examples.shift/volunteer, as: text, cardinality: one} start: {description: "Starts (event local date and time)", the: xyz.tonk.examples.shift/start, as: text, cardinality: one} end: {description: "Ends (event local date and time)", the: xyz.tonk.examples.shift/end, as: text, cardinality: one} zone: {description: "Event time zone", the: xyz.tonk.examples.shift/zone, as: text, cardinality: one} volunteer-shift!: this: urn:example:shift:first title: "Welcome desk" volunteer: "Unassigned" start: "2026-11-14T10:00" end: "2026-11-14T12:00" zone: "Europe/London" command!: &create-shift with: create: {description: "Create action", the: dom.event.current-target.dataset/create-shift, as: text} nonce: {description: "Event time", the: dom.event/time-stamp, as: float} title: {description: "Shift or duty", the: dom.event.current-target.form.elements.title/value, as: text} volunteer: {description: "Volunteer name (or Unassigned)", the: dom.event.current-target.form.elements.volunteer/value, as: text} start: {description: "Starts (event local date and time)", the: dom.event.current-target.form.elements.start/value, as: text} end: {description: "Ends (event local date and time)", the: dom.event.current-target.form.elements.end/value, as: text} zone: {description: "Event time zone", the: dom.event.current-target.form.elements.zone/value, as: text} rule!: assert!: volunteer-shift when: - assert: create-shift where: {this: ?this, title: ?title, volunteer: ?volunteer, start: ?start, end: ?end, zone: ?zone} command!: &update-shift with: subject: {description: "Existing item", the: dom.event.current-target.form.dataset/edit-shift, as: entity} title: {description: "Shift or duty", the: dom.event.current-target.form.elements.title/value, as: text} volunteer: {description: "Volunteer name (or Unassigned)", the: dom.event.current-target.form.elements.volunteer/value, as: text} start: {description: "Starts (event local date and time)", the: dom.event.current-target.form.elements.start/value, as: text} end: {description: "Ends (event local date and time)", the: dom.event.current-target.form.elements.end/value, as: text} zone: {description: "Event time zone", the: dom.event.current-target.form.elements.zone/value, as: text} rule!: assert!: volunteer-shift when: - assert: update-shift where: {subject: ?this, title: ?title, volunteer: ?volunteer, start: ?start, end: ?end, zone: ?zone} view!: this: volunteer-shift show: ui: "

Edit shift

Complete every field with a valid value to show the save button.

After saving, check the saved list below. Wait for the changed value to appear before leaving.

" summary: "

{title}

Volunteer name (or Unassigned): {volunteer}

Starts (event local date and time): {start}

Ends (event local date and time): {end}

Event time zone: {zone}

" directory: "

Volunteer shifts

Sample roster. Change the sample dates before use. Coordinate changes with your organizer; check the time zone and that end follows start. This small editor does not detect overlaps or reserve shifts atomically.

Add a new shift

Complete every field with a valid value to show the save button.

After saving, check the saved list below. Wait for the changed value to appear before leaving.

Saved shift list

Change an existing shift

"