Skip to content
Snippets Groups Projects
Commit cfa815dd authored by robinwilliam.hundt's avatar robinwilliam.hundt
Browse files

Scrolling to top on correction page when submitting

parent 9b7e5fca
Branches
Tags
1 merge request!101Resolve "Frontend improvements"
...@@ -4,29 +4,29 @@ ...@@ -4,29 +4,29 @@
> >
<route-change-confirmation :next-route="nextRoute"/> <route-change-confirmation :next-route="nextRoute"/>
<v-flex xs12 md6> <v-flex xs12 md6>
<div class="sub-correction"> <submission-correction
<submission-correction :assignment="currentAssignment"
:assignment="currentAssignment" :key="subscription.pk"
:key="subscription.pk" @feedbackCreated="startWorkOnNextAssignment"
@feedbackCreated="startWorkOnNextAssignment" class="ma-4 autofocus"
class="ma-4 autofocus" />
/> <submission-tests
<submission-tests :tests="submission.tests"
:tests="submission.tests" :expand="true"
:expand="true" class="mx-4"
class="mx-4" />
/>
</div>
</v-flex> </v-flex>
<v-flex md6> <v-flex md6>
<submission-type <div class="sub-correction">
v-bind="submissionType" <submission-type
:key="submissionType.pk" v-bind="submissionType"
:reverse="true" :key="submissionType.pk"
:expandedByDefault="{ Description: true, Solution: true }" :reverse="true"
class="mt-4 mr-4" :expandedByDefault="{ Description: true, Solution: true }"
/> class="mt-4 mr-4"
/>
</div>
</v-flex> </v-flex>
</v-layout> </v-layout>
</template> </template>
...@@ -103,6 +103,7 @@ ...@@ -103,6 +103,7 @@
}, },
watch: { watch: {
currentAssignment (val) { currentAssignment (val) {
this.$vuetify.goTo(0, {duration: 200, easing: 'easeInOutCubic'})
if (val === undefined) { if (val === undefined) {
this.$router.replace('ended') this.$router.replace('ended')
this.$store.dispatch('removeActiveSubscription') this.$store.dispatch('removeActiveSubscription')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment