From 565f3d1fb4580f504104a3d838548356f5313894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Mon, 22 Jun 2020 15:41:00 +0200 Subject: [PATCH] Fix questions & submissions assignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- src/views/Results.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/Results.vue b/src/views/Results.vue index 815d791..9fc2da7 100644 --- a/src/views/Results.vue +++ b/src/views/Results.vue @@ -172,17 +172,19 @@ export default { async loadFormResults() { this.loadingResults = true - console.debug('Loading Results') + console.debug('Loading results for form', this.form.hash) try { const response = await axios.get(generateUrl('/apps/forms/api/v1/submissions/{hash}', { hash: this.form.hash, })) - this.form.submissions = response.data.submissions - this.form.questions = response.data.questions + + // Append questions & submissions + this.$set(this.form, 'submissions', response.data.submissions) + this.$set(this.form, 'questions', response.data.questions) } catch (error) { console.error(error) - showError(t('forms', 'There was an error while loading results')) + showError(t('forms', 'There was an error while loading the results')) } finally { this.loadingResults = false }