Skip to content

Commit

Permalink
ongoing monitoring turning on and off (#2941)
Browse files Browse the repository at this point in the history
* feat(monitoring): implement business monitoring feature

- Add success and error messages for turning monitoring on/off
- Update API endpoints to manage ongoing monitoring status
- Integrate tooltip UI for monitoring status display

(Your code is so reactive that I'm surprised it doesn't require a safe word)

* chore(business-report): remove unused import for BusinessReportMetricsDto

- Eliminate unnecessary import to clean up the code
- Reduces clutter and potential confusion in the module

(your code is so tidy now, it could be a minimalist's dream home)

* fix(report): optimize business report fetching logic

- Simplify monitoring mutation definitions
- Consolidate business fetching to reduce database calls

(Your database queries are so chatty, they could use a good night's sleep)
  • Loading branch information
tomer-shvadron authored and r4zendev committed Jan 14, 2025
1 parent 0ba6cc7 commit c8681ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { QueryClientProvider } from '@tanstack/react-query';
import { FunctionComponent, PropsWithChildren } from 'react';

import { queryClient } from '@/lib/react-query/query-client';
import { TooltipProvider } from '../../atoms/Tooltip/Tooltip.Provider';
import { AuthProvider } from '@/domains/auth/context/AuthProvider/AuthProvider';
import { TooltipProvider } from '@ballerine/ui';

export const Providers: FunctionComponent<PropsWithChildren> = ({ children }) => {
return (
<QueryClientProvider client={queryClient}>
<AuthProvider>
<TooltipProvider delayDuration={100}>{children}</TooltipProvider>
<TooltipProvider>{children}</TooltipProvider>
</AuthProvider>
</QueryClientProvider>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ import {
} from '@/domains/business-reports/constants';
import React from 'react';
import { IndicatorCircle } from '@/common/components/atoms/IndicatorCircle/IndicatorCircle';
import { TooltipTrigger, TooltipContent, Tooltip } from '@ballerine/ui';
import { TooltipTrigger } from '@/common/components/atoms/Tooltip/Tooltip.Trigger';
import { TooltipContent } from '@/common/components/atoms/Tooltip/Tooltip.Content';
import { Tooltip } from '@/common/components/atoms/Tooltip/Tooltip';

const columnHelper = createColumnHelper<TBusinessReport>();

Expand All @@ -53,7 +55,9 @@ export const columns = [
const companyName = info.getValue();

return (
<TextWithNAFallback className={`ms-4 font-semibold`}>{companyName}</TextWithNAFallback>
<TextWithNAFallback>
<span className={`ms-4 font-semibold`}>{companyName}</span>
</TextWithNAFallback>
);
},
header: 'Company Name',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ import { PrismaService } from '@/prisma/prisma.service';
import { AdminAuthGuard } from '@/common/guards/admin-auth.guard';
import { BusinessReportFindingsListResponseDto } from '@/business-report/dtos/business-report-findings.dto';
import { MerchantMonitoringClient } from '@/business-report/merchant-monitoring-client';
import { BusinessReportMetricsDto } from '@/business-report/dtos/business-report-metrics-dto';
import {
BusinessReportMetricsRequestQueryDto,
BusinessReportsMetricsQuerySchema,
} from '@/business-report/dtos/business-report-metrics.dto';
import { BusinessReportMetricsDto } from './dtos/business-report-metrics-dto';
import { FEATURE_LIST, TCustomerWithFeatures } from '@/customer/types';

@ApiBearerAuth()
@swagger.ApiTags('Business Reports')
Expand Down

0 comments on commit c8681ce

Please sign in to comment.