Skip to content

Commit

Permalink
Adding tabTitles, removing unused messages, fixing occupation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ballioli committed Jan 8, 2025
1 parent 7545c76 commit 609698b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ export const Occupation: FC<
}

const onChangeMajorGroup = (value?: EventOption) => {
setValue(`employee[${idx}].victimsOccupation`, undefined)

if (!value || !value.value || !value.label) return
const selectedGroup: Options = {
value: value.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { conclusion } from '../../../lib/messages'
export const conclusionSection = buildSection({
id: 'conclusion',
title: '',
tabTitle: conclusion.general.title,
children: [
buildMultiField({
id: 'uiForms.conclusionMultifield',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
buildSubmitField,
coreMessages,
} from '@island.is/application/core'
import { externalData } from '../../lib/messages'
import { externalData, shared } from '../../lib/messages'
import {
UserProfileApi,
IdentityApi,
Expand All @@ -16,6 +16,7 @@ import { DefaultEvents } from '@island.is/application/types'
export const prerequisitesSection = buildSection({
id: 'externalData',
title: '',
tabTitle: shared.application.prereqTabTitle,
children: [
buildExternalDataProvider({
id: 'externalData',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,6 @@
import { defineMessages } from 'react-intl'

export const sections = {
prerequisites: defineMessages({
dataFetching: {
id: 'aosh.wan.application:sections.prerequisites.dataFetching',
defaultMessage: 'Gagnaöflun',
description: 'Title of external data section (right side panel)',
},
information: {
id: 'aosh.wan.application:sections.prerequisites.pageTitle',
defaultMessage: 'Tilkynningaraðili',
description: `Title of company section (right side panel)`,
},
accident: {
id: 'aosh.wan.application:sections.prerequisites.accident',
defaultMessage: 'Slysið',
description: 'Title of the accident section (right side panel)',
},
employee: {
id: 'aosh.wan.application:sections.prerequisites.employee',
defaultMessage: 'Starfsmaður',
description: 'Title of the employee setion (right side panel)',
},
overview: {
id: 'aosh.wan.application:sections.prerequisites.overview',
defaultMessage: 'Yfirlit',
description: 'Title of the overview setion (right side panel)',
},
conclusion: {
id: 'aosh.wan.application:sections.prerequisites.conclusion',
defaultMessage: 'Staðfesting',
description: 'Title of the conclusion setion (right side panel)',
},
}),
draft: defineMessages({
dataFetching: {
id: 'aosh.wan.application:sections.draft.dataFetching',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export const shared = {
description:
'Description of application state/status when the application is in prerequisites',
},
prereqTabTitle: {
id: 'aosh.wan.application:shared.application.prereqTabTitle',
defaultMessage: 'Gagnaöflun',
description: 'Title of prerequisites tab',
},
}),
options: defineMessages({
no: {
Expand Down

0 comments on commit 609698b

Please sign in to comment.