@@ -35,6 +35,7 @@ type ConfirmationBusinessProps = ConfirmationBusinessOnyxProps & SubStepProps;
35
35
type States = keyof typeof COMMON_CONST . STATES ;
36
36
37
37
const BUSINESS_INFO_STEP_KEYS = CONST . BANK_ACCOUNT . BUSINESS_INFO_STEP . INPUT_KEY ;
38
+ const BUSINESS_INFO_STEP_INDEXES = CONST . REIMBURSEMENT_ACCOUNT_SUBSTEP_INDEX . BUSINESS_INFO ;
38
39
39
40
const validate = ( values : ReimbursementAccountDraftValues ) : OnyxCommon . Errors => {
40
41
const errors = ValidationUtils . getFieldRequiredErrors ( values , [ BUSINESS_INFO_STEP_KEYS . HAS_NO_CONNECTION_TO_CANNABIS ] ) ;
@@ -66,15 +67,15 @@ function ConfirmationBusiness({reimbursementAccount, reimbursementAccountDraft,
66
67
title = { values [ BUSINESS_INFO_STEP_KEYS . COMPANY_NAME ] }
67
68
shouldShowRightIcon
68
69
onPress = { ( ) => {
69
- onMove ( 0 ) ;
70
+ onMove ( BUSINESS_INFO_STEP_INDEXES . BUSINESS_NAME ) ;
70
71
} }
71
72
/>
72
73
< MenuItemWithTopDescription
73
74
description = { translate ( 'businessInfoStep.taxIDNumber' ) }
74
75
title = { values [ BUSINESS_INFO_STEP_KEYS . COMPANY_TAX_ID ] }
75
76
shouldShowRightIcon
76
77
onPress = { ( ) => {
77
- onMove ( 1 ) ;
78
+ onMove ( BUSINESS_INFO_STEP_INDEXES . TAX_ID_NUMBER ) ;
78
79
} }
79
80
/>
80
81
< MenuItemWithTopDescription
@@ -84,47 +85,47 @@ function ConfirmationBusiness({reimbursementAccount, reimbursementAccountDraft,
84
85
} `}
85
86
shouldShowRightIcon
86
87
onPress = { ( ) => {
87
- onMove ( 4 ) ;
88
+ onMove ( BUSINESS_INFO_STEP_INDEXES . COMPANY_ADDRESS ) ;
88
89
} }
89
90
/>
90
91
< MenuItemWithTopDescription
91
92
description = { translate ( 'common.phoneNumber' ) }
92
93
title = { values [ BUSINESS_INFO_STEP_KEYS . COMPANY_PHONE ] }
93
94
shouldShowRightIcon
94
95
onPress = { ( ) => {
95
- onMove ( 3 ) ;
96
+ onMove ( BUSINESS_INFO_STEP_INDEXES . PHONE_NUMBER ) ;
96
97
} }
97
98
/>
98
99
< MenuItemWithTopDescription
99
100
description = { translate ( 'businessInfoStep.companyWebsite' ) }
100
101
title = { values [ BUSINESS_INFO_STEP_KEYS . COMPANY_WEBSITE ] }
101
102
shouldShowRightIcon
102
103
onPress = { ( ) => {
103
- onMove ( 2 ) ;
104
+ onMove ( BUSINESS_INFO_STEP_INDEXES . COMPANY_WEBSITE ) ;
104
105
} }
105
106
/>
106
107
< MenuItemWithTopDescription
107
108
description = { translate ( 'businessInfoStep.companyType' ) }
108
109
title = { translate ( `businessInfoStep.incorporationType.${ values [ BUSINESS_INFO_STEP_KEYS . INCORPORATION_TYPE ] } ` as TranslationPaths ) }
109
110
shouldShowRightIcon
110
111
onPress = { ( ) => {
111
- onMove ( 5 ) ;
112
+ onMove ( BUSINESS_INFO_STEP_INDEXES . COMPANY_TYPE ) ;
112
113
} }
113
114
/>
114
115
< MenuItemWithTopDescription
115
116
description = { translate ( 'businessInfoStep.incorporationDate' ) }
116
117
title = { values [ BUSINESS_INFO_STEP_KEYS . INCORPORATION_DATE ] }
117
118
shouldShowRightIcon
118
119
onPress = { ( ) => {
119
- onMove ( 6 ) ;
120
+ onMove ( BUSINESS_INFO_STEP_INDEXES . INCORPORATION_DATE ) ;
120
121
} }
121
122
/>
122
123
< MenuItemWithTopDescription
123
124
description = { translate ( 'businessInfoStep.incorporationState' ) }
124
125
title = { translate ( `allStates.${ values [ BUSINESS_INFO_STEP_KEYS . INCORPORATION_STATE ] as States } .stateName` ) }
125
126
shouldShowRightIcon
126
127
onPress = { ( ) => {
127
- onMove ( 7 ) ;
128
+ onMove ( BUSINESS_INFO_STEP_INDEXES . INCORPORATION_STATE ) ;
128
129
} }
129
130
/>
130
131
< FormProvider
0 commit comments