Skip to content

Commit

Permalink
Re-introduce weight adjustment for key results
Browse files Browse the repository at this point in the history
  • Loading branch information
petterhj committed Oct 4, 2023
1 parent f1d9320 commit d751533
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ All notable changes to this project will be documented in this file. The format
attempted form submissions.
- Administration of measurements has been moved to drawers and follows the same
pattern as when editing OKRs and other items.
- 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
11 changes: 11 additions & 0 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 v-if="!keyResult?.archived" #actions="{ handleSubmit, submitDisabled }">
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 @@ -370,7 +370,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 @@ -370,7 +370,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 d751533

Please sign in to comment.