diff --git a/src/helpers/constants.js b/src/helpers/constants.js new file mode 100644 index 000000000..aeaec54d4 --- /dev/null +++ b/src/helpers/constants.js @@ -0,0 +1,7 @@ +const STATUS = { + DRAFT: 'draft', + APPLIED: 'applied', + WITHDRAWN: 'withdrawn', +}; + +export { STATUS }; diff --git a/src/views/Exercises/Show.vue b/src/views/Exercises/Show.vue index ba4e740bd..90d1d5f23 100644 --- a/src/views/Exercises/Show.vue +++ b/src/views/Exercises/Show.vue @@ -58,6 +58,7 @@ import LoadingMessage from '@/components/LoadingMessage'; import Navigation from '@/components/Page/Navigation'; import AddToFavouritesButton from '@/components/Page/AddToFavouritesButton'; import { mapState, mapGetters } from 'vuex'; +import { STATUS } from '@/helpers/constants'; export default { components: { @@ -125,8 +126,9 @@ export default { page: 'Applications', name: 'exercise-show-applications', children: [ - { page: 'Draft', name: 'exercise-show-applications-in-status', params: { status: 'draft' } }, - { page: 'Applied', name: 'exercise-show-applications-in-status', params: { status: 'applied' } }, + { page: 'Draft', name: 'exercise-show-applications-in-status', params: { status: STATUS.DRAFT } }, + { page: 'Applied', name: 'exercise-show-applications-in-status', params: { status: STATUS.APPLIED } }, + { page: 'Withdrawn', name: 'exercise-show-applications-in-status', params: { status: STATUS.WITHDRAWN } }, { page: 'Independent Assessments', name: 'exercise-show-independent-assessments' }, ], });