@@ -3,6 +3,7 @@ import {View} from 'react-native';
3
3
import type { OnyxEntry } from 'react-native-onyx' ;
4
4
import { useOnyx } from 'react-native-onyx' ;
5
5
import useLocalize from '@hooks/useLocalize' ;
6
+ import usePermissions from '@hooks/usePermissions' ;
6
7
import useThemeStyles from '@hooks/useThemeStyles' ;
7
8
import Navigation from '@libs/Navigation/Navigation' ;
8
9
import * as OptionsListUtils from '@libs/OptionsListUtils' ;
@@ -46,12 +47,18 @@ function ReportWelcomeText({report, policy}: ReportWelcomeTextProps) {
46
47
const welcomeMessage = SidebarUtils . getWelcomeMessage ( report , policy ) ;
47
48
const moneyRequestOptions = ReportUtils . temporary_getMoneyRequestOptions ( report , policy , participantAccountIDs ) ;
48
49
const canEditReportDescription = ReportUtils . canEditReportDescription ( report , policy ) ;
50
+ const { canUseCombinedTrackSubmit} = usePermissions ( ) ;
49
51
const filteredOptions = moneyRequestOptions . filter (
50
52
( item ) : item is Exclude < IOUType , typeof CONST . IOU . TYPE . REQUEST | typeof CONST . IOU . TYPE . SEND | typeof CONST . IOU . TYPE . CREATE | typeof CONST . IOU . TYPE . INVOICE > =>
51
53
item !== CONST . IOU . TYPE . INVOICE ,
52
54
) ;
53
55
const additionalText = filteredOptions
54
- . map ( ( item , index ) => `${ index === filteredOptions . length - 1 && index > 0 ? `${ translate ( 'common.or' ) } ` : '' } ${ translate ( `reportActionsView.iouTypes.${ item } ` ) } ` )
56
+ . map (
57
+ ( item , index ) =>
58
+ `${ index === filteredOptions . length - 1 && index > 0 ? `${ translate ( 'common.or' ) } ` : '' } ${ translate (
59
+ canUseCombinedTrackSubmit && item === 'submit' ? `reportActionsView.create` : `reportActionsView.iouTypes.${ item } ` ,
60
+ ) } `,
61
+ )
55
62
. join ( ', ' ) ;
56
63
const canEditPolicyDescription = ReportUtils . canEditPolicyDescription ( policy ) ;
57
64
const reportName = ReportUtils . getReportName ( report ) ;
0 commit comments