From 707df76b7055033730dc9ea703b18d6a2f1be802 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Mon, 31 May 2021 02:25:07 +0200 Subject: [PATCH] Add GUI support for saving planner remarks. They get saved to `/project/:project/info/plan/remarks`. --- lib/www/client/source/src/views/Plan.vue | 70 ++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/lib/www/client/source/src/views/Plan.vue b/lib/www/client/source/src/views/Plan.vue index 62a4a80..665909d 100644 --- a/lib/www/client/source/src/views/Plan.vue +++ b/lib/www/client/source/src/views/Plan.vue @@ -30,6 +30,47 @@ + + + + Comments + + + + + + + + + + res = r]); + } else { + const init = { + method: "DELETE" + }; + await this.api([url, init, (e, r) => res = r]); + } + if (res && res.ok) { + this.editRemarks = false; + } + }, async getPlannedLines () { @@ -635,6 +699,11 @@ export default { } }, + async getPlannerRemarks () { + const url = `/project/${this.$route.params.project}/info/plan/remarks`; + this.remarks = await this.api([url]) || ""; + }, + async getSequences () { const url = `/project/${this.$route.params.project}/sequence`; this.sequences = await this.api([url]) || []; @@ -652,6 +721,7 @@ export default { async mounted () { await this.getPlannerConfig(); this.getPlannedLines(); + this.getPlannerRemarks(); } }