Skip to content

Commit 2ab0db7

Browse files
authored
Merge pull request #5834 from espoon-voltti/discussion-time-employee-text-improvements
Parannuksia keskusteluaikojen kasvattajan käyttöliittymän muokkaustyökalujen indikointiin
2 parents 915d65f + 79fee20 commit 2ab0db7

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

frontend/src/employee-frontend/components/unit/tab-calendar/discussion-surveys/times-calendar/CalendarEventTimeReservation.tsx

+19-13
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import {
1818
import { ChildBasics } from 'lib-common/generated/api-types/placement'
1919
import { useMutation } from 'lib-common/query'
2020
import { UUID } from 'lib-common/types'
21-
import { LegacyButton } from 'lib-components/atoms/buttons/LegacyButton'
22-
import LegacyInlineButton from 'lib-components/atoms/buttons/LegacyInlineButton'
21+
import { Button } from 'lib-components/atoms/buttons/Button'
2322
import { MutateButton } from 'lib-components/atoms/buttons/MutateButton'
2423
import Select from 'lib-components/atoms/dropdowns/Select'
2524
import {
@@ -30,7 +29,7 @@ import BaseModal from 'lib-components/molecules/modals/BaseModal'
3029
import InfoModal from 'lib-components/molecules/modals/InfoModal'
3130
import { H2, H3, Label, fontWeights } from 'lib-components/typography'
3231
import { Gap, defaultMargins } from 'lib-components/white-space'
33-
import { faPlus, faQuestion, faTrash } from 'lib-icons'
32+
import { faPen, faPlus, faQuestion, faTrash } from 'lib-icons'
3433

3534
import {
3635
deleteCalendarEventTimeMutation,
@@ -57,7 +56,7 @@ const TimeSpan = styled.span`
5756
font-weight: ${fontWeights.bold};
5857
`
5958

60-
const ChildLinkButton = styled(LegacyInlineButton)`
59+
const ChildLinkButton = styled(Button)`
6160
text-wrap: pretty;
6261
text-align: start;
6362
`
@@ -80,12 +79,15 @@ export default React.memo(function CalendarEventTimeReservation({
8079
>
8180
<TimeSpan data-qa="event-time-range">{`${eventTime.startTime.format()}${eventTime.endTime.format()}`}</TimeSpan>
8281
<ChildLinkButton
82+
appearance="inline"
8383
onClick={() => reserveAction(eventTime)}
84+
order="text-icon"
8485
text={
8586
reservationChild
86-
? `${reservationChild.firstName} ${reservationChild.lastName}`
87+
? `${reservationChild.firstName} ${reservationChild.lastName}`
8788
: i18n.unit.calendar.events.discussionReservation.reserveButton
8889
}
90+
icon={faPen}
8991
data-qa="reserve-event-time-button"
9092
/>
9193
</ReservationRow>
@@ -207,7 +209,8 @@ export const DiscussionReservationModal = React.memo(
207209
<H3>{`${t.reservationModal.reservationStatus}: ${reservationChild.state.childId ? t.reservationModal.reserved : t.reservationModal.unreserved}`}</H3>
208210

209211
{viewMode === 'free' && (
210-
<LegacyInlineButton
212+
<Button
213+
appearance="inline"
211214
icon={faPlus}
212215
text={
213216
i18n.unit.calendar.events.discussionReservation.reserveButton
@@ -237,8 +240,9 @@ export const DiscussionReservationModal = React.memo(
237240
placeholder={t.reservationModal.selectPlaceholder}
238241
data-qa="reservee-select"
239242
/>
240-
<LegacyInlineButton
241-
text={i18n.common.remove}
243+
<Button
244+
appearance="inline"
245+
text={t.reservationModal.removeReservation}
242246
icon={faX}
243247
onClick={() => {
244248
reservationChild.set({ childId: null })
@@ -255,9 +259,10 @@ export const DiscussionReservationModal = React.memo(
255259
? `${savedChild.firstName} ${savedChild.lastName}`
256260
: ''}
257261
</span>
258-
<LegacyInlineButton
262+
<Button
263+
appearance="inline"
259264
icon={faX}
260-
text={i18n.common.remove}
265+
text={t.reservationModal.removeReservation}
261266
onClick={() => {
262267
reservationChild.set({ childId: null })
263268
setViewMode('free')
@@ -268,8 +273,9 @@ export const DiscussionReservationModal = React.memo(
268273

269274
<Gap size="X5L" />
270275
<FixedSpaceRow justifyContent="space-between">
271-
<LegacyInlineButton
272-
text={i18n.common.remove}
276+
<Button
277+
appearance="inline"
278+
text={t.reservationModal.removeDiscussionTime}
273279
onClick={() => {
274280
if (savedChild) {
275281
setDeleteConfirmModalVisible(true)
@@ -293,7 +299,7 @@ export const DiscussionReservationModal = React.memo(
293299
/>
294300

295301
<FixedSpaceRow justifyContent="flex-end" spacing="s">
296-
<LegacyButton
302+
<Button
297303
onClick={cancelChanges}
298304
data-qa="cancel"
299305
text={i18n.common.cancel}

frontend/src/lib-customizations/defaults/employee/i18n/fi.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -2383,6 +2383,8 @@ export const fi = {
23832383
),
23842384
reservationModal: {
23852385
reservationStatus: 'Varaustilanne',
2386+
removeReservation: 'Poista varaus',
2387+
removeDiscussionTime: 'Poista keskusteluaika',
23862388
reserved: 'Varattu',
23872389
unreserved: 'Vapaa',
23882390
selectPlaceholder: 'Valitse',

0 commit comments

Comments
 (0)