diff options
Diffstat (limited to 'src/components/user_note/user_note.js')
| -rw-r--r-- | src/components/user_note/user_note.js | 17 |
1 files changed, 15 insertions, 2 deletions
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 + }) } } } |
