Skip to content

Conversation

@Dmytro-Melnyshyn
Copy link
Contributor

@Dmytro-Melnyshyn Dmytro-Melnyshyn commented Jan 27, 2026

Purpose

  1. Hide AffiliationsSelect for patron, dcb, and system user types on the edit page.
  2. When saving the edit page via a shortcut, the page crashes locally, and an error is visible in devTools in all envs.
    UserForm.js:244 Uncaught TypeError: e(...) is not a function
  3. Don't allow saving a record via a shortcut if no edits are made.

Approach

  1. Use the isAffiliationsEnabled(user) function to check if a user is allowed to see the AffiliationsSelect.
  2. Remove const submitter = handleSubmit(onSubmit); and use handleSubmit(e).
  3. Add if (disabled) return;.

Issues

https://folio-org.atlassian.net/browse/UIU-3374

Screenshots

2026-01-27_18h21_41.mp4

Approach

TODOS and Open Questions

Learning

Pre-Merge Checklist

Before merging this PR, please go through the following list and take appropriate actions.

  • I've added appropriate record to the CHANGELOG.md
  • Does this PR meet or exceed the expected quality standards?
    • Code coverage on new code is 80% or greater
    • Duplications on new code is 3% or less
    • There are no major code smells or security issues
  • Does this introduce breaking changes?
    • If any API-related changes - okapi interfaces and permissions are reviewed/changed correspondingly
    • There are no breaking changes in this PR.

If there are breaking changes, please STOP and consider the following:

  • What other modules will these changes impact?
  • Do JIRAs exist to update the impacted modules?
    • If not, please create them
    • Do they contain the appropriate level of detail? Which endpoints/schemas changed, etc.
    • Do they have all they appropriate links to blocked/related issues?
  • Are the JIRAs under active development?
    • If not, contact the project's PO and make sure they're aware of the urgency.
  • Do PRs exist for these changes?
    • If so, have they been approved?

Ideally all of the PRs involved in breaking changes would be merged in the same day to avoid breaking the folio-testing environment. Communication is paramount if that is to be achieved, especially as the number of intermodule and inter-team dependencies increase.

While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

Jest Unit Test Results

    1 files  ±0    273 suites  ±0   5m 39s ⏱️ -3s
1 309 tests +3  1 306 ✅ +3  3 💤 ±0  0 ❌ ±0 
1 350 runs  +3  1 347 ✅ +3  3 💤 ±0  0 ❌ ±0 

Results for commit d8a92a0. ± Comparison against base commit 32439a1.

♻️ This comment has been updated with latest results.

… form submission handling in UserForm component.
@sonarqubecloud
Copy link

@OleksandrHladchenko1 OleksandrHladchenko1 requested a review from a team January 29, 2026 14:48
@Dmytro-Melnyshyn Dmytro-Melnyshyn merged commit 33b9a57 into master Jan 29, 2026
15 checks passed
@Dmytro-Melnyshyn Dmytro-Melnyshyn deleted the UIU-3374 branch January 29, 2026 15:43
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.

3 participants