import { isNonEmptyArray } from '@ballerine/common'; import { Badge, ContentTooltip, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger, Skeleton, } from '@ballerine/ui'; import { t } from 'i18next'; import { Layers, Loader2, Download, Plus, SlidersHorizontal } from 'lucide-react'; import { FunctionComponent } from 'react'; import { Link } from 'react-router-dom'; import { Button, buttonVariants } from '@/common/components/atoms/Button/Button'; import { MultiSelect } from '@/common/components/atoms/MultiSelect/MultiSelect'; import { Separator } from '@/common/components/atoms/Separator/Separator'; import { Tooltip } from '@/common/components/atoms/Tooltip/Tooltip'; import { TooltipContent } from '@/common/components/atoms/Tooltip/Tooltip.Content'; import { TooltipProvider } from '@/common/components/atoms/Tooltip/Tooltip.Provider'; import { TooltipTrigger } from '@/common/components/atoms/Tooltip/Tooltip.Trigger'; import { DateRangePicker } from '@/common/components/organisms/DateRangePicker/DateRangePicker'; import { Search } from '@/common/components/molecules/Search'; import { UrlPagination } from '@/common/components/molecules/UrlPagination/UrlPagination'; import { DemoAccessWrapper } from '@/common/components/organisms/DemoAccessWrapper/DemoAccessWrapper'; import { MerchantMonitoringTable } from '@/pages/MerchantMonitoring/components/MerchantMonitoringTable/MerchantMonitoringTable'; import { NoBusinessReports } from '@/pages/MerchantMonitoring/components/NoBusinessReports/NoBusinessReports'; import { useMerchantMonitoringLogic } from '@/pages/MerchantMonitoring/hooks/useMerchantMonitoringLogic/useMerchantMonitoringLogic'; import { CreateMerchantReportDialog } from './components/CreateMerchantReportDialog/CreateMerchantReportDialog'; export const MerchantMonitoring: FunctionComponent = () => { const { businessReports, isLoadingBusinessReports, isLoadingFindings, search, onSearch, totalPages, totalItems, page, onPrevPage, onNextPage, onLastPage, onPaginate, isLastPage, dates, onDatesChange, onExport, locale, createBusinessReport, createBusinessReportBatch, reportType, onReportTypeChange, onClearAllFilters, REPORT_TYPE_TO_DISPLAY_TEXT, IS_ALERT_TO_DISPLAY_TEXT, FINDINGS_FILTER, RISK_LEVEL_FILTER, STATUS_LEVEL_FILTER, handleFilterChange, handleFilterClear, riskLevels, statuses, findings, isAlert, multiselectProps, isClearAllButtonVisible, onIsAlertChange, firstName, fullName, avatarUrl, open, toggleOpen, isDemoAccount, isExportingReport, } = useMerchantMonitoringLogic(); return ( toggleOpen(true)} >

Web Presence

{ if (!createBusinessReportBatch?.enabled || isDemoAccount) { e.preventDefault(); } }} to={`/${locale}/merchant-monitoring/upload-multiple-merchants`} aria-disabled={!createBusinessReportBatch?.enabled || isDemoAccount} > Batch Actions
{!createBusinessReportBatch?.enabled && !isDemoAccount && ( {t('business_report_creation.is_disabled')} )} {isDemoAccount && ( This feature is not available for trial accounts.
Talk to us to get full access.
)}
{!createBusinessReport?.enabled && ( {t('business_report_creation.is_disabled')} )}
{Object.entries(REPORT_TYPE_TO_DISPLAY_TEXT).map(([type, displayText]) => ( onReportTypeChange(type as keyof typeof REPORT_TYPE_TO_DISPLAY_TEXT) } > {displayText} ))} {!isDemoAccount && ( {Object.entries(IS_ALERT_TO_DISPLAY_TEXT).map(([value, label]) => ( onIsAlertChange(value as keyof typeof IS_ALERT_TO_DISPLAY_TEXT) } > {label} ))} )} {isClearAllButtonVisible && ( )}
{!isLoadingBusinessReports && ( {totalItems} results )}
{isLoadingBusinessReports && (
)} {!isLoadingBusinessReports && isNonEmptyArray(businessReports) && ( )} {!isLoadingBusinessReports && Array.isArray(businessReports) && !businessReports.length && }
{!isLoadingBusinessReports && `Page ${page} of ${totalPages || 1}`} {isLoadingBusinessReports && }
); };