feat(condo): DOMA-13035 add marketplace alert#7442
Conversation
📝 WalkthroughWalkthroughInserted a marketplace hint into the payment total chart using a subscription guard that can render a localized informational Alert when chart data exists. Relaxed Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/condo/domains/subscription/components/SubscriptionGuardWithTooltip.tsx`:
- Line 7: The component SubscriptionGuardWithTooltip declares children as
optional but sometimes returns children directly, which can yield undefined;
update the children prop type to allow null (e.g., children?: React.ReactElement
| null) and change the return sites that currently return children to explicitly
return children ?? null (or otherwise return null when children is undefined) so
the component always returns valid JSX (null) instead of undefined.
In `@apps/condo/lang/es/es.json`:
- Line 3072: Update the translation value for the key
"pages.reports.paymentsTotalMarketplaceHint": replace the phrase "servicios
pagos" with the more natural es-ES variant "servicios de pago" so the string
reads "Puede ganar más ofreciendo servicios de pago a los vecinos si activa la
sección «Marketplace»".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d237b66b-e613-4401-bfd5-ff90b0e7ca97
📒 Files selected for processing (5)
apps/condo/domains/analytics/components/charts/payment/PaymentTotalChart.tsxapps/condo/domains/subscription/components/SubscriptionGuardWithTooltip.tsxapps/condo/lang/en/en.jsonapps/condo/lang/es/es.jsonapps/condo/lang/ru/ru.json
| "pages.reports.paymentsAmountPercent": "Pagos", | ||
| "pages.reports.paymentsByProperty": "Pagos por comunidad", | ||
| "pages.reports.paymentsTotal": "Recibos de pago (de la aplicación móvil del vecino)", | ||
| "pages.reports.paymentsTotalMarketplaceHint": "Puede ganar más ofreciendo servicios pagos a los vecinos si activa la sección «Marketplace»", |
There was a problem hiding this comment.
Use a more natural es-ES phrasing for paid services.
Line 3072 currently says “servicios pagos”. For consistency with the rest of this locale and more natural es-ES wording, prefer “servicios de pago”.
✏️ Suggested copy update
- "pages.reports.paymentsTotalMarketplaceHint": "Puede ganar más ofreciendo servicios pagos a los vecinos si activa la sección «Marketplace»",
+ "pages.reports.paymentsTotalMarketplaceHint": "Puede ganar más ofreciendo servicios de pago a los vecinos si activa la sección «Marketplace»",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "pages.reports.paymentsTotalMarketplaceHint": "Puede ganar más ofreciendo servicios pagos a los vecinos si activa la sección «Marketplace»", | |
| "pages.reports.paymentsTotalMarketplaceHint": "Puede ganar más ofreciendo servicios de pago a los vecinos si activa la sección «Marketplace»", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/condo/lang/es/es.json` at line 3072, Update the translation value for
the key "pages.reports.paymentsTotalMarketplaceHint": replace the phrase
"servicios pagos" with the more natural es-ES variant "servicios de pago" so the
string reads "Puede ganar más ofreciendo servicios de pago a los vecinos si
activa la sección «Marketplace»".
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@apps/condo/domains/analytics/components/charts/payment/PaymentTotalChart.tsx`:
- Line 34: The tooltipButtonId string passed to the PaymentTotalChart component
is misspelled as "PaymentTotalChartSubscriprionTooltip"; update the prop value
(tooltipButtonId) in the PaymentTotalChart JSX to the correct identifier, e.g.
"PaymentTotalChartSubscriptionTooltip", so tests and analytics hooks that rely
on that selector are stable — locate the tooltipButtonId prop in the
PaymentTotalChart component usage and replace the misspelled token with the
corrected "Subscription" spelling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7841a13c-ab8c-4261-8166-6c67dcb1f6fd
📒 Files selected for processing (2)
apps/condo/domains/analytics/components/charts/payment/PaymentTotalChart.tsxapps/condo/domains/subscription/components/NoSubscriptionTooltip.tsx
| feature='marketplace' | ||
| placement='bottom' | ||
| children={null} | ||
| tooltipButtonId='PaymentTotalChartSubscriprionTooltip' |
There was a problem hiding this comment.
Fix typo in tooltip button id (Line 34).
PaymentTotalChartSubscriprionTooltip likely has a misspelling. This can make test selectors and analytics hooks brittle.
✏️ Proposed fix
- tooltipButtonId='PaymentTotalChartSubscriprionTooltip'
+ tooltipButtonId='PaymentTotalChartSubscriptionTooltip'📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| tooltipButtonId='PaymentTotalChartSubscriprionTooltip' | |
| tooltipButtonId='PaymentTotalChartSubscriptionTooltip' |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/condo/domains/analytics/components/charts/payment/PaymentTotalChart.tsx`
at line 34, The tooltipButtonId string passed to the PaymentTotalChart component
is misspelled as "PaymentTotalChartSubscriprionTooltip"; update the prop value
(tooltipButtonId) in the PaymentTotalChart JSX to the correct identifier, e.g.
"PaymentTotalChartSubscriptionTooltip", so tests and analytics hooks that rely
on that selector are stable — locate the tooltipButtonId prop in the
PaymentTotalChart component usage and replace the misspelled token with the
corrected "Subscription" spelling.
|



Summary by CodeRabbit