From f72ad9c7c4b423a84e1de29cc833a276630580a4 Mon Sep 17 00:00:00 2001 From: Dominik Seeger <dominik.seeger@gmx.net> Date: Sun, 3 Mar 2019 17:35:03 +0100 Subject: [PATCH] subscription ended message clarification --- .../subscriptions/SubscriptionEnded.vue | 25 ++++++++++++++----- frontend/src/pages/SubscriptionWorkPage.vue | 4 ++- frontend/src/router/index.ts | 10 ++++---- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/subscriptions/SubscriptionEnded.vue b/frontend/src/components/subscriptions/SubscriptionEnded.vue index 598df9d8..d5c6815e 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 980b9250..dc0eba45 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 8084feb7..a93b5d80 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, -- GitLab