diff --git a/client/src/components/content-blocks/assignment/Assignment.vue b/client/src/components/content-blocks/assignment/Assignment.vue index f9377696..fa17e957 100644 --- a/client/src/components/content-blocks/assignment/Assignment.vue +++ b/client/src/components/content-blocks/assignment/Assignment.vue @@ -28,6 +28,7 @@
{ + this.unsaved = false; }); }, 500), + saveInput: function (answer) { + this.unsaved = true; + /* + We update the assignment on this component, so the changes are reflected on it. The server does not return + the updated entity, to prevent the UI to update when the user is entering his input + */ + this.assignment = Object.assign({}, this.assignment, { + submission: { + ...this.submission, + text: answer + } + }); + this._save(answer); + }, turnIn() { this.$apollo.mutate({ mutation: UPDATE_ASSIGNMENT_MUTATION, @@ -121,7 +138,8 @@ final: false } }, - inputType: 'text' + inputType: 'text', + unsaved: false } } } diff --git a/client/src/components/content-blocks/assignment/SubmissionForm.vue b/client/src/components/content-blocks/assignment/SubmissionForm.vue index dc5920e1..b2b42d0e 100644 --- a/client/src/components/content-blocks/assignment/SubmissionForm.vue +++ b/client/src/components/content-blocks/assignment/SubmissionForm.vue @@ -8,7 +8,7 @@ >
- Alle Änderungen gespeichert + Alle Änderungen gespeichert {{saved}}