WEB-704 Restrict negative values for group rules minimum savings amount and share price fields#3133
Conversation
…nt and Share Price Fields
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
Form Field Constraint Enhancement src/app/core/utils/datatables.ts |
Added conditional logic to compute field identification values and apply min: 0 constraint to InputBase options for minSavingsAmount and priceOneShare TEXT column types. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
- IOhacker
- alberto-art3ch
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title directly and specifically describes the main change: restricting negative values for two specific form fields in group rules. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ 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/core/utils/datatables.ts (1)
47-49: Hardcoding domain-specific field names in a generic utility is a maintainability concern.
datatables.tsis a generic utility for all datatable form fields, but theminimumsavingsamountpermeetingandpriceofonesharechecks are specific to Group Rules. If more fields need similar constraints in the future, this approach doesn't scale and pollutes the generic layer.Consider instead allowing callers to pass field-level validation constraints (e.g., a
Map<string, {min?: number, max?: number}>) intogetFormfields, keeping this utility domain-agnostic.
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 :-
-Restricts "Minimum Savings Amount per Meeting" and "Price of one Share" fields in group rules form to only accept zero or positive values..
WEB-704
Before :-
After :-
Summary by CodeRabbit