diff --git a/client/src/App.vue b/client/src/App.vue
index 0407ed93..e3bd6c25 100644
--- a/client/src/App.vue
+++ b/client/src/App.vue
@@ -23,6 +23,7 @@
import EditProjectEntryWizard from '@/components/portfolio/EditProjectEntryWizard';
import NewObjectiveWizard from '@/components/objective-groups/NewObjectiveWizard';
import NewNoteWizard from '@/components/notes/NewNoteWizard';
+ import EditNoteWizard from '@/components/notes/EditNoteWizard';
import FullscreenImage from '@/components/FullscreenImage';
import FullscreenInfographic from '@/components/FullscreenInfographic';
import FullscreenVideo from '@/components/FullscreenVideo';
@@ -50,6 +51,7 @@
EditProjectEntryWizard,
NewObjectiveWizard,
NewNoteWizard,
+ EditNoteWizard,
FullscreenImage,
FullscreenInfographic,
FullscreenVideo
diff --git a/client/src/components/ContentBlock.vue b/client/src/components/ContentBlock.vue
index d3c2d700..d440ffd7 100644
--- a/client/src/components/ContentBlock.vue
+++ b/client/src/components/ContentBlock.vue
@@ -22,7 +22,9 @@
:key="component.id"
:component="component"
:parent="contentBlock.id"
- :bookmarks="contentBlock.bookmarks">
+ :bookmarks="contentBlock.bookmarks"
+ :notes="contentBlock.notes"
+ >
diff --git a/client/src/components/content-blocks/ContentComponent.vue b/client/src/components/content-blocks/ContentComponent.vue
index c1a9555a..1e329f02 100644
--- a/client/src/components/content-blocks/ContentComponent.vue
+++ b/client/src/components/content-blocks/ContentComponent.vue
@@ -2,8 +2,10 @@
+ :bookmarked="bookmarked"
+ :note="note">
@@ -33,7 +35,7 @@
import MODULE_DETAILS_QUERY from '@/graphql/gql/moduleDetailsQuery.gql';
export default {
- props: ['component', 'parent', 'bookmarks'],
+ props: ['component', 'parent', 'bookmarks', 'notes'],
components: {
'text_block': TextBlock,
@@ -58,6 +60,10 @@
computed: {
bookmarked() {
return !!this.bookmarks.find(bookmark => bookmark.uuid === this.component.id);
+ },
+ note() {
+ const bookmark = this.bookmarks.find(bookmark => bookmark.uuid === this.component.id);
+ return bookmark && bookmark.note;
}
},
@@ -68,6 +74,9 @@
contentBlock: this.parent
});
},
+ editNote() {
+ this.$store.dispatch('editNote', this.note);
+ },
bookmarkContent(uuid, bookmarked) {
this.$apollo.mutate({
mutation: UPDATE_CONTENT_BOOKMARK,
diff --git a/client/src/components/notes/BookmarkActions.vue b/client/src/components/notes/BookmarkActions.vue
index ea176496..816d4d9e 100644
--- a/client/src/components/notes/BookmarkActions.vue
+++ b/client/src/components/notes/BookmarkActions.vue
@@ -4,9 +4,11 @@
:class="{'bookmark-actions__action--bookmarked': bookmarked}">
-
+
-
+
+
+
@@ -17,7 +19,7 @@
import NoteIcon from '@/components/icons/NoteIcon';
export default {
- props: ['bookmarked'],
+ props: ['bookmarked', 'note'],
components: {
BookmarkIcon,
AddNoteIcon,
@@ -43,8 +45,9 @@
&__action {
opacity: 0;
transition: opacity 0.3s;
+ cursor: pointer;
- &--bookmarked {
+ &--bookmarked, &--noted {
opacity: 1;
}
}
diff --git a/client/src/components/notes/EditNoteWizard.vue b/client/src/components/notes/EditNoteWizard.vue
new file mode 100644
index 00000000..ce94c1c6
--- /dev/null
+++ b/client/src/components/notes/EditNoteWizard.vue
@@ -0,0 +1,46 @@
+