Skip to content

Commit

Permalink
Set default weight for key results
Browse files Browse the repository at this point in the history
  • Loading branch information
petterhj committed Oct 4, 2023
1 parent 51b2092 commit fedd74e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/drawers/EditKeyResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<pkt-button
skin="secondary"
@onClick="
thisKeyResult = {};
thisKeyResult = { ...keyResultDefaults };
reset();
"
>
Expand Down Expand Up @@ -202,6 +202,9 @@ export default {
data: () => ({
thisKeyResult: null,
keyResultDefaults: {
weight: 1,
},
pageCount: 2,
loading: false,
}),
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit fedd74e

Please sign in to comment.