Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6500,6 +6500,11 @@ const CONST = {
CLEARED: 'cleared',
FAILED: 'failed',
},
PAID_STATUS: {
MARKED_AS_PAID: 'markedAsPaid',
WITHDRAWING: 'withdrawing',
CONFIRMED: 'confirmed',
},
IS_VALUES: {
READ: 'read',
UNREAD: 'unread',
Expand Down Expand Up @@ -6906,6 +6911,7 @@ const CONST = {
POSTED: 'posted',
WITHDRAWAL_TYPE: 'withdrawalType',
WITHDRAWAL_STATUS: 'withdrawalStatus',
PAID_STATUS: 'paidStatus',
WITHDRAWN: 'withdrawn',
TOTAL: 'total',
TITLE: 'title',
Expand Down Expand Up @@ -6983,6 +6989,7 @@ const CONST = {
POSTED: 'posted',
WITHDRAWAL_TYPE: 'withdrawal-type',
WITHDRAWAL_STATUS: 'withdrawal-status',
PAID_STATUS: 'paid-status',
WITHDRAWN: 'withdrawn',
TITLE: 'title',
ASSIGNEE: 'assignee',
Expand Down
2 changes: 2 additions & 0 deletions src/components/Search/FilterComponents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type MultiSelectFilterKeys =
| typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPENSE_TYPE
| typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.RECEIPT_TYPE
| typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.WITHDRAWAL_STATUS
| typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_STATUS
| typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.STATUS;
type MultiSelectFilterComponentsProps = SearchFilterCommonProps<SearchAdvancedFiltersForm[MultiSelectFilterKeys] | undefined> & {
filterKey: MultiSelectFilterKeys;
Expand Down Expand Up @@ -220,6 +221,7 @@ function FilterComponents({filterKey, value, type, policyIDs, policyIDQuery, sel
case CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPENSE_TYPE:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.RECEIPT_TYPE:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.WITHDRAWAL_STATUS:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_STATUS:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.STATUS: {
return (
<MultiSelectFilterComponents
Expand Down
2 changes: 2 additions & 0 deletions src/components/Search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ type TableColumnSize = ValueOf<typeof CONST.SEARCH.TABLE_COLUMN_SIZES>;
type SearchDatePreset = ValueOf<typeof CONST.SEARCH.DATE_PRESETS>;
type SearchWithdrawalType = ValueOf<typeof CONST.SEARCH.WITHDRAWAL_TYPE>;
type SearchWithdrawalStatus = Array<ValueOf<typeof CONST.SEARCH.SETTLEMENT_STATUS>>;
type SearchPaidStatus = Array<ValueOf<typeof CONST.SEARCH.PAID_STATUS>>;
type SyntaxFilterKey = ValueOf<typeof CONST.SEARCH.SYNTAX_FILTER_KEYS>;

type SearchCustomColumnIds =
Expand Down Expand Up @@ -475,6 +476,7 @@ export type {
SearchDatePreset,
SearchWithdrawalType,
SearchWithdrawalStatus,
SearchPaidStatus,
UserFriendlyValue,
SelectedReports,
BankAccountMenuItem,
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useAdvancedSearchFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const typeFiltersKeys = {
CONST.SEARCH.SYNTAX_FILTER_KEYS.TOTAL,
CONST.SEARCH.SYNTAX_FILTER_KEYS.CURRENCY,
CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED_TO,
CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_STATUS,
CONST.SEARCH.SYNTAX_FILTER_KEYS.TITLE,
CONST.SEARCH.SYNTAX_FILTER_KEYS.REPORT_ID,
CONST.SEARCH.SYNTAX_FILTER_KEYS.REPORT_FIELD,
Expand Down
9 changes: 9 additions & 0 deletions src/hooks/useAutocompleteSuggestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const EXPENSE_TYPE_FRIENDLY_VALUES = Object.values(CONST.SEARCH.TRANSACTION_TYPE
const RECEIPT_TYPE_FRIENDLY_VALUES = Object.values(CONST.SEARCH.RECEIPT_TYPE).map((value) => getUserFriendlyValue(value));
const WITHDRAWAL_TYPE_VALUES = Object.values(CONST.SEARCH.WITHDRAWAL_TYPE);
const WITHDRAWAL_STATUS_VALUES = Object.values(CONST.SEARCH.SETTLEMENT_STATUS);
const PAID_STATUS_VALUES = Object.values(CONST.SEARCH.PAID_STATUS);
const BOOLEAN_VALUES = Object.values(CONST.SEARCH.BOOLEAN);
const ACTION_FILTER_VALUES = Object.values(CONST.SEARCH.ACTION_FILTERS);
const IS_VALUES_LIST = Object.values(CONST.SEARCH.IS_VALUES);
Expand Down Expand Up @@ -402,6 +403,14 @@ function useAutocompleteSuggestions({
text: withdrawalStatus,
}));
}
case CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_STATUS: {
const filteredPaidStatuses = PAID_STATUS_VALUES.filter((paidStatus) => paidStatus.includes(autocompleteValue.toLowerCase()) && !alreadyAutocompletedKeys.has(paidStatus)).sort();

return filteredPaidStatuses.map((paidStatus) => ({
filterKey: CONST.SEARCH.SEARCH_USER_FRIENDLY_KEYS.PAID_STATUS,
text: paidStatus,
}));
}
case CONST.SEARCH.SYNTAX_FILTER_KEYS.FEED: {
// We don't want to show the "Expensify Card" feeds in the autocomplete suggestion list as they don't have real "Statements"
// Thus passing an empty object to the `allCards` parameter.
Expand Down
2 changes: 2 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ const translations: TranslationDeepObject<typeof en> = {
withdrawalID: 'Auszahlungs-ID',
internationalReimbursementIDs: 'Internationale Erstattungs-IDs',
withdrawalStatus: 'Auszahlungsstatus',
paidStatus: 'Status: Bezahlt',
bankAccounts: 'Bankkonten',
chooseFile: 'Datei auswählen',
chooseFiles: 'Dateien auswählen',
Expand Down Expand Up @@ -8841,6 +8842,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
failedError: ({link}: {link: string}) => `Wir versuchen diese Abrechnung erneut, sobald du <a href="${link}">dein Konto entsperrst</a>.`,
withdrawalInfo: ({date, withdrawalID}: {date: string; withdrawalID: number}) => `${date} • Auszahlungs-ID: ${withdrawalID}`,
},
paidStatus: {markedAsPaid: 'Als bezahlt markiert', withdrawing: 'Wird abgehoben', confirmed: 'Bestätigt'},
reportLayout: {
reportLayout: 'Berichts-Layout',
groupByLabel: 'Gruppieren nach:',
Expand Down
6 changes: 6 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ const translations = {
withdrawalID: 'Withdrawal ID',
internationalReimbursementIDs: 'International reimbursement IDs',
withdrawalStatus: 'Withdrawal status',
paidStatus: 'Paid status',
bankAccounts: 'Bank accounts',
chooseFile: 'Choose file',
chooseFiles: 'Choose files',
Expand Down Expand Up @@ -8912,6 +8913,11 @@ const translations = {
failedError: ({link}: {link: string}) => `We'll retry this settlement when you <a href="${link}">unlock your account</a>.`,
withdrawalInfo: ({date, withdrawalID}: {date: string; withdrawalID: number}) => `${date} • Withdrawal ID: ${withdrawalID}`,
},
paidStatus: {
markedAsPaid: 'Marked as paid',
withdrawing: 'Withdrawing',
confirmed: 'Confirmed',
},
reportLayout: {
reportLayout: 'Report layout',
groupByLabel: 'Group by:',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ const translations: TranslationDeepObject<typeof en> = {
longReportID: 'ID de informe largo',
withdrawalID: 'ID de retiro',
withdrawalStatus: 'Estado de retiro',
paidStatus: 'Estado pagado',
bankAccounts: 'Cuentas bancarias',
chooseFile: 'Elegir archivo',
chooseFiles: 'Elegir archivos',
Expand Down Expand Up @@ -8619,6 +8620,7 @@ ${amount} para ${merchant} - ${date}`,
failedError: ({link}: {link: string}) => `Reintentaremos esta liquidación cuando <a href="${link}">desbloquees tu cuenta</a>.`,
withdrawalInfo: ({date, withdrawalID}: {date: string; withdrawalID: number}) => `${date} • ID de retiro: ${withdrawalID}`,
},
paidStatus: {markedAsPaid: 'Marcado como pagado', withdrawing: 'Retirando', confirmed: 'Confirmado'},
reportLayout: {
reportLayout: 'Diseño del informe',
groupByLabel: 'Agrupar por:',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ const translations: TranslationDeepObject<typeof en> = {
withdrawalID: 'ID de retrait',
internationalReimbursementIDs: 'ID de remboursement international',
withdrawalStatus: 'Statut de retrait',
paidStatus: 'Statut payé',
bankAccounts: 'Comptes bancaires',
chooseFile: 'Choisir un fichier',
chooseFiles: 'Choisir des fichiers',
Expand Down Expand Up @@ -8875,6 +8876,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
failedError: ({link}: {link: string}) => `Nous réessaierons ce règlement lorsque vous <a href="${link}">déverrouillerez votre compte</a>.`,
withdrawalInfo: ({date, withdrawalID}: {date: string; withdrawalID: number}) => `${date} • ID de retrait : ${withdrawalID}`,
},
paidStatus: {markedAsPaid: 'Marqué comme payé', withdrawing: 'Retrait en cours', confirmed: 'Confirmé'},
reportLayout: {
reportLayout: 'Mise en page de la note de frais',
groupByLabel: 'Regrouper par :',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ const translations: TranslationDeepObject<typeof en> = {
withdrawalID: 'ID prelievo',
internationalReimbursementIDs: 'ID di rimborso internazionale',
withdrawalStatus: 'Stato del prelievo',
paidStatus: 'Stato di pagamento',
bankAccounts: 'Conti bancari',
chooseFile: 'Scegli file',
chooseFiles: 'Scegli file',
Expand Down Expand Up @@ -8831,6 +8832,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
failedError: ({link}: {link: string}) => `Riproveremo a effettuare questa liquidazione quando <a href="${link}">sblocchi il tuo conto</a>.`,
withdrawalInfo: ({date, withdrawalID}: {date: string; withdrawalID: number}) => `${date} • ID prelievo: ${withdrawalID}`,
},
paidStatus: {markedAsPaid: 'Contrassegnato come pagato', withdrawing: 'Prelievo', confirmed: 'Confermato'},
reportLayout: {
reportLayout: 'Layout del report',
groupByLabel: 'Raggruppa per:',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ const translations: TranslationDeepObject<typeof en> = {
withdrawalID: '出金ID',
internationalReimbursementIDs: '国際払い戻しID',
withdrawalStatus: '出金ステータス',
paidStatus: '支払済みステータス',
bankAccounts: '銀行口座',
chooseFile: 'ファイルを選択',
chooseFiles: 'ファイルを選択',
Expand Down Expand Up @@ -8706,6 +8707,7 @@ ${reportName}`,
failedError: ({link}: {link: string}) => `<a href="${link}">アカウントのロックを解除</a>すると、この精算を再試行します。`,
withdrawalInfo: ({date, withdrawalID}: {date: string; withdrawalID: number}) => `${date}・出金 ID:${withdrawalID}`,
},
paidStatus: {markedAsPaid: '支払い済みにマークしました', withdrawing: '出金中', confirmed: '確認済み'},
reportLayout: {
reportLayout: 'レポートレイアウト',
groupByLabel: 'グループ化基準:',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ const translations: TranslationDeepObject<typeof en> = {
withdrawalID: 'Opname-ID',
internationalReimbursementIDs: 'Internationale terugbetalings-ID’s',
withdrawalStatus: 'Opnamestatus',
paidStatus: 'Betaald-status',
bankAccounts: 'Bankrekeningen',
chooseFile: 'Bestand kiezen',
chooseFiles: 'Bestanden kiezen',
Expand Down Expand Up @@ -8800,6 +8801,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
failedError: ({link}: {link: string}) => `We proberen deze afrekening opnieuw zodra je <a href="${link}">je account ontgrendelt</a>.`,
withdrawalInfo: ({date, withdrawalID}: {date: string; withdrawalID: number}) => `${date} • Opname-ID: ${withdrawalID}`,
},
paidStatus: {markedAsPaid: 'Gemarkeerd als betaald', withdrawing: 'Opnemen', confirmed: 'Bevestigd'},
reportLayout: {
reportLayout: 'Rapportindeling',
groupByLabel: 'Groeperen op:',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ const translations: TranslationDeepObject<typeof en> = {
withdrawalID: 'Identyfikator wypłaty',
internationalReimbursementIDs: 'Identyfikatory zwrotów międzynarodowych',
withdrawalStatus: 'Status wypłaty',
paidStatus: 'Status: opłacono',
bankAccounts: 'Konta bankowe',
chooseFile: 'Wybierz plik',
chooseFiles: 'Wybierz pliki',
Expand Down Expand Up @@ -8782,6 +8783,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
failedError: ({link}: {link: string}) => `Spróbujemy ponownie rozliczyć tę płatność, gdy <a href="${link}">odblokujesz swoje konto</a>.`,
withdrawalInfo: ({date, withdrawalID}: {date: string; withdrawalID: number}) => `${date} • ID wypłaty: ${withdrawalID}`,
},
paidStatus: {markedAsPaid: 'Oznaczone jako opłacone', withdrawing: 'Wypłata', confirmed: 'Potwierdzone'},
reportLayout: {
reportLayout: 'Układ raportu',
groupByLabel: 'Grupuj według:',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ const translations: TranslationDeepObject<typeof en> = {
withdrawalID: 'ID do saque',
internationalReimbursementIDs: 'IDs de reembolso internacional',
withdrawalStatus: 'Status do saque',
paidStatus: 'Status pago',
bankAccounts: 'Contas bancárias',
chooseFile: 'Escolher arquivo',
chooseFiles: 'Escolher arquivos',
Expand Down Expand Up @@ -8788,6 +8789,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
failedError: ({link}: {link: string}) => `Tentaremos processar este acerto novamente quando você <a href="${link}">desbloquear sua conta</a>.`,
withdrawalInfo: ({date, withdrawalID}: {date: string; withdrawalID: number}) => `${date} • ID de saque: ${withdrawalID}`,
},
paidStatus: {markedAsPaid: 'Marcado como pago', withdrawing: 'Sacando', confirmed: 'Confirmado'},
reportLayout: {
reportLayout: 'Layout do relatório',
groupByLabel: 'Agrupar por:',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ const translations: TranslationDeepObject<typeof en> = {
withdrawalID: '提现编号',
internationalReimbursementIDs: '国际报销 ID',
withdrawalStatus: '提现状态',
paidStatus: '已付款状态',
bankAccounts: '银行账户',
chooseFile: '选择文件',
chooseFiles: '选择文件',
Expand Down Expand Up @@ -8527,6 +8528,7 @@ ${reportName}`,
failedError: ({link}: {link: string}) => `当你<a href="${link}">解锁你的账户</a>后,我们会重试此结算。`,
withdrawalInfo: ({date, withdrawalID}: {date: string; withdrawalID: number}) => `${date} • 提现 ID:${withdrawalID}`,
},
paidStatus: {markedAsPaid: '标记为已付款', withdrawing: '提现中', confirmed: '已确认'},
reportLayout: {
reportLayout: '报表布局',
groupByLabel: '分组依据:',
Expand Down
3 changes: 3 additions & 0 deletions src/libs/SearchAutocompleteUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function filterOutRangesWithCorrectValue(
const receiptTypeList = userFriendlyReceiptTypeList;
const withdrawalTypeList = Object.values(CONST.SEARCH.WITHDRAWAL_TYPE) as string[];
const withdrawalStatusList = Object.values(CONST.SEARCH.SETTLEMENT_STATUS) as string[];
const paidStatusList = Object.values(CONST.SEARCH.PAID_STATUS) as string[];
const statusList = userFriendlyStatusList;
const groupByList = userFriendlyGroupByList;
const viewList = userFriendlyViewList;
Expand Down Expand Up @@ -206,6 +207,8 @@ function filterOutRangesWithCorrectValue(
return withdrawalTypeList.includes(range.value);
case CONST.SEARCH.SYNTAX_FILTER_KEYS.WITHDRAWAL_STATUS:
return withdrawalStatusList.includes(range.value);
case CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID_STATUS:
return paidStatusList.includes(range.value);
case CONST.SEARCH.SYNTAX_ROOT_KEYS.STATUS:
return statusList.includes(range.value);
case CONST.SEARCH.SYNTAX_FILTER_KEYS.ACTION:
Expand Down
Loading
Loading