diff --git a/src/components/user_note/user_note.js b/src/components/user_note/user_note.js index 6a479800..dc5b8e71 100644 --- a/src/components/user_note/user_note.js +++ b/src/components/user_note/user_note.js @@ -6,7 +6,8 @@ const UserNote = { data () { return { localNote: '', - editing: false + editing: false, + frozen: false } }, computed: { @@ -23,7 +24,19 @@ const UserNote = { this.editing = false }, finalizeEditing () { - this.editing = false + this.frozen = true + + this.$store.dispatch('editUserNote', { + id: this.user.id, + comment: this.localNote + }) + .then(() => { + this.frozen = false + this.editing = false + }) + .catch(() => { + this.frozen = false + }) } } } diff --git a/src/components/user_note/user_note.vue b/src/components/user_note/user_note.vue index 46db1ca7..a8f3fb10 100644 --- a/src/components/user_note/user_note.vue +++ b/src/components/user_note/user_note.vue @@ -15,6 +15,7 @@