Fix content blocks, notes, and chapters.
This commit is contained in:
parent
1aaf31090d
commit
b62211a5b4
|
|
@ -3,10 +3,11 @@
|
|||
class="module-activity"
|
||||
v-if="!empty"
|
||||
>
|
||||
<h3 class="module-activity__module-name">
|
||||
<h3 class="module-activity__topic-name">
|
||||
{{ module.topic.title }}
|
||||
</h3>
|
||||
<h2 class="module-activity__title">{{ module.metaTitle }} - {{ module.title }}</h2>
|
||||
<h2 class="module-activity__title">{{ module.title }}</h2>
|
||||
<h3 class="module-activity__meta-title">{{ module.metaTitle }}</h3>
|
||||
<div class="module-activity__tasks activity-tasks">
|
||||
<activity-entry
|
||||
title="Aufgabe & Ergebnis"
|
||||
|
|
@ -27,11 +28,12 @@
|
|||
{{ answer.survey.title }}
|
||||
</activity-entry>
|
||||
<activity-entry
|
||||
title="Lesezeichen"
|
||||
title="Lesezeichen ContentBlock"
|
||||
class="module-activity__entry"
|
||||
:bookmark="bookmark"
|
||||
v-for="bookmark in contentBookmarks"
|
||||
:key="bookmark.id"
|
||||
@link="goTo(bookmark.uuid)"
|
||||
@link="goTo(bookmark.contentBlock.id)"
|
||||
>
|
||||
<content-bookmark :bookmark="bookmark" />
|
||||
</activity-entry>
|
||||
|
|
@ -47,11 +49,12 @@
|
|||
<activity-entry
|
||||
title="Notiz"
|
||||
class="module-activity__entry"
|
||||
v-for="note in notes"
|
||||
:key="note.id"
|
||||
@link="goTo(note.id)"
|
||||
:bookmark="noteBookmark"
|
||||
v-for="noteBookmark in notes"
|
||||
:key="noteBookmark.note.id"
|
||||
@link="goTo(noteBookmark.contentBlock.id)"
|
||||
>
|
||||
{{ note.text }}
|
||||
{{ noteBookmark.note.text }}
|
||||
</activity-entry>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -73,11 +76,11 @@ export default {
|
|||
computed: {
|
||||
empty() {
|
||||
return !(
|
||||
this.module.mySubmissions.length ||
|
||||
this.module.myAnswers.length ||
|
||||
this.module.myContentBookmarks.length ||
|
||||
this.module.myChapterBookmarks.length ||
|
||||
this.module.bookmark
|
||||
this.notes.length ||
|
||||
this.answers.length ||
|
||||
this.submissions.length ||
|
||||
this.contentBookmarks.length ||
|
||||
this.chapterBookmarks.length
|
||||
);
|
||||
},
|
||||
notes() {
|
||||
|
|
@ -86,7 +89,6 @@ export default {
|
|||
.concat(this.module.myContentBookmarks)
|
||||
.concat([this.module.bookmark ? this.module.bookmark : {}])
|
||||
.filter((b) => b.note)
|
||||
.map((b) => b.note)
|
||||
: [];
|
||||
},
|
||||
submissions() {
|
||||
|
|
@ -140,9 +142,7 @@ export default {
|
|||
max-width: 320px;
|
||||
}
|
||||
|
||||
margin-bottom: 2 * $large-spacing;
|
||||
|
||||
&__module-name {
|
||||
&__topic-name {
|
||||
@include regular-text;
|
||||
margin-bottom: $small-spacing;
|
||||
}
|
||||
|
|
@ -150,7 +150,10 @@ export default {
|
|||
&__title {
|
||||
@include heading-2;
|
||||
}
|
||||
|
||||
&__meta-title {
|
||||
@include regular-text;
|
||||
margin-bottom: $small-spacing;
|
||||
}
|
||||
&__entry {
|
||||
&:first-of-type {
|
||||
border-top: 1px solid $color-silver;
|
||||
|
|
|
|||
|
|
@ -42,14 +42,14 @@ export default {
|
|||
update(data) {
|
||||
return this.$getRidOfEdges(data).myActivity;
|
||||
},
|
||||
pollInterval: 5000,
|
||||
pollInterval: 15000,
|
||||
},
|
||||
instruments: {
|
||||
query: MY_ACTIVITY_QUERY,
|
||||
update(data) {
|
||||
return this.$getRidOfEdges(data).myInstrumentActivity;
|
||||
},
|
||||
pollInterval: 5000,
|
||||
pollInterval: 15000,
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class UsersQuery(object):
|
|||
return Module.objects.all()
|
||||
|
||||
def resolve_my_instrument_activity(self, info, **kwargs):
|
||||
return BasicKnowledge.objects.all()
|
||||
return BasicKnowledge.objects.filter(instrumentbookmark__user=info.context.user)
|
||||
|
||||
|
||||
class AllUsersQuery(object):
|
||||
|
|
|
|||
Loading…
Reference in New Issue