From fedd74eb00a8531026cf4aa7a47a9143e3352e3e Mon Sep 17 00:00:00 2001 From: "Petter H. Juliussen" Date: Wed, 4 Oct 2023 16:14:17 +0200 Subject: [PATCH] Set default weight for key results --- src/components/drawers/EditKeyResult.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/drawers/EditKeyResult.vue b/src/components/drawers/EditKeyResult.vue index 8dbc47550..ba742d1b0 100644 --- a/src/components/drawers/EditKeyResult.vue +++ b/src/components/drawers/EditKeyResult.vue @@ -130,7 +130,7 @@ @@ -202,6 +202,9 @@ export default { data: () => ({ thisKeyResult: null, + keyResultDefaults: { + weight: 1, + }, pageCount: 2, loading: false, }), @@ -260,7 +263,10 @@ export default { this.thisKeyResult = null; return; } - this.thisKeyResult = this.keyResult ? { ...this.keyResult } : {}; + + this.thisKeyResult = this.keyResult + ? { ...this.keyResultDefaults, ...this.keyResult } + : { ...this.keyResultDefaults }; }, }, // thisLevel: {