CnContactsTab
Sidebar tab for the contacts integration leaf. Renders the vCard contacts linked to an OpenRegister object grouped by role (Applicants / Handlers / Advisors / Other). Backed by ContactService + ContactsProvider via the OR REST surface /api/objects/{r}/{s}/{id}/contacts.
Tier-2: the tab hosts two header actions — Link existing contact (opens CnContactPicker) and Add new contact (opens CnContactCreate). Both dialogs delegate the actual API call back to the tab so the loading + refresh handshake stays here.
Usage
<CnContactsTab
:object-id="objectId"
:register="registerId"
:schema="schemaId" />
People on objects
Since the people-on-objects change a linked person is a Nextcloud user or a vCard contact, and the listing carries more than a flat list:
byRolegroups the people the way the server sees them. When it is present the tab renders those groups in that order, labelled by the schema's vocabulary; when it is absent the tab keeps its own buckets (Applicants / Handlers / Advisors / Other).rolesis the schema'slinkRolesvocabulary. The tab passes it to the picker asroleOptions, so a handler picks a declared role instead of typing one.kindsaysuserorcontact,activesays whether today falls inside the link's validity window, andvalidFrom/validUntil/notedescribe it. A link that is not active keeps its row and gains a badge, because a past handler is still a fact about the object.- Removing a row removes that role, not the person: the tab sends
DELETE …/contacts/{contactUid}?role=<role>, since one person may hold several roles on one object.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
objectId | String | — | (required) The OR object's UUID. |
register | String | '' | The register slug or numeric id. |
schema | String | '' | The schema slug or numeric id. |
apiBase | String | /apps/openregister/api | Base path for the OR REST API. |
linkExistingLabel | String | Link contact | Header button label. |
addNewLabel | String | look's own | Label of the create button; empty takes the look's own: "New contact" in the board look, "Add new contact" in the Nextcloud look. In the board look the buttons read Link contact then New contact, both outlined; in the Nextcloud look Add new contact comes first and Link contact is the primary. |
Events
| Event | Payload | Description |
|---|---|---|
open-reverse-lookup | {contactUid, displayName} | Emitted when a contact row is clicked. Consumers route this into the reverse-lookup flyout. |