Skip to content

Commit 8aeeb13

Browse files
committed
fix: mapping in onboarding add experience modal
1 parent 1364dbd commit 8aeeb13

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

src/apps/onboarding/src/components/modal-add-work/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import classNames from 'classnames'
44
import moment from 'moment'
55

66
import { Button, IconSolid, InputDatePicker, InputSelect, InputText, Tooltip } from '~/libs/ui'
7-
import { INDUSTRIES_OPTIONS } from '~/libs/shared'
7+
import { getIndustryOptionLabels, getIndustryOptionValues, INDUSTRIES_OPTIONS } from '~/libs/shared'
88

99
import FormInputCheckbox from '../form-input-checkbox'
1010
import OnboardingBaseModal from '../onboarding-base-modal'
@@ -23,8 +23,8 @@ interface ModalAddWorkProps {
2323

2424
const industryOptions: any = _.sortBy(INDUSTRIES_OPTIONS)
2525
.map(v => ({
26-
label: v,
27-
value: v,
26+
label: getIndustryOptionLabels(v),
27+
value: getIndustryOptionValues(v),
2828
}))
2929

3030
const ModalAddWork: FC<ModalAddWorkProps> = (props: ModalAddWorkProps) => {

src/apps/profiles/src/member-profile/work-expirence/ModifyWorkExpirenceModal/ModifyWorkExpirenceModal.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ import {
1111
UserTraitCategoryNames,
1212
UserTraitIds,
1313
} from '~/libs/core'
14-
import { INDUSTRIES_OPTIONS } from '~/libs/shared'
14+
import { getIndustryOptionLabels, getIndustryOptionValues, INDUSTRIES_OPTIONS } from '~/libs/shared'
1515

1616
import { WorkExpirenceCard } from '../WorkExpirenceCard'
17-
import { getIndustryOptionLabels, getIndustryOptionValues } from '../WorkExperience.utils'
1817

1918
import styles from './ModifyWorkExpirenceModal.module.scss'
2019

src/apps/profiles/src/member-profile/work-expirence/WorkExpirenceCard/WorkExpirenceCard.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import classNames from 'classnames'
33
import moment from 'moment'
44

55
import { UserTrait } from '~/libs/core'
6-
7-
import { getIndustryOptionLabels } from '../WorkExperience.utils'
6+
import { getIndustryOptionLabels } from '~/libs/shared'
87

98
import styles from './WorkExpirenceCard.module.scss'
109

src/libs/shared/lib/utils/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ export * from './copy-text-to-clipboard'
22
export * from './files'
33
export * from './generic-data-object.type'
44
export * from './handle-error'
5+
export * from './industry'
56
export * from './string'
67
export * from './text-format'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const IndustryEnumToLabel: {
2-
[key: string]: string
2+
[key: string]: string
33
} = {
44
ConsumerGoods: 'Consumer goods',
55
PublicSector: 'Public sector',
@@ -8,7 +8,7 @@ export const IndustryEnumToLabel: {
88
}
99

1010
export const IndustryLabelToEnum: {
11-
[key: string]: string
11+
[key: string]: string
1212
} = {
1313
'Consumer goods': 'ConsumerGoods',
1414
'Public sector': 'PublicSector',

0 commit comments

Comments
 (0)