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

Added SubmissionTypesOverview component

parent 9500f383
No related branches found
No related tags found
1 merge request!115Activate deactivate tutors
Pipeline #78132 passed
This commit is part of merge request !115. Comments created here will be created in the context of that merge request.
......@@ -6,9 +6,9 @@
<v-card-text>
<GDPRNotice/>
</v-card-text>
<v-card-action>
<v-card-actions>
<v-btn @click="acceptedGDPR = true">Einwilligen</v-btn>
</v-card-action>
</v-card-actions>
</v-card>
<v-card v-else>
<v-card-title class="title">
......
<template>
<v-card>
<v-card-title class="title">Assignment types</v-card-title>
<v-layout row wrap>
<v-flex xs3>
<v-list>
<v-list-tile
v-for="submissionType in sortedSubmissionTypes" :key="submissionType.pk"
@click="selectedSubmissionType = submissionType"
>
<v-list-tile-content>
{{submissionType.name}}
</v-list-tile-content>
</v-list-tile>
</v-list>
</v-flex>
<v-flex xs9>
<v-layout v-if="!selectedSubmissionType" justify-center>
<strong>Select an assignment type on the left to see the description and solution.</strong>
</v-layout>
<submission-type class="mr-2 mb-2" v-else v-bind="selectedSubmissionType"/>
</v-flex>
</v-layout>
</v-card>
</template>
<script>
import {mapState} from 'vuex'
import SubmissionType from '@/components/SubmissionType'
export default {
name: 'SubmissionTypesOverview',
components: {SubmissionType},
data () {
return {
selectedSubmissionType: null
}
},
computed: {
...mapState([
'submissionTypes'
]),
sortedSubmissionTypes () {
return Object.values(this.submissionTypes).sort((t1, t2) => {
let lowerName1 = t1.name.toLowerCase()
let lowerName2 = t2.name.toLowerCase()
if (lowerName1 < lowerName2) {
return -1
} else if (lowerName1 > lowerName2) {
return 1
}
return 0
})
}
}
}
</script>
<style scoped>
</style>
......@@ -11,6 +11,7 @@
<subscription-list class="ma-4"></subscription-list>
</v-flex>
</v-layout>
<SubmissionTypesOverview class="ma-4"/>
</div>
</template>
......@@ -18,9 +19,11 @@
import CorrectionStatistics from '@/components/CorrectionStatistics'
import WelcomeJumbotron from '@/components/WelcomeJumbotron'
import SubscriptionList from '@/components/subscriptions/SubscriptionList'
import SubmissionTypesOverview from '@/components/SubmissionTypesOverview'
export default {
components: {
SubmissionTypesOverview,
SubscriptionList,
WelcomeJumbotron,
CorrectionStatistics},
......
......@@ -11,6 +11,7 @@
<subscription-list class="ma-4"></subscription-list>
</v-flex>
</v-layout>
<SubmissionTypesOverview class="ma-4"/>
</div>
</template>
......@@ -18,9 +19,11 @@
import SubscriptionList from '@/components/subscriptions/SubscriptionList'
import CorrectionStatistics from '@/components/CorrectionStatistics'
import WelcomeJumbotron from '@/components/WelcomeJumbotron'
import SubmissionTypesOverview from '@/components/SubmissionTypesOverview'
export default {
components: {
SubmissionTypesOverview,
WelcomeJumbotron,
CorrectionStatistics,
SubscriptionList},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment