Closed MatanYadaev closed 2 months ago
Latest commit: 35fc4af7c29958683df894f15b845b08cb91ae87
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
The recent changes enhance the functionality of several components in the backoffice application by introducing a new property, homepageScreenshotUrl
. This addition allows for the optional display of homepage screenshots across various reports, improving visual data representation. The updates include validation for incoming data and adjustments to component props and return structures, supporting a more robust and user-friendly interface.
Files & Path Summary | Change Summary |
---|---|
apps/backoffice-v2/src/common/components/.../BusinessReportSummary.tsx |
Added homepageScreenshotUrl prop for optional screenshot display; modified rendering logic and grid layout accordingly. |
apps/backoffice-v2/src/domains/business-reports/adapters/.../report-adapter.ts |
Expanded toRiskLabels function to accept additional properties; added homepageScreenshotUrl to report adapter output, enhancing data flexibility. |
apps/backoffice-v2/src/domains/business-reports/components/.../WebsiteLineOfBusiness.tsx |
Introduced ViolationsSchema for validating violation data; updated rendering logic to conditionally display violation summaries based on validation results. |
apps/backoffice-v2/src/lib/blocks/variants/WebsiteMonitoringBlocks/hooks/.../WebsiteMonitoringBusinessReportTab.tsx |
Added homepageScreenshotUrl prop to the component, enhancing its functionality for displaying the homepage screenshot. |
apps/backoffice-v2/src/lib/blocks/variants/WebsiteMonitoringBlocks/hooks/useWebsiteMonitoringReportBlock/hooks/.../useWebsiteMonitoringBusinessReportTab.tsx |
Updated hook to include homepageScreenshotUrl in its return object, improving data management capabilities for components. |
apps/backoffice-v2/src/pages/MerchantMonitoringBusinessReport/hooks/.../useMerchantMonitoringBusinessReportLogic.tsx |
Enhanced hook to extract and manage homepageScreenshotUrl , integrating it into the report's rendering logic for improved UI representation. |
sequenceDiagram
participant User
participant WebsiteMonitoringBusinessReportTab
participant Hook
participant Adapter
User->>Hook: Request report data
Hook->>Adapter: Fetch business report data
Adapter-->>Hook: Return report data with homepageScreenshotUrl
Hook-->>WebsiteMonitoringBusinessReportTab: Return report data
WebsiteMonitoringBusinessReportTab->>User: Display report with screenshot if available
🐇 "In the land of code, where the screens brightly glow,
A screenshot appears, to show what we know.
With props now enhanced, we hop with great cheer,
More info displayed, bringing users near!
A report so shiny, it dazzles and gleams,
In this world of data, we dance with our dreams!" 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
homepageScreenshotUrl
in various components, enabling optional display of homepage screenshots.WebsiteLineOfBusiness
component with data validation for reported violations, improving data integrity and user feedback.homepageScreenshotUrl
, expanding their functionality for improved reporting.Bug Fixes