@@ -35,6 +35,7 @@ type ConfirmationBusinessProps = ConfirmationBusinessOnyxProps & SubStepProps;
3535type States = keyof typeof COMMON_CONST . STATES ;
3636
3737const 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 ;
3839
3940const validate = ( values : ReimbursementAccountDraftValues ) : OnyxCommon . Errors => {
4041 const errors = ValidationUtils . getFieldRequiredErrors ( values , [ BUSINESS_INFO_STEP_KEYS . HAS_NO_CONNECTION_TO_CANNABIS ] ) ;
@@ -66,15 +67,15 @@ function ConfirmationBusiness({reimbursementAccount, reimbursementAccountDraft,
6667 title = { values [ BUSINESS_INFO_STEP_KEYS . COMPANY_NAME ] }
6768 shouldShowRightIcon
6869 onPress = { ( ) => {
69- onMove ( 0 ) ;
70+ onMove ( BUSINESS_INFO_STEP_INDEXES . BUSINESS_NAME ) ;
7071 } }
7172 />
7273 < MenuItemWithTopDescription
7374 description = { translate ( 'businessInfoStep.taxIDNumber' ) }
7475 title = { values [ BUSINESS_INFO_STEP_KEYS . COMPANY_TAX_ID ] }
7576 shouldShowRightIcon
7677 onPress = { ( ) => {
77- onMove ( 1 ) ;
78+ onMove ( BUSINESS_INFO_STEP_INDEXES . TAX_ID_NUMBER ) ;
7879 } }
7980 />
8081 < MenuItemWithTopDescription
@@ -84,47 +85,47 @@ function ConfirmationBusiness({reimbursementAccount, reimbursementAccountDraft,
8485 } `}
8586 shouldShowRightIcon
8687 onPress = { ( ) => {
87- onMove ( 4 ) ;
88+ onMove ( BUSINESS_INFO_STEP_INDEXES . COMPANY_ADDRESS ) ;
8889 } }
8990 />
9091 < MenuItemWithTopDescription
9192 description = { translate ( 'common.phoneNumber' ) }
9293 title = { values [ BUSINESS_INFO_STEP_KEYS . COMPANY_PHONE ] }
9394 shouldShowRightIcon
9495 onPress = { ( ) => {
95- onMove ( 3 ) ;
96+ onMove ( BUSINESS_INFO_STEP_INDEXES . PHONE_NUMBER ) ;
9697 } }
9798 />
9899 < MenuItemWithTopDescription
99100 description = { translate ( 'businessInfoStep.companyWebsite' ) }
100101 title = { values [ BUSINESS_INFO_STEP_KEYS . COMPANY_WEBSITE ] }
101102 shouldShowRightIcon
102103 onPress = { ( ) => {
103- onMove ( 2 ) ;
104+ onMove ( BUSINESS_INFO_STEP_INDEXES . COMPANY_WEBSITE ) ;
104105 } }
105106 />
106107 < MenuItemWithTopDescription
107108 description = { translate ( 'businessInfoStep.companyType' ) }
108109 title = { translate ( `businessInfoStep.incorporationType.${ values [ BUSINESS_INFO_STEP_KEYS . INCORPORATION_TYPE ] } ` as TranslationPaths ) }
109110 shouldShowRightIcon
110111 onPress = { ( ) => {
111- onMove ( 5 ) ;
112+ onMove ( BUSINESS_INFO_STEP_INDEXES . COMPANY_TYPE ) ;
112113 } }
113114 />
114115 < MenuItemWithTopDescription
115116 description = { translate ( 'businessInfoStep.incorporationDate' ) }
116117 title = { values [ BUSINESS_INFO_STEP_KEYS . INCORPORATION_DATE ] }
117118 shouldShowRightIcon
118119 onPress = { ( ) => {
119- onMove ( 6 ) ;
120+ onMove ( BUSINESS_INFO_STEP_INDEXES . INCORPORATION_DATE ) ;
120121 } }
121122 />
122123 < MenuItemWithTopDescription
123124 description = { translate ( 'businessInfoStep.incorporationState' ) }
124125 title = { translate ( `allStates.${ values [ BUSINESS_INFO_STEP_KEYS . INCORPORATION_STATE ] as States } .stateName` ) }
125126 shouldShowRightIcon
126127 onPress = { ( ) => {
127- onMove ( 7 ) ;
128+ onMove ( BUSINESS_INFO_STEP_INDEXES . INCORPORATION_STATE ) ;
128129 } }
129130 />
130131 < FormProvider
0 commit comments