Skip to main content

CnEventsCard

The appointments booked on a record that is not an OpenRegister object, as a list: each event's summary, its time (start to end) and its place. Widget type events, for a detail page.

It reads a source or an endpoint. { kind: "flow-task" } reads OpenRegister's /api/flow-tasks/{id}/events, the appointments on a task of the task engine; the rows carry summary, dtstart / dtend and location. content.headerActions (["link", "create"]) reports "Bestaande koppelen" and "Afspraak maken" for the card's title row; they run the calendar leaf's picker and meeting form against that same address (…/events/link, …/events), read the list again, and show a refused link in the server's words. A refused or failed read says so ("The appointments could not be loaded") instead of showing an empty list.

Usage​

{ "id": "task-appointments", "type": "events", "title": "Appointments",
"content": { "source": { "kind": "flow-task" }, "emptyText": "Nobody has booked an appointment on this task" } }
<CnEventsCard :source="{ kind: 'flow-task' }" :objectId="taskUuid" />

Props​

PropTypeDefaultDescription
sourceObjectnullWhere the events come from: { kind: 'flow-task', id? }. id may be left out or written @objectId for objectId. Also read from content.source.
endpointString''An events URL of its own; {id} is filled with the record id. Also read from content.endpoint.
objectIdString | Number''The page's record id.
apiBaseString'/apps/openregister/api'The OpenRegister API base.
contentObject{}The widget content: source, endpoint, emptyText (through the app's translate), headerActions (link, create), createVariant (secondary draws "Afspraak maken" as the outlined header action instead of primary), createIcon (its icon, a plus without it), menuActions (link, create: those flows as items of the card's Actions menu instead of the title row).
emptyLabelString''The empty line; defaults to content.emptyText, then "No appointments yet".
failedLabelString''The failure line; defaults to "The appointments could not be loaded".