Ga naar hoofdinhoud

CnInteractionFormWidget

The interaction-form widget: the quick-log form of a workspace page. It saves a contact moment (channel, client, subject, summary, outcome) to OpenRegister through the object store. It reads selectedClient from the page's workspace context to pre-fill the Client field and, unless content.writeWorkspace is false, writes selectedClient and activeSummary back so sibling widgets react: a client list filtered on @workspace.selectedClient, or a CnKbSearchWidget bound to activeSummary.

The widget registers itself as the interaction-form type, so a manifest places it by that key. It is also a named export:

import { CnInteractionFormWidget } from '@conduction/nextcloud-vue'

Every schema, field and enum choice comes from content, so the widget carries no app vocabulary. The Client field is a resource select that offers to create a client that does not exist yet. The outcome options come from the target schema's enum for outcomeField (labels from x-enum-labels); outcomes is only a fallback. With detailRoute set, a save adds an Open button that opens the saved object in a new tab. defaults stamps fixed fields on every create (for a required discriminator the form has no input for); the mapped fields win over it.

Props​

PropTypeDefaultDescription
contentobject{}{ register, schema, defaults?, clientSchema, clientField, clientLabelField?, subjectField?, summaryField, channelField?, outcomeField?, channels?, outcomes?, submitLabel?, detailRoute?, writeWorkspace? }.

Events​

EventPayloadDescription
savedthe saved objectEmitted after the contact moment is saved.

Reference (auto-generated)​

OpenRegister reliance​

heavy: this component cannot work without OpenRegister. 2 direct references, 9 files reached through imports.

Through: CnResourceSelect.

See the reliance overview for the filterable list.

Props​

NameTypeRequiredDefaultDescription
content{register?: string, schema?: string, defaults?: object, clientSchema?: string, clientField?: string, clientLabelField?: string, subjectField?: string, summaryField?: string, channelField?: string, outcomeField?: string, channels?: Array, outcomes?: Array, submitLabel?: string, detailRoute?: string, writeWorkspace?: boolean}\{\}Persisted configuration blob (see component description for the shape).

Events​

NamePayloadDescription
saved—A contactmoment was persisted.