Skip to content

Commit

Permalink
Merge branch 'main' into three-pane-okrs
Browse files Browse the repository at this point in the history
  • Loading branch information
simenheg committed Oct 9, 2023
2 parents 6e058bb + 724bc3b commit 0257809
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ All notable changes to this project will be documented in this file. The format
objectives in a list (and see combined progression), the meta key must now be
pressed while selecting one or more objectives.
- Key results can now be rearranged by drag and drop.
- It is now again possible to adjust the weight of each key result used in the
calculation of overall progression of an objective.

### Removed

Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 20 additions & 3 deletions src/components/drawers/EditKeyResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@
class="pkt-cell pkt-cell--span6"
/>
</div>

<form-component
v-model.number="thisKeyResult.weight"
input-type="input"
name="weight"
:label="$t('keyResult.weight.label')"
rules="required|decimal|positiveNotZero"
type="number"
>
<template #help><span v-html="$t('keyResult.weight.help')" /></template>
</form-component>
</template>

<template
Expand Down Expand Up @@ -122,7 +133,7 @@
<pkt-button
skin="secondary"
@onClick="
thisKeyResult = {};
thisKeyResult = { ...keyResultDefaults };
reset();
"
>
Expand Down Expand Up @@ -194,6 +205,9 @@ export default {
data: () => ({
thisKeyResult: null,
keyResultDefaults: {
weight: 1,
},
pageCount: 2,
loading: false,
}),
Expand Down Expand Up @@ -257,7 +271,7 @@ export default {
}
if (!this.keyResult) {
this.thisKeyResult = {};
this.thisKeyResult = { ...this.keyResultDefaults };
return;
}
Expand All @@ -266,7 +280,10 @@ export default {
.doc(this.keyResult.id)
.get()
.then((snapshot) => {
this.thisKeyResult = snapshot.data();
this.thisKeyResult = {
...this.keyResultDefaults,
...snapshot.data(),
};
this.thisKeyResult.id = this.keyResult.id;
this.loading = false;
});
Expand Down
5 changes: 4 additions & 1 deletion src/locale/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@
"chooseDate": "Select date",
"belongsTo": "Related objective",
"numberOfUpdates": "Update count",
"weight": "Weight",
"weight": {
"label": "Weight",
"help": "Progression for each key result is by default weighted equally (1) when calculating the overall progression for an objective. It is possible to override this for each key result individually by changing the value below."
},
"automatic": "Automatic",
"autoHelpText": "The value for this key result gets updated automatically from Google Sheets.",
"autoError": "Issue fetching data from Google Sheets:",
Expand Down
5 changes: 4 additions & 1 deletion src/locale/locales/nb-NO.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@
"chooseDate": "Velg dato",
"belongsTo": "Tilhører mål",
"numberOfUpdates": "Antall oppdateringer",
"weight": "Vekt",
"weight": {
"label": "Vekt",
"help": "I utregningen av samlet progresjon for et mål vektes i utgangspunktet progresjonen for hvert nøkkelresultat likt (1). Det er imidlertid mulig å overstyre dette for hvert enkelt nøkkelresultat ved å endre tallverdien under."
},
"automatic": "Oppdateres automatisk",
"autoHelpText": "Verdien til dette nøkkelresultatet oppdateres automatisk fra et Google Sheets-dokument.",
"autoError": "Feil i henting av data fra Google Sheets:",
Expand Down

0 comments on commit 0257809

Please sign in to comment.