diff --git a/apps/backoffice-v2/src/domains/business-reports/hooks/queries/useBusinessReportsQuery/useBusinessReportsQuery.tsx b/apps/backoffice-v2/src/domains/business-reports/hooks/queries/useBusinessReportsQuery/useBusinessReportsQuery.tsx index 78480b4078..d82c352987 100644 --- a/apps/backoffice-v2/src/domains/business-reports/hooks/queries/useBusinessReportsQuery/useBusinessReportsQuery.tsx +++ b/apps/backoffice-v2/src/domains/business-reports/hooks/queries/useBusinessReportsQuery/useBusinessReportsQuery.tsx @@ -17,6 +17,7 @@ export const useBusinessReportsQuery = ({ findings, from, to, + isAlert, }: { reportType?: MerchantReportType; search: string; @@ -29,6 +30,7 @@ export const useBusinessReportsQuery = ({ findings: string[]; from?: string; to?: string; + isAlert?: boolean; }) => { const isAuthenticated = useIsAuthenticated(); @@ -45,6 +47,7 @@ export const useBusinessReportsQuery = ({ findings, from, to, + isAlert, }), enabled: isAuthenticated && !!sortBy && !!sortDir && !!page && !!pageSize, staleTime: 100_000, diff --git a/apps/backoffice-v2/src/domains/business-reports/query-keys.ts b/apps/backoffice-v2/src/domains/business-reports/query-keys.ts index b9aba396b4..b58ce7a74e 100644 --- a/apps/backoffice-v2/src/domains/business-reports/query-keys.ts +++ b/apps/backoffice-v2/src/domains/business-reports/query-keys.ts @@ -27,6 +27,7 @@ export const businessReportsQueryKey = createQueryKeys('business-reports', { findings: string[]; from?: string; to?: string; + isAlert?: boolean; }) => ({ queryKey: [{ page, pageSize, sortBy, sortDir, ...params }], queryFn: () => { diff --git a/apps/backoffice-v2/src/pages/MerchantMonitoring/MerchantMonitoring.page.tsx b/apps/backoffice-v2/src/pages/MerchantMonitoring/MerchantMonitoring.page.tsx index 63ef54feb9..5f04e25c6d 100644 --- a/apps/backoffice-v2/src/pages/MerchantMonitoring/MerchantMonitoring.page.tsx +++ b/apps/backoffice-v2/src/pages/MerchantMonitoring/MerchantMonitoring.page.tsx @@ -1,4 +1,4 @@ -import React, { FunctionComponent } from 'react'; +import { FunctionComponent } from 'react'; import { isNonEmptyArray } from '@ballerine/common'; import { UrlPagination } from '@/common/components/molecules/UrlPagination/UrlPagination'; import { useMerchantMonitoringLogic } from '@/pages/MerchantMonitoring/hooks/useMerchantMonitoringLogic/useMerchantMonitoringLogic'; @@ -50,6 +50,7 @@ export const MerchantMonitoring: FunctionComponent = () => { onReportTypeChange, onClearAllFilters, REPORT_TYPE_TO_DISPLAY_TEXT, + IS_ALERT_TO_DISPLAY_TEXT, FINDINGS_FILTER, RISK_LEVEL_FILTER, STATUS_LEVEL_FILTER, @@ -58,8 +59,10 @@ export const MerchantMonitoring: FunctionComponent = () => { riskLevels, statuses, findings, + isAlert, multiselectProps, isClearAllButtonVisible, + onIsAlertChange, } = useMerchantMonitoringLogic(); return ( @@ -132,7 +135,7 @@ export const MerchantMonitoring: FunctionComponent = () => { + + + {Object.entries(IS_ALERT_TO_DISPLAY_TEXT).map(([value, label]) => ( + + onIsAlertChange(value as keyof typeof IS_ALERT_TO_DISPLAY_TEXT) + } + > + {label} + + ))} + + {isClearAllButtonVisible && (