@@ -1219,27 +1219,6 @@ function createTypeMenuSections(session: OnyxTypes.Session | undefined, policies
12191219 return isPolicyApprover || isSubmittedTo ;
12201220 } ) . length > 0 ;
12211221
1222- const showPaySuggestion =
1223- Object . values ( policies ) . filter < OnyxTypes . Policy > ( ( policy ) : policy is OnyxTypes . Policy => {
1224- if ( ! policy || ! isPaidGroupPolicy ( policy ) ) {
1225- return false ;
1226- }
1227-
1228- const reimburser = policy . reimburser ;
1229- const isReimburser = reimburser === email ;
1230- const isAdmin = policy . role === CONST . POLICY . ROLE . ADMIN ;
1231-
1232- if ( policy . reimbursementChoice === CONST . POLICY . REIMBURSEMENT_CHOICES . REIMBURSEMENT_YES ) {
1233- return reimburser ? isReimburser : isAdmin ;
1234- }
1235-
1236- if ( policy . reimbursementChoice === CONST . POLICY . REIMBURSEMENT_CHOICES . REIMBURSEMENT_MANUAL ) {
1237- return isAdmin ;
1238- }
1239-
1240- return false ;
1241- } ) . length > 0 ;
1242-
12431222 // TODO: This option will be enabled soon (removing the && false). We are waiting on changes to support this
12441223 // feature fully, but lets keep the code here for simplicity
12451224 // https://github.com/Expensify/Expensify/issues/505933
@@ -1258,11 +1237,7 @@ function createTypeMenuSections(session: OnyxTypes.Session | undefined, policies
12581237 return isIntacctExporter || isNetSuiteExporter || isQuickbooksDesktopExporter || isQuickbooksOnlineExporter || isXeroExporter ;
12591238 } ) . length > 0 && false ;
12601239
1261- // We suggest specific filters for users based on their access in specific policies. Show the todo section
1262- // only if any of these items are available
1263- const showTodoSection = showSubmitSuggestion || showApproveSuggestion || showPaySuggestion || showExportSuggestion ;
1264-
1265- if ( showTodoSection && session ) {
1240+ if ( session ) {
12661241 const section : SearchTypeMenuSection = {
12671242 translationPath : 'common.todo' ,
12681243 menuItems : [ ] ,
@@ -1345,27 +1320,26 @@ function createTypeMenuSections(session: OnyxTypes.Session | undefined, policies
13451320 } ) ;
13461321 }
13471322
1348- if ( showPaySuggestion ) {
1349- section . menuItems . push ( {
1350- translationPath : 'search.bulkActions.pay' ,
1351- type : CONST . SEARCH . DATA_TYPES . EXPENSE ,
1352- icon : Expensicons . MoneyBag ,
1353- emptyState : {
1354- headerMedia : DotLottieAnimations . Fireworks ,
1355- title : 'search.searchResults.emptyPayResults.title' ,
1356- subtitle : 'search.searchResults.emptyPayResults.subtitle' ,
1357- } ,
1358- getSearchQuery : ( ) => {
1359- const queryString = buildQueryStringFromFilterFormValues ( {
1360- type : CONST . SEARCH . DATA_TYPES . EXPENSE ,
1361- groupBy : CONST . SEARCH . GROUP_BY . REPORTS ,
1362- action : CONST . SEARCH . ACTION . PAY ,
1363- payer : session . accountID ?. toString ( ) ,
1364- } ) ;
1365- return queryString ;
1366- } ,
1367- } ) ;
1368- }
1323+ // Always show pay, since any user can pay p2p requests
1324+ section . menuItems . push ( {
1325+ translationPath : 'search.bulkActions.pay' ,
1326+ type : CONST . SEARCH . DATA_TYPES . EXPENSE ,
1327+ icon : Expensicons . MoneyBag ,
1328+ emptyState : {
1329+ headerMedia : DotLottieAnimations . Fireworks ,
1330+ title : 'search.searchResults.emptyPayResults.title' ,
1331+ subtitle : 'search.searchResults.emptyPayResults.subtitle' ,
1332+ } ,
1333+ getSearchQuery : ( ) => {
1334+ const queryString = buildQueryStringFromFilterFormValues ( {
1335+ type : CONST . SEARCH . DATA_TYPES . EXPENSE ,
1336+ groupBy : CONST . SEARCH . GROUP_BY . REPORTS ,
1337+ action : CONST . SEARCH . ACTION . PAY ,
1338+ payer : session . accountID ?. toString ( ) ,
1339+ } ) ;
1340+ return queryString ;
1341+ } ,
1342+ } ) ;
13691343
13701344 if ( showExportSuggestion ) {
13711345 section . menuItems . push ( {
0 commit comments