Consolidate the logic for authorization and initialization of submission creation and submission editing
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.