Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
58f400a
Add Payer search filter UI, table column, sorting, and export
c3024 Aug 11, 2026
0c5e6f1
Ignore canceled payments when deriving the payer column
c3024 Aug 12, 2026
b4fd2f2
Void the payer on ACH cancellations and bounces too
c3024 Aug 12, 2026
1e64d43
Ignore owner receipt confirmations when deriving the payer column
c3024 Aug 12, 2026
d375094
Break payer action ties by reportActionID to match the backend
c3024 Aug 12, 2026
c20a981
Resolve the payer from payment actions only on paid reports
c3024 Aug 12, 2026
70d2cce
Resolve self-payments as payer unless the owner confirmed receipt
c3024 Aug 12, 2026
9577829
Bound the owner receipt-confirmation check to the payment action time
c3024 Aug 12, 2026
16d5153
Split the paid-by concept from the payer filter
c3024 Aug 12, 2026
c6194f2
Show paid-by as the user-friendly key in search suggestions
c3024 Aug 12, 2026
38d41c7
Simplify paid-by derivation to the payment action shipped in the snap…
c3024 Aug 17, 2026
03abca5
Merge remote-tracking branch 'origin/main' into chaitanya/670393-paye…
c3024 Aug 17, 2026
eb3ee09
Merge remote-tracking branch 'refs/remotes/origin/main' into chaitany…
c3024 Aug 18, 2026
159592d
Fix paid-by filter display in filter bar and saved search page
c3024 Aug 19, 2026
2963548
Merge branch 'main' into chaitanya/670393-payer-search-filter
c3024 Aug 24, 2026
1eadd2e
Merge remote-tracking branch 'origin/main' into chaitanya/670393-paye…
c3024 Aug 28, 2026
318617d
Show user names for negated paid-by filter chip
c3024 Aug 28, 2026
3e6b205
Support multi-word name suggestions for paid-by autocomplete
c3024 Aug 28, 2026
e418827
Trim typed paid-by value when selecting an autocomplete suggestion
c3024 Aug 28, 2026
fe5c485
fix: replace type assertions with find-based narrowing in getTrimmedU…
c3024 Aug 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7188,6 +7188,7 @@ const CONST = {
APPROVED: this.TABLE_COLUMNS.APPROVED,
FIRST_APPROVER: this.TABLE_COLUMNS.FIRST_APPROVER,
FIRST_APPROVED: this.TABLE_COLUMNS.FIRST_APPROVED,
PAID_BY: this.TABLE_COLUMNS.PAID_BY,
EXPORTED: this.TABLE_COLUMNS.EXPORTED,
STATUS: this.TABLE_COLUMNS.STATUS,
PAID_STATUS: this.TABLE_COLUMNS.PAID_STATUS,
Expand Down Expand Up @@ -7384,6 +7385,7 @@ const CONST = {
APPROVED: 'approved',
FIRST_APPROVER: 'firstapprover',
FIRST_APPROVED: 'firstapproved',
PAID_BY: 'paidBy',
POSTED: 'posted',
EXPORTED: 'exported',
MERCHANT: 'merchant',
Expand Down Expand Up @@ -7492,6 +7494,7 @@ const CONST = {
FROM: 'from',
TO: 'to',
PAYER: 'payer',
PAID_BY: 'paidBy',
EXPORTER: 'exporter',
CATEGORY: 'category',
TAG: 'tag',
Expand Down Expand Up @@ -7577,6 +7580,7 @@ const CONST = {
FROM: 'from',
TO: 'to',
PAYER: 'payer',
PAID_BY: 'paid-by',
EXPORTER: 'exporter',
CATEGORY: 'category',
TAG: 'tag',
Expand Down Expand Up @@ -9576,6 +9580,7 @@ const CONTINUATION_DETECTION_SEARCH_FILTER_KEYS = [
CONST.SEARCH.SYNTAX_FILTER_KEYS.FROM,
CONST.SEARCH.SYNTAX_FILTER_KEYS.ASSIGNEE,
CONST.SEARCH.SYNTAX_FILTER_KEYS.PAYER,
CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY,
CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTER,
CONST.SEARCH.SYNTAX_FILTER_KEYS.ATTENDEE,
] as SearchFilterKey[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ function ListFilterContent({
case CONST.SEARCH.SYNTAX_FILTER_KEYS.ASSIGNEE:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.ATTENDEE:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.TO:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.FROM: {
content = (
<UserSelector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ function ExpenseReportListItemRowWide({
/>
</View>
),
[CONST.SEARCH.TABLE_COLUMNS.PAID_BY]: (
<View style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.PAID_BY)]}>
{!!item.paidByAccountID && (
<UserInfoCell
accountID={item.paidByAccountID}
avatar={item.paidByAvatar}
displayName={item.formattedPaidBy ?? ''}
isLargeScreenWidth
/>
)}
</View>
),
[CONST.SEARCH.TABLE_COLUMNS.EXPORTED]: (
<View style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.EXPORTED, {isExportedColumnWide: item.shouldShowYearExported})]}>
<DateCell
Expand Down
9 changes: 9 additions & 0 deletions src/components/Search/SearchList/ListItem/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,15 @@ type TransactionReportGroupListItemType = TransactionGroupListItemType & {groupe
/** Final and formatted "first approver" value used for displaying and sorting */
formattedFirstApprover?: string;

/** The avatar of the user the report was paid by */
paidByAvatar?: AvatarSource;

/** Account ID of the user the report was paid by (actor on the latest payment report action) */
paidByAccountID?: number;

/** Final and formatted "paid by" value used for displaying and sorting */
formattedPaidBy?: string;

/** Whether the status field should be shown in a pending state */
shouldShowStatusAsPending?: boolean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function ReportDropdown({label, value, PopoverComponent, sentryLabel, onClosePre
const FILTER_COMPONENT_MAP: Partial<Record<SearchFilter['key'], React.ComponentType<DropdownProps>>> = {
[CONST.SEARCH.SYNTAX_FILTER_KEYS.FROM]: UserDropdown,
[CONST.SEARCH.SYNTAX_FILTER_KEYS.TO]: UserDropdown,
[CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY]: UserDropdown,
Comment thread
c3024 marked this conversation as resolved.
Resolved
[CONST.SEARCH.SYNTAX_FILTER_KEYS.ATTENDEE]: UserDropdown,
[CONST.SEARCH.SYNTAX_FILTER_KEYS.ASSIGNEE]: UserDropdown,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ function buildSubstitutionsMap(
filterKey === CONST.SEARCH.SYNTAX_FILTER_KEYS.ASSIGNEE ||
filterKey === CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTER ||
filterKey === CONST.SEARCH.SYNTAX_FILTER_KEYS.PAYER ||
filterKey === CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY ||
filterKey === CONST.SEARCH.SYNTAX_FILTER_KEYS.ATTENDEE
) {
const displayValue = getFilterDisplayValue({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const USER_FILTER_KEYS = new Set<string>([
CONST.SEARCH.SYNTAX_FILTER_KEYS.TO,
CONST.SEARCH.SYNTAX_FILTER_KEYS.ASSIGNEE,
CONST.SEARCH.SYNTAX_FILTER_KEYS.PAYER,
CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY,
CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTER,
CONST.SEARCH.SYNTAX_FILTER_KEYS.ATTENDEE,
]);
Expand Down
4 changes: 4 additions & 0 deletions src/components/Search/SearchTableHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ const getExpenseReportHeaders = (profileIcon?: IconAsset): SearchColumnConfig[]
columnName: CONST.SEARCH.TABLE_COLUMNS.FIRST_APPROVED,
translationKey: 'search.filters.firstApproved',
},
{
columnName: CONST.SEARCH.TABLE_COLUMNS.PAID_BY,
translationKey: 'search.filters.paidBy',
},
{
columnName: CONST.SEARCH.TABLE_COLUMNS.EXPORTED,
translationKey: 'search.filters.exported',
Expand Down
4 changes: 4 additions & 0 deletions src/hooks/useAdvancedSearchFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const typeFiltersKeys = {
CONST.SEARCH.SYNTAX_FILTER_KEYS.STATUS,
CONST.SEARCH.SYNTAX_FILTER_KEYS.FROM,
CONST.SEARCH.SYNTAX_FILTER_KEYS.TO,
CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY,
CONST.SEARCH.SYNTAX_FILTER_KEYS.POLICY_ID,
],
[
Expand Down Expand Up @@ -80,6 +81,7 @@ const typeFiltersKeys = {
CONST.SEARCH.SYNTAX_FILTER_KEYS.STATUS,
CONST.SEARCH.SYNTAX_FILTER_KEYS.FROM,
CONST.SEARCH.SYNTAX_FILTER_KEYS.TO,
CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY,
CONST.SEARCH.SYNTAX_FILTER_KEYS.POLICY_ID,
],
[
Expand Down Expand Up @@ -112,6 +114,7 @@ const typeFiltersKeys = {
CONST.SEARCH.SYNTAX_FILTER_KEYS.STATUS,
CONST.SEARCH.SYNTAX_FILTER_KEYS.FROM,
CONST.SEARCH.SYNTAX_FILTER_KEYS.TO,
CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY,
CONST.SEARCH.SYNTAX_FILTER_KEYS.POLICY_ID,
],
[
Expand Down Expand Up @@ -152,6 +155,7 @@ const typeFiltersKeys = {
CONST.SEARCH.SYNTAX_FILTER_KEYS.STATUS,
CONST.SEARCH.SYNTAX_FILTER_KEYS.FROM,
CONST.SEARCH.SYNTAX_FILTER_KEYS.TO,
CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY,
CONST.SEARCH.SYNTAX_FILTER_KEYS.POLICY_ID,
],
[
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/useAutocompleteSuggestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ function useAutocompleteSuggestions({
case CONST.SEARCH.SYNTAX_FILTER_KEYS.TO:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.FROM:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.PAYER:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.ATTENDEE:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTER: {
// Soft-exclude Expensify-team logins (current and former AMs/Guides) from user filter suggestions. Users can still type any email manually because the search bar accepts free text.
Expand Down Expand Up @@ -272,7 +273,7 @@ function useAutocompleteSuggestions({
}).options.personalDetails.filter((participant) => participant.text && !alreadyAutocompletedKeys.has(participant.text.toLowerCase()));

return participants.map((participant) => ({
filterKey: autocompleteKey,
filterKey: getUserFriendlyKey(autocompleteKey),
text: participant.login === currentUserEmail ? CONST.SEARCH.ME : (participant.text ?? ''),
autocompleteID: String(participant.accountID),
mapKey: autocompleteKey,
Expand Down
1 change: 1 addition & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9296,6 +9296,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
approved: 'Genehmigt',
firstApprover: 'Erste:r Genehmiger:in',
firstApproved: 'Zuerst genehmigt',
paidBy: 'Bezahlt von',
paid: 'Bezahlt',
exported: 'Exportiert',
posted: 'Gebucht',
Expand Down
1 change: 1 addition & 0 deletions src/languages/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9508,6 +9508,7 @@ ${reportName}`,
approved: 'Εγκρίθηκε',
firstApprover: 'Πρώτος εγκρίνων',
firstApproved: 'Πρώτη έγκριση',
paidBy: 'Πληρώθηκε από',
paid: 'Πληρωμένο',
exported: 'Έγινε εξαγωγή',
posted: 'Καταχωρισμένο',
Expand Down
1 change: 1 addition & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9435,6 +9435,7 @@ const translations = {
approved: 'Approved',
firstApprover: 'First approver',
firstApproved: 'First approved',
paidBy: 'Paid by',
paid: 'Paid',
exported: 'Exported',
posted: 'Posted',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9164,6 +9164,7 @@ ${reportName}`,
approved: 'Aprobación',
firstApprover: 'Primer aprobador',
firstApproved: 'Primera aprobación',
paidBy: 'Pagado por',
paid: 'Pago',
exported: 'Exportación',
posted: 'Contabilización',
Expand Down
1 change: 1 addition & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9328,6 +9328,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
approved: 'Approuvé',
firstApprover: 'Premier approbateur',
firstApproved: 'Approuvé en premier',
paidBy: 'Payé par',
paid: 'Payé',
exported: 'Exporté',
posted: 'Publié',
Expand Down
1 change: 1 addition & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9265,6 +9265,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
approved: 'Approvato',
firstApprover: 'Primo approvatore',
firstApproved: 'Approvato per primo',
paidBy: 'Pagato da',
paid: 'Pagato',
exported: 'Esportato',
posted: 'Pubblicato',
Expand Down
1 change: 1 addition & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9137,6 +9137,7 @@ ${reportName}`,
approved: '承認済み',
firstApprover: '最初の承認者',
firstApproved: '最初に承認済み',
paidBy: '支払者',
paid: '支払い済み',
exported: 'エクスポート済み',
posted: '投稿日',
Expand Down
1 change: 1 addition & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9229,6 +9229,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
approved: 'Goedgekeurd',
firstApprover: 'Eerste gemachtigde',
firstApproved: 'Eerst goedgekeurd',
paidBy: 'Betaald door',
paid: 'Betaald',
exported: 'Geëxporteerd',
posted: 'Gepost',
Expand Down
1 change: 1 addition & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9254,6 +9254,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
approved: 'Zatwierdzono',
firstApprover: 'Pierwszy zatwierdzający',
firstApproved: 'Najpierw zatwierdzono',
paidBy: 'Zapłacone przez',
paid: 'Zapłacono',
exported: 'Wyeksportowano',
posted: 'Opublikowano',
Expand Down
1 change: 1 addition & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9230,6 +9230,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
approved: 'Aprovado',
firstApprover: 'Primeira pessoa aprovadora',
firstApproved: 'Primeira aprovada',
paidBy: 'Pago por',
paid: 'Pago',
exported: 'Exportado',
posted: 'Publicado',
Expand Down
1 change: 1 addition & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8892,6 +8892,7 @@ ${reportName}`,
approved: '已批准',
firstApprover: '首位审批人',
firstApproved: '首次批准',
paidBy: '付款人',
paid: '已支付',
exported: '已导出',
posted: '已发布',
Expand Down
22 changes: 15 additions & 7 deletions src/libs/SearchAutocompleteUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {SubstitutionMap} from '@components/Search/SearchRouter/getQueryWithSubstitutions';
import type {SearchAutocompleteQueryRange, SearchAutocompleteResult, SearchColumnType, SearchFilterKey} from '@components/Search/types';
import type {SearchAutocompleteQueryRange, SearchAutocompleteResult, SearchColumnType} from '@components/Search/types';

import CONST, {CONTINUATION_DETECTION_SEARCH_FILTER_KEYS} from '@src/CONST';
import type {PolicyCategories, PolicyTagLists, RecentlyUsedCategories, RecentlyUsedTags} from '@src/types/onyx';
Expand All @@ -10,7 +10,7 @@ import type {SharedValue} from 'react-native-reanimated/lib/typescript/commonTyp

import {getTagNamesFromTagsLists} from './PolicyUtils';
import {parse} from './SearchParser/autocompleteParser';
import {getUserFriendlyValue} from './SearchQueryUtils';
import {getUserFriendlyKey, getUserFriendlyValue} from './SearchQueryUtils';

/**
* Parses given query using the autocomplete parser.
Expand Down Expand Up @@ -193,6 +193,7 @@ function filterOutRangesWithCorrectValue(
case CONST.SEARCH.SYNTAX_FILTER_KEYS.FROM:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.ASSIGNEE:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.PAYER:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_BY:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTER:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.ATTENDEE:
return substitutionMap[`${range.key}:${range.value}`] !== undefined || userLogins.get().includes(range.value) || range.value === CONST.SEARCH.ME;
Expand Down Expand Up @@ -312,11 +313,18 @@ function getTrimmedUserSearchQueryPreservingComma(textInputValue: string, fieldK
return getQueryWithoutAutocompletedPart(textInputValue);
}

const isNameField = CONTINUATION_DETECTION_SEARCH_FILTER_KEYS.includes(fieldKey as SearchFilterKey);

if (isNameField) {
const fieldPattern = `${fieldKey}:`;
const keyIndex = textInputValue.toLowerCase().lastIndexOf(fieldPattern.toLowerCase());
const nameFieldKey = CONTINUATION_DETECTION_SEARCH_FILTER_KEYS.find((key) => key === fieldKey);

if (nameFieldKey) {
// The typed key can be the syntax form or the user-friendly form (e.g. paidBy vs paid-by). Match whichever appears last.
let fieldPattern = `${fieldKey}:`;
let keyIndex = textInputValue.toLowerCase().lastIndexOf(fieldPattern.toLowerCase());
const userFriendlyPattern = `${getUserFriendlyKey(nameFieldKey)}:`;
const userFriendlyKeyIndex = textInputValue.toLowerCase().lastIndexOf(userFriendlyPattern.toLowerCase());
if (userFriendlyKeyIndex > keyIndex) {
keyIndex = userFriendlyKeyIndex;
fieldPattern = userFriendlyPattern;
}

if (keyIndex !== -1) {
const afterFieldKey = textInputValue.substring(keyIndex + fieldPattern.length);
Expand Down
Loading
Loading