Skip to content

WEB-717 Prevent negative values for nominal unit price in market price period#3146

Merged
alberto-art3ch merged 1 commit intoopenMF:devfrom
JaySoni1:WEB-717-prevent-negative-values-for-nominal-unit-price-in-market-price-period
Feb 13, 2026
Merged

WEB-717 Prevent negative values for nominal unit price in market price period#3146
alberto-art3ch merged 1 commit intoopenMF:devfrom
JaySoni1:WEB-717-prevent-negative-values-for-nominal-unit-price-in-market-price-period

Conversation

@JaySoni1
Copy link
Contributor

@JaySoni1 JaySoni1 commented Feb 13, 2026

Changes Made :-

-The Nominal/Unit Price field in the Market Price Period dialog now accept positive numbers (minimum value 1) .

WEB-717

Before :-

image

After :-

image

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Added minimum value validation to the Nominal/Unit Price field in the product sharing flow, ensuring prices cannot be set below 1.

@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'pre_merge_checks'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

A minimum validation constraint of 1 is added to the shareValue form field in the ShareProductMarketPriceStepComponent to enforce that the Nominal/Unit Price must be at least 1.

Changes

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), response can be undefined, and response.data will throw a TypeError. The same issue exists in editMarketPricePeriod (line 135) and deleteMarketPricePeriod (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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Collaborator

@alberto-art3ch alberto-art3ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alberto-art3ch alberto-art3ch merged commit 42d8d61 into openMF:dev Feb 13, 2026
5 checks passed
@JaySoni1
Copy link
Contributor Author

@alberto-art3ch Thank You for the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants