-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merchant report optional company name #2492
Conversation
…e a merchant report
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe changes focus on refining the business report management system. The Changes
Poem
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
services/workflows-service/src/business-report/business-report.controller.internal.ts (1)
Line range hint
47-47
: Fix decorators usage.Decorators are not valid on parameters according to the static analysis tool. Consider enabling
unsafeParameterDecoratorsEnabled
in the configuration file or refactoring the code.- @Body() { websiteUrl, countryCode, merchantName, businessCorrelationId, reportType }: CreateBusinessReportDto, - @CurrentProject() currentProjectId: TProjectId, + createBusinessReport( + @Body() createBusinessReportDto: CreateBusinessReportDto, + @CurrentProject() currentProjectId: TProjectId, + ) { + const { websiteUrl, countryCode, merchantName, businessCorrelationId, reportType } = createBusinessReportDto;Also applies to: 55-55, 136-137, 192-193, 229-230, 266-267
Tools
Biome
[error] 55-55: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- apps/backoffice-v2/src/pages/MerchantMonitoringCreateCheck/create-business-report-schema.ts (1 hunks)
- services/workflows-service/prisma/data-migrations (1 hunks)
- services/workflows-service/src/business-report/business-report.controller.internal.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- services/workflows-service/prisma/data-migrations
Additional context used
Biome
services/workflows-service/src/business-report/business-report.controller.internal.ts
[error] 47-47: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 55-55: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 136-136: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 137-137: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 192-192: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 193-193: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 229-229: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 230-230: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 266-266: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 267-267: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
Additional comments not posted (6)
apps/backoffice-v2/src/pages/MerchantMonitoringCreateCheck/create-business-report-schema.ts (4)
7-10
: Ensure the URL regex is comprehensive.The regex pattern for validating
websiteUrl
appears to cover a wide range of URLs. However, ensure it meets all your use cases, including edge cases like international domain names and uncommon protocols.
11-16
: LGTM!The
companyName
field definition and validation logic are correct.
17-30
: Verify the necessity of@ts-expect-error
.The
@ts-expect-error
directive suppresses type errors. Ensure it's necessary and consider resolving the underlying type issue if possible.
31-36
: LGTM!The
businessCorrelationId
field definition and validation logic are correct.services/workflows-service/src/business-report/business-report.controller.internal.ts (2)
58-58
: LGTM!The default value assignment for
merchantName
is correct and improves code robustness.
Line range hint
60-74
: Verify the impact of removing themerchantName
check.Ensure that removing the condition checking for
merchantName
does not introduce any issues in the business logic.Tools
Biome
[error] 55-55: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- services/workflows-service/prisma/data-migrations (1 hunks)
Files skipped from review due to trivial changes (1)
- services/workflows-service/prisma/data-migrations
Summary by CodeRabbit
New Features
companyName
andbusinessCorrelationId
.merchantName
in business report creation to ensure smoother operation.Bug Fixes
merchantName
andbusinessCorrelationId
.Chores