Ga naar hoofdinhoud

CnJourneyDialog

The journey renderer in a modal: a NcDialog around CnJourney. Closing the dialog never discards staged answers. They are saved to the run as each step completes and the dialog keeps its run store, so opening it again (open back to true) resumes at the recorded step with the same answers. A run started here resumes in a page with CnJourney :run-id.

Usage​

<CnJourneyDialog :journey="journey" :open="open" @close="open = false" @run-started="runId = $event" />

Props​

PropTypeDefaultDescription
journeyObject{ steps: [] }The journey to render (see CnJourney).
openBooleantrueWhether the dialog is shown. Closing keeps the run.
runIdString''A recorded run to resume, for example one started in a page.
endpointString''Run API base. Empty: OpenRegister's journey-run API.
submitLabelString''Label of the final Submit button. Empty: "Submit".

Events​

EventPayloadDescription
closenoneThe dialog was dismissed. Answers already saved stay on the run.
run-startedrun idThe first step was saved and the run exists.
step{ from, to }The journey moved to another step.
submittedobjectThe run was submitted; the server's result.

Slots​

None.