diff --git a/frontend/src/components/subscriptions/SubscriptionEnded.vue b/frontend/src/components/subscriptions/SubscriptionEnded.vue index 598df9d8edff29e81b5330b509241060965a7d78..d5c6815ec1c59858a11b494315efde27f5a213ee 100644 --- a/frontend/src/components/subscriptions/SubscriptionEnded.vue +++ b/frontend/src/components/subscriptions/SubscriptionEnded.vue @@ -1,11 +1,13 @@ <template> <v-card class="mx-auto center-page" id="subscription-ended"> <v-card-title class="title"> - It seems like your subscription has (temporarily) ended. + No submissions left </v-card-title> <v-card-text> - If you've been validating feedback or resolving conflicts those subscriptions might become active again.<br/> - If that happens they'll become clickable in the sidebar. + All submissions for <b> {{ submissionTypeName() }} </b> in the current stage have been corrected. If you've + been validating feedback or <br/> + resolving conflicts some submissions may become active again. + If that is the case they will appear clickable in the sidebar again. </v-card-text> <v-card-actions class="text-xs-center"> <v-btn to="/home"> @@ -18,10 +20,21 @@ </v-card> </template> -<script> -export default { - name: 'subscription-ended' +<script lang="ts"> + +import Vue from 'vue' +import Component from 'vue-class-component' +import store from '@/store/store' + +@Component +export default class SubscriptionEnded extends Vue { + get submissionTypes () { return store.state.submissionTypes } + + submissionTypeName () { + return this.submissionTypes[this.$route.params.typePk].name + } } + </script> <style scoped> diff --git a/frontend/src/pages/SubscriptionWorkPage.vue b/frontend/src/pages/SubscriptionWorkPage.vue index 980b9250850c56b36a3c4ea7b01619a5eeff8877..dc0eba4547d2013d7da5bbeba45834834d3b7e78 100644 --- a/frontend/src/pages/SubscriptionWorkPage.vue +++ b/frontend/src/pages/SubscriptionWorkPage.vue @@ -33,6 +33,7 @@ <script> import SubmissionCorrection from '@/components/submission_notes/SubmissionCorrection' +import { SubmissionNotes } from '@/store/modules/submission-notes' import SubmissionType from '@/components/SubmissionType' import store from '@/store/store' import SubmissionTests from '@/components/SubmissionTests' @@ -107,7 +108,8 @@ export default { currentAssignment (val) { this.$vuetify.goTo(0, { duration: 200, easing: 'easeInOutCubic' }) if (val === undefined) { - this.$router.replace('ended') + const typePk = SubmissionNotes.state.submission.type + this.$router.replace(typePk + '/ended') Subscriptions.removeActiveSubscription() Subscriptions.getSubscriptions() } diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 8084feb79c54884e21d01d6b8a8e4e99060b86c6..a93b5d8068c08f9d8b5b133d5444b25be6849c84 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -80,17 +80,17 @@ const router = new Router({ name: 'home', component: StartPageSelector }, - { - path: 'subscription/ended', - name: 'subscription-ended', - component: SubscriptionEnded - }, { path: 'subscription/:pk', name: 'subscription', beforeEnter: tutorOrReviewerOnly, component: SubscriptionWorkPage }, + { + path: 'subscription/:typePk/ended', + name: 'subscription-ended', + component: SubscriptionEnded + }, { path: 'feedback', beforeEnter: tutorOrReviewerOnly,