CnAssignDialog
Hand a record to another user or team, with a note and optional switches, configured from the manifest. dossiq's case handover (board DqOverdragen) is the first consumer: the new team, why it moves, and whether the applicant is told. pipelinq tickets and bulk reassignment use the same dialog.
It is a built-in modal: any app opens it by name with an open-modal action and passes its config in the action's props, without registering it. An app's own registry entry with the same name wins.
Usage
{
"type": "open-modal",
"target": "CnAssignDialog",
"props": {
"objectId": "@objectId",
"config": {
"title": "Hand this case to another team",
"eyebrow": "Hand over · {identifier}",
"source": { "url": "/apps/dossiq/api/case/@objectId/summary" },
"assignee": {
"kinds": ["group"],
"label": "New team",
"currentPath": "assignedGroupPublicName",
"currentHint": "Now with {current}. The new team picks its own handler.",
"hint": "The new team picks its own handler.",
"allowTyped": true,
"field": "team"
},
"note": { "label": "Why it is moving", "field": "reason" },
"toggles": [
{ "field": "doorzending", "label": "Tell the applicant, this is a doorzending (Awb 2:3)", "note": "Leave it off for a move inside the organisation." }
],
"confirm": { "label": "Hand it over", "request": { "url": "/apps/dossiq/api/case/@objectId/handover" } },
"doneText": "The case is with its new team."
}
}
}
Confirming sends { team, reason, doorzending } to the request url, or dispatches confirm.action with that choice as its last argument. The page is then refreshed. A refusal is shown in the server's own words and the dialog stays open.
Config
| Key | Description |
|---|---|
title, subtitle, doneText | Texts, through the app's translate |
eyebrow | A template filled from the record |
source | An endpointSource to read the record from; else the object prop |
assignee.kinds | ["group"] (default), ["user"], or both |
assignee.label, placeholder, hint | The field's texts |
assignee.currentPath, currentHint, currentAs | Who has the record now, read from it, and the sentence that says so, shown in place of hint. The placeholder is {current}, or the name in currentAs, so an app can reuse a sentence it already translates ("currentAs": "team" for "Now with {team}.") |
assignee.allowTyped | Offer what was typed as a choice, for instances where the search answers nothing |
assignee.describe | { register, schema, groupField?, textField? }: the records that hold a team's description (default fields ncGroupId, description). Each team option then reads "{count} members · {description}"; the count only where the viewer may read group details |
assignee.field, kindField | The key the id is sent as (default assignee), and the key its kind (group/user) is sent as |
note | { label?, hint?, required?, field? }, required by default and sent as field (default note); false drops it |
toggles | [{ field, label, note? }]: switches that start off and are sent as booleans. label and note are templates filled from the record, so a note can name the applicant ("{initiatorDisplayName} then gets a message that the case moves") |
confirm | { label?, icon?, request?: { method?, url, body? }, action? } |
Tokens (@objectId, @object.<field>) resolve in every url.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
config | Object | {} | The configuration above |
objectId | String | Number | '' | The record's id, for the @objectId token; when empty or still a token, the route's id |
object | Object | null | The record, when the host has it |
selectedIds (selected-ids) | Array | [] | The selected record ids, when a bulk action opened the dialog |
Events
| Event | Payload | Description |
|---|---|---|
done | the choice as sent | The assignment ran |
close | The dialog was closed |