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
3 changes: 0 additions & 3 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8080,7 +8080,6 @@ const CONST = {
EXPORTER: 'exporter',
CATEGORY: 'category',
TAG: 'tag',
VENDOR: 'vendor',
TAX_RATE: 'taxRate',
CARD_ID: 'cardID',
FEED: 'feed',
Expand Down Expand Up @@ -8132,7 +8131,6 @@ const CONST = {
TAG_EMPTY_VALUE: 'none',
CATEGORY_EMPTY_VALUE: 'none',
CATEGORY_DEFAULT_VALUE: 'Uncategorized',
VENDOR_EMPTY_VALUE: 'none',
MERCHANT_EMPTY_VALUE: 'none',
SEARCH_ROUTER_ITEM_TYPE: {
CONTEXTUAL_SUGGESTION: 'contextualSuggestion',
Expand Down Expand Up @@ -8169,7 +8167,6 @@ const CONST = {
EXPORTER: 'exporter',
CATEGORY: 'category',
TAG: 'tag',
VENDOR: 'vendor',
TAX_RATE: 'tax-rate',
CARD_ID: 'card',
FEED: 'feed',
Expand Down
8 changes: 0 additions & 8 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,6 @@ const ONYXKEYS = {
/** Set while search filter category data is loading */
RAM_ONLY_IS_LOADING_SEARCH_FILTERS_CATEGORY_DATA: 'isLoadingSearchFiltersCategoryData',

/** Set whether the search filters vendor data has loaded */
IS_SEARCH_FILTERS_VENDOR_DATA_LOADED: 'isSearchFiltersVendorDataLoaded',

/** Set while search filter vendor data is loading */
RAM_ONLY_IS_LOADING_SEARCH_FILTERS_VENDOR_DATA: 'isLoadingSearchFiltersVendorData',

HAS_LOADED_APP: 'hasLoadedApp',

IS_TEST_TOOLS_MODAL_OPEN: 'isTestToolsModalOpen',
Expand Down Expand Up @@ -1797,8 +1791,6 @@ type OnyxValuesMapping = {
[ONYXKEYS.RAM_ONLY_HAS_RULES_DATA_BEEN_FETCHED]: boolean;
[ONYXKEYS.RAM_ONLY_IS_LOADING_RULES]: boolean;
[ONYXKEYS.RAM_ONLY_IS_LOADING_SEARCH_FILTERS_CATEGORY_DATA]: boolean;
[ONYXKEYS.IS_SEARCH_FILTERS_VENDOR_DATA_LOADED]: boolean;
[ONYXKEYS.RAM_ONLY_IS_LOADING_SEARCH_FILTERS_VENDOR_DATA]: boolean;
[ONYXKEYS.IS_LOADING_SUBSCRIPTION_DATA]: boolean;
[ONYXKEYS.IS_PENDING_UPDATE_PERSONAL_KARMA]: boolean;
[ONYXKEYS.IS_TEST_TOOLS_MODAL_OPEN]: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import TagSelector from './TagSelector';
import TaxRateSelector from './TaxRateSelector';
import TypeSelector from './TypeSelector';
import UserSelector from './UserSelector';
import VendorSelector from './VendorSelector';
import WorkspaceSelector from './WorkspaceSelector';

type FilterKeys = Exclude<SearchFilter['key'], SearchDateFilterKeys | SearchAmountFilterKeys | SearchTextFilterKeys | typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.REPORT_FIELD>;
Expand Down Expand Up @@ -195,7 +194,6 @@ function ListFilterContent({
case CONST.SEARCH.SYNTAX_FILTER_KEYS.TAX_RATE:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED_TO:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.TAG:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR:
case CONST.SEARCH.SYNTAX_FILTER_KEYS.CATEGORY: {
const Component = {
[CONST.SEARCH.SYNTAX_FILTER_KEYS.FEED]: FeedSelector,
Expand All @@ -205,7 +203,6 @@ function ListFilterContent({
[CONST.SEARCH.SYNTAX_FILTER_KEYS.TAX_RATE]: TaxRateSelector,
[CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED_TO]: ExportedToSelector,
[CONST.SEARCH.SYNTAX_FILTER_KEYS.TAG]: TagSelector,
[CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR]: VendorSelector,
[CONST.SEARCH.SYNTAX_FILTER_KEYS.CATEGORY]: CategorySelector,
}[baseFilterKey];
content = (
Expand Down
98 changes: 0 additions & 98 deletions src/components/Search/FilterComponents/VendorSelector.tsx

This file was deleted.

15 changes: 1 addition & 14 deletions src/hooks/useAdvancedSearchFilters.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {isFilterableBankAccount} from '@libs/BankAccountUtils';
import {hasVendorFeatureOnAnyPolicy, isPolicyFeatureEnabled} from '@libs/PolicyUtils';
import {isPolicyFeatureEnabled} from '@libs/PolicyUtils';

import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand All @@ -11,11 +11,9 @@ import type {OnyxCollection, OnyxEntry} from 'react-native-onyx';

import {filterCardsHiddenFromSearch} from '@selectors/Card';
import {emailSelector} from '@selectors/Session';
import {useCallback} from 'react';

import useLocalize from './useLocalize';
import useOnyx from './useOnyx';
import usePermissions from './usePermissions';
import useWorkspaceList from './useWorkspaceList';

/**
Expand All @@ -40,7 +38,6 @@ const typeFiltersKeys = {
CONST.SEARCH.SYNTAX_FILTER_KEYS.DESCRIPTION,
CONST.SEARCH.SYNTAX_FILTER_KEYS.CATEGORY,
CONST.SEARCH.SYNTAX_FILTER_KEYS.TAG,
CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR,
CONST.SEARCH.SYNTAX_FILTER_KEYS.TAX_RATE,
CONST.SEARCH.SYNTAX_FILTER_KEYS.ATTENDEE,
CONST.SEARCH.SYNTAX_FILTER_KEYS.REIMBURSABLE,
Expand Down Expand Up @@ -318,13 +315,6 @@ function useAdvancedSearchFilters(type: SearchDataTypes | undefined) {
const [shouldDisplayCardFilter] = useOnyx(ONYXKEYS.DERIVED.PERSONAL_AND_WORKSPACE_CARD_LIST, {selector: shouldDisplayCardFilterSelector});
const [policies = getEmptyObject<NonNullable<OnyxCollection<Policy>>>()] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {selector: advancedSearchPoliciesSelector});
const [policyDerived] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {selector: policyDerivedSelector});
const {isBetaEnabled} = usePermissions();
const isVendorMatchingBetaEnabled = isBetaEnabled(CONST.BETAS.VENDOR_MATCHING);
const isVendorFilterAvailableSelector = useCallback(
(allPolicies: OnyxCollection<Policy>) => hasVendorFeatureOnAnyPolicy(allPolicies, isVendorMatchingBetaEnabled),
[isVendorMatchingBetaEnabled],
);
const [isVendorFilterAvailable = false] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {selector: isVendorFilterAvailableSelector});
const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST);

const {workspaces} = useAdvancedSearchFiltersWorkspaces(policies);
Expand All @@ -349,9 +339,6 @@ function useAdvancedSearchFilters(type: SearchDataTypes | undefined) {
if (key === CONST.SEARCH.SYNTAX_FILTER_KEYS.TAG && !shouldDisplayTagFilter) {
return;
}
if (key === CONST.SEARCH.SYNTAX_FILTER_KEYS.VENDOR && !isVendorFilterAvailable) {
return;
}
if (
(key === CONST.SEARCH.SYNTAX_FILTER_KEYS.CARD_ID ||
key === CONST.SEARCH.SYNTAX_FILTER_KEYS.POSTED ||
Expand Down
59 changes: 0 additions & 59 deletions src/hooks/useLoadSearchVendorData.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10018,7 +10018,6 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc
noCategory: 'Keine Kategorie',
noMerchant: 'Kein Händler',
noTag: 'Kein Tag',
noVendor: 'Kein Lieferant',
expenseType: 'Ausgabenart',
receiptType: 'Belegart',
receiptTypeValues: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10230,7 +10230,6 @@ ${reportName}`,
noCategory: 'Χωρίς κατηγορία',
noMerchant: 'Χωρίς έμπορο',
noTag: 'Χωρίς ετικέτα',
noVendor: 'Χωρίς προμηθευτή',
expenseType: 'Τύπος εξόδου',
receiptType: 'Τύπος απόδειξης',
receiptTypeValues: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10265,7 +10265,6 @@ const translations = {
noCategory: 'No category',
noMerchant: 'No merchant',
noTag: 'No tag',
noVendor: 'No vendor',
expenseType: 'Expense type',
receiptType: 'Receipt type',
receiptTypeValues: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9856,7 +9856,6 @@ ${reportName}`,
noCategory: 'Sin categoría',
noMerchant: 'Sin comerciante',
noTag: 'Sin etiqueta',
noVendor: 'Sin proveedor',
expenseType: 'Tipo de gasto',
receiptType: 'Tipo de recibo',
receiptTypeValues: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10041,7 +10041,6 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e
noCategory: 'Aucune catégorie',
noMerchant: 'Aucun commerçant',
noTag: 'Aucun tag',
noVendor: 'Aucun fournisseur',
expenseType: 'Type de dépense',
receiptType: 'Type de reçu',
receiptTypeValues: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9971,7 +9971,6 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`,
noCategory: 'Nessuna categoria',
noMerchant: 'Nessun esercente',
noTag: 'Nessun tag',
noVendor: 'Nessun fornitore',
expenseType: 'Tipo di spesa',
receiptType: 'Tipo di ricevuta',
receiptTypeValues: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9827,7 +9827,6 @@ ${reportName}`,
noCategory: 'カテゴリなし',
noMerchant: '店舗なし',
noTag: 'タグなし',
noVendor: 'ベンダーなし',
expenseType: '経費の種類',
receiptType: '領収書の種類',
receiptTypeValues: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9925,7 +9925,6 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`,
noCategory: 'Geen categorie',
noMerchant: 'Geen handelaar',
noTag: 'Geen tag',
noVendor: 'Geen leverancier',
expenseType: 'Onkostentype',
receiptType: 'Bontype',
receiptTypeValues: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9954,7 +9954,6 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`,
noCategory: 'Brak kategorii',
noMerchant: 'Brak sprzedawcy',
noTag: 'Brak tagu',
noVendor: 'Brak dostawcy',
expenseType: 'Typ wydatku',
receiptType: 'Typ paragonu',
receiptTypeValues: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9922,7 +9922,6 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`,
noCategory: 'Sem categoria',
noMerchant: 'Sem comerciante',
noTag: 'Sem tag',
noVendor: 'Sem fornecedor',
expenseType: 'Tipo de despesa',
receiptType: 'Tipo de recibo',
receiptTypeValues: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9568,7 +9568,6 @@ ${reportName}`,
noCategory: '无类别',
noMerchant: '无商家',
noTag: '无标签',
noVendor: '无供应商',
expenseType: '报销类型',
receiptType: '收据类型',
receiptTypeValues: {
Expand Down
2 changes: 0 additions & 2 deletions src/libs/API/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,6 @@ const READ_COMMANDS = {
OPEN_SEARCH_PAGE: 'OpenSearchPage',
OPEN_SEARCH_CARD_FILTERS_PAGE: 'OpenSearchCardFiltersPage',
OPEN_SEARCH_CATEGORY_FILTERS_PAGE: 'OpenSearchCategoryFiltersPage',
OPEN_SEARCH_VENDOR_FILTERS_PAGE: 'OpenSearchVendorFiltersPage',
SEARCH: 'Search',
GET_INSIGHTS: 'GetInsights',
GET_TRANSACTIONS_CONVERTED_AMOUNT: 'GetTransactionsConvertedAmount',
Expand Down Expand Up @@ -1748,7 +1747,6 @@ type ReadCommandParameters = {
[READ_COMMANDS.OPEN_DRAFT_DISTANCE_EXPENSE]: null;
[READ_COMMANDS.OPEN_SEARCH_CARD_FILTERS_PAGE]: null;
[READ_COMMANDS.OPEN_SEARCH_CATEGORY_FILTERS_PAGE]: null;
[READ_COMMANDS.OPEN_SEARCH_VENDOR_FILTERS_PAGE]: null;
[READ_COMMANDS.START_ISSUE_NEW_CARD_FLOW]: Parameters.StartIssueNewCardFlowParams;
[READ_COMMANDS.OPEN_CARD_DETAILS_PAGE]: Parameters.OpenCardDetailsPageParams;
[READ_COMMANDS.GET_CORPAY_ONBOARDING_FIELDS]: Parameters.GetCorpayOnboardingFieldsParams;
Expand Down
2 changes: 0 additions & 2 deletions src/libs/ExportOnyxState/masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ const safeOnyxKeys = new Set<string>([
ONYXKEYS.IS_PLAID_DISABLED,
ONYXKEYS.IS_SEARCH_FILTERS_CARD_DATA_LOADED,
ONYXKEYS.IS_SEARCH_FILTERS_CATEGORY_DATA_LOADED,
ONYXKEYS.IS_SEARCH_FILTERS_VENDOR_DATA_LOADED,
ONYXKEYS.IS_SENTRY_DEBUG_ENABLED,
ONYXKEYS.IS_SENTRY_SEND_ENABLED,
ONYXKEYS.IS_SWITCHING_TO_DELEGATOR,
Expand Down Expand Up @@ -505,7 +504,6 @@ const onyxKeysToMaskFragileData = new Set<string>([
ONYXKEYS.RAM_ONLY_HAS_DISMISSED_CONCIERGE_NOTIFICATION_BANNER,
ONYXKEYS.RAM_ONLY_HAS_FRESH_WALLET_DATA,
ONYXKEYS.RAM_ONLY_IS_LOADING_SEARCH_FILTERS_CATEGORY_DATA,
ONYXKEYS.RAM_ONLY_IS_LOADING_SEARCH_FILTERS_VENDOR_DATA,
ONYXKEYS.RAM_ONLY_SEARCH_TAG_FILTERS_PAGINATION,
ONYXKEYS.RAM_ONLY_SEARCH_TAG_FILTERS_RESULTS,
ONYXKEYS.RAM_ONLY_WALLET_ONFIDO,
Expand Down
Loading
Loading