-
Notifications
You must be signed in to change notification settings - Fork 634
/
ReportsLessonHeader.vue
110 lines (97 loc) · 2.56 KB
/
ReportsLessonHeader.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<template>
<div>
<p>
<BackLink
:to="classRoute('ReportsLessonListPage')"
:text="$tr('back')"
/>
</p>
<KGrid>
<KGridItem sizes="100, 50, 50" percentage>
<h1>
<KLabeledIcon>
<KIcon slot="icon" lesson />
{{ lesson.title }}
</KLabeledIcon>
</h1>
</KGridItem>
<KGridItem sizes="100, 50, 50" percentage alignment="right">
<!-- TODO COACH
<KDropdownMenu
:text="coachStrings.$tr('optionsLabel')"
:options="actionOptions"
appearance="raised-button"
@select="goTo($event.value)"
/>
-->
</KGridItem>
</KGrid>
<HeaderTable>
<HeaderTableRow>
<template slot="key">
{{ coachStrings.$tr('statusLabel') }}
</template>
<template slot="value">
<LessonActive :active="lesson.active" />
</template>
</HeaderTableRow>
<HeaderTableRow>
<template slot="key">
{{ coachStrings.$tr('recipientsLabel') }}
</template>
<template slot="value">
<Recipients :groupNames="getGroupNames(lesson.groups)" />
</template>
</HeaderTableRow>
<!-- TODO COACH
<HeaderTableRow>
<template slot="key">{{ coachStrings.$tr('descriptionLabel') }}</template>
<template slot="value">{{ lesson.description }}</template>
</HeaderTableRow>
-->
</HeaderTable>
<HeaderTabs>
<HeaderTab
:text="coachStrings.$tr('reportLabel')"
:to="classRoute('ReportsLessonReportPage', {})"
/>
<HeaderTab
:text="coachStrings.$tr('learnersLabel')"
:to="classRoute('ReportsLessonLearnerListPage', {})"
/>
</HeaderTabs>
</div>
</template>
<script>
import commonCoach from '../common';
export default {
name: 'ReportsLessonHeader',
components: {},
mixins: [commonCoach],
computed: {
/** TODO COACH
actionOptions() {
return [
{ label: this.coachStrings.$tr('editDetailsAction'), value: 'ReportsLessonEditorPage' },
{
label: this.coachStrings.$tr('manageResourcesAction'),
value: 'ReportsLessonManagerPage',
},
];
},
*/
lesson() {
return this.lessonMap[this.$route.params.lessonId];
},
},
methods: {
goTo(page) {
this.$router.push({ name: 'NEW_COACH_PAGES', params: { page } });
},
},
$trs: {
back: 'All lessons',
},
};
</script>
<style lang="scss" scoped></style>