Skip to content

Commit

Permalink
fixes based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
msavolainen-gofore committed Dec 23, 2024
1 parent af56d75 commit 7cbe86f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Link } from 'react-router'
import styled from 'styled-components'

import { Result, wrapResult } from 'lib-common/api'
import { swapElements } from 'lib-common/array'
import DateRange from 'lib-common/date-range'
import {
Address,
Expand Down Expand Up @@ -730,15 +731,13 @@ export default React.memo(function ApplicationEditView({
<Button
appearance="inline"
icon={faArrowUp}
text={i18n.documentTemplates.templateEditor.moveUp}
text={i18n.application.preferences.moveUp}
onClick={() =>
setApplication(
set('form.preferences.preferredUnits', [
...preferredUnits.slice(0, i - 1),
unit,
...preferredUnits.slice(i - 1, i),
...preferredUnits.slice(i + 1)
])
set(
'form.preferences.preferredUnits',
swapElements(preferredUnits, i, i - 1)
)
)
}
disabled={i == 0}
Expand All @@ -747,15 +746,13 @@ export default React.memo(function ApplicationEditView({
<Button
appearance="inline"
icon={faArrowDown}
text={i18n.documentTemplates.templateEditor.moveDown}
text={i18n.application.preferences.moveDown}
onClick={() =>
setApplication(
set('form.preferences.preferredUnits', [
...preferredUnits.slice(0, i),
...preferredUnits.slice(i + 1, i + 2),
unit,
...preferredUnits.slice(i + 2)
])
set(
'form.preferences.preferredUnits',
swapElements(preferredUnits, i, i + 1)
)
)
}
disabled={i == preferredUnits.length - 1}
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib-customizations/defaults/employee/i18n/fi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ export const fi = {
preferences: {
title: 'Hakutoive',
preferredUnits: 'Hakutoiveet',
moveUp: 'Siirrä ylös',
moveDown: 'Siirrä alas',
missingPreferredUnits: 'Valitse vähintään yksi hakutoive',
unitMismatch: 'Hakutoiveet eivät vastaa haettavia yksiköitä',
unitsOnMap: 'Yksiköt kartalla',
Expand Down

0 comments on commit 7cbe86f

Please sign in to comment.