Ga naar hoofdinhoud

CnStatusExplainerWidget

What the status a record is in asks of it, in sentences. Registered under the status-explainer widget type for detail pages.

A status a type derives is not a move anyone can pick. When it has not fired, nothing on the page explains why. Naming the missing document turns that into an errand.

Content shape​

{
"id": "item-status",
"type": "status-explainer",
"content": {
"endpointSource": { "url": "/apps/myapp/api/item/@objectId/available-transitions" },
"paths": {
"derivation": "derivation",
"withheld": "withheld",
"waitingOn": "current.waitingOn",
"dwell": "current.dwell",
"explanation": "current.statusDescription"
},
"fieldRules": true,
"labels": { "derivationHeading": "This item moves to {status} once these are on file" }
}
}
PartRead fromShows
derivation{ name, unmet: [] }"This moves to {status} once these are on file", then each missing thing.
explanationa stringThe explanation an administrator wrote on the status.
withheld[{ id, label, reasons: [] }]Each move that waits, with its first reason. An entry without a reason is left out.
waitingOnus, applicant or thirdPartyWho the record waits on, when it is not us.
dwell{ days, breached }Working days in this status, with a chip when that is longer than the status allows.
field rulesthe record's @self.fieldRulesWhat the status requires, locks and hides, one line per kind.

paths overrides where each part sits in the answer. fieldRules: false leaves the field rules out. withheld: false leaves the withheld moves out, for a card that says only where the record stands (the case Status card). In the board look the widget draws no box: the explanation is its bold line and the time in the status sits muted under it. labels.derivationHeading (with {status}) and labels.fieldRulesHeading replace the two headings.

Behaviour​

  • The widget renders nothing when there is nothing to say.
  • A failed read binds nothing from the endpoint. The field rules ride on the record, so they still show.

Props​

PropTypeDefaultDescription
contentObject{}The configuration above.
objectIdString|Number''The record's id, for the endpoint's tokens.
objectDataObjectnullThe record, for its field rules.