Skip to content

Consolidate the logic for authorization and initialization of submission creation and submission editing

Brian Kockritz requested to merge 305-link-to-submission into master

Links to relevant issues

Closes #305 (closed)

Description of changes, providing context that may help others understand the changes

Consolidate the logic for authorization and initialization of submission creation and submission editing.

This comment/issue contains context: #305 (comment 1686650410)

There are two new routes: /surveys/:surveyId/submissions/new and /surveys/:surveyId/submissions/:submissionId/edit

These routes point to the SubmissionPage.vue component (formerly Draft.vue) which handles authorization, initialization, and surfacing error messages to users. Prior to this work, different parts of the app would do some of the authorization, some of the initialization, and then navigate to the Draft.vue component. Now those parts of the app just link to one of the above routes.

Merge request reports