WEB-717 Prevent negative values for nominal unit price in market price period#3146
Conversation
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
Market Price Validation src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.ts |
Added min: 1 validation constraint to the shareValue InputBase field configuration in getFormfields method. |
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~3 minutes
Suggested reviewers
- IOhacker
- alberto-art3ch
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately reflects the primary change: adding minimum value validation (min: 1) to prevent negative values for the nominal/unit price field in the market price period step. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Merge Conflict Detection | ✅ Passed | ✅ No merge conflicts detected when merging into dev |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
No actionable comments were generated in the recent review. 🎉
🧹 Recent nitpick comments
src/app/products/share-products/share-product-stepper/share-product-market-price-step/share-product-market-price-step.component.ts (1)
124-129: Pre-existing: dialog close without action will throw.If the user dismisses the dialog (e.g., pressing Escape or clicking outside),
responsecan beundefined, andresponse.datawill throw aTypeError. The same issue exists ineditMarketPricePeriod(line 135) anddeleteMarketPricePeriod(line 147). This predates the current PR, but worth noting.Defensive guard
addMarketPricePeriodDialogRef.afterClosed().subscribe((response: any) => { - if (response.data) { + if (response?.data) {Apply the same pattern at lines 135 and 147.
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 @coderabbitai help to get the list of available commands and usage tips.
|
@alberto-art3ch Thank You for the review |
Changes Made :-
-The Nominal/Unit Price field in the Market Price Period dialog now accept positive numbers (minimum value 1) .
WEB-717
Before :-
After :-
Summary by CodeRabbit
Release Notes