-
Notifications
You must be signed in to change notification settings - Fork 4
fix: add constants, change payload structure, new company on input #784
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
base: master
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughIntroduces SPONSOR_USER_ASSIGNMENT_TYPE enum and replaces hard-coded "existing"/"new" strings across sponsor request processing and form logic; updates payload branching for existing vs new sponsor assignments; enhances CompanyInputMUI with allowCreate, debouncing, and create-option behavior. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
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 unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
Signed-off-by: Tomás Castillo <[email protected]>
Signed-off-by: Tomás Castillo <[email protected]>
7b09f66 to
443fd6f
Compare
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/mui/formik-inputs/company-input-mui.js (1)
92-110:⚠️ Potential issue | 🟡 MinorHandle create-option values in multi-select when allowCreate is enabled.
The multi-select path doesn't normalize
inputValuelike the single-select path does. When users create a new entry:
- With
plainValue: stores'Create "..."'instead of the user input text- Without
plainValue: callsparseInt(v.value)wherev.valueisnull(created at line 129), resulting inNaNidsApply the same
inputValuehandling from the single-select path (lines 106–109):
- plainValue:
v.inputValue || v.label- id:
v.inputValue ? 0 : parseInt(v.value)🔧 Proposed fix
} else if (isMulti) { theValue = plainValue - ? newValue.map((v) => v.label) - : newValue.map((v) => ({ - id: parseInt(v.value), - name: v.label - })); + ? newValue.map((v) => v.inputValue || v.label) + : newValue.map((v) => ({ + id: v.inputValue ? 0 : parseInt(v.value), + name: v.inputValue || v.label + })); } else {
src/pages/sponsors/sponsor-users-list-page/components/process-request-form.js
Outdated
Show resolved
Hide resolved
smarcet
left a comment
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.
@tomrndom please review comments
src/pages/sponsors/sponsor-users-list-page/components/process-request-form.js
Show resolved
Hide resolved
smarcet
left a comment
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.
@tomrndom please review comments
Signed-off-by: Tomás Castillo <[email protected]>
Signed-off-by: Tomás Castillo <[email protected]>
ref: https://app.clickup.com/t/86b8e1vcf
Signed-off-by: Tomás Castillo [email protected]
Summary by CodeRabbit
Refactor
New Features