-
Notifications
You must be signed in to change notification settings - Fork 195
Comments
candidate_parameters: replace $.ajax with lorisFetch#10334
candidate_parameters: replace $.ajax with lorisFetch #10334Montekkundan wants to merge 4 commits intoaces:main from
Conversation
Montekkundan
commented
Feb 10, 2026
Follow-up pushed to align with #9999 Client guidance.
Updated
- Added module client:
modules/candidate_parameters/jsx/CandidateParametersClient.js - Migrated JSON/data operations in:
CandidateInfo.jsConsentStatus.jsFamilyInfo.jsParticipantStatus.jsProbandInfo.js
Notes
- JSON fetch/submit now goes through module client methods (
getJSON,postForm). - Existing UI behavior and error display flow were preserved.
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.
It seems like we are deconstructing the URL only to rebuild it.
The Client shouldn't be sent URLs, it should receive data and then decide for itself which endpoint to target.
Where does the URL string being passed into getJSON originate? Instead of passing a URL, can we pass the raw parameters directly so we can use this.get(query) without all this manual parsing?
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.
This is making me realise we need to standardize how our Client subclass methods receive data... I'll have to think on how to implement that.
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.
I replaced the URL based client call with getData(candID, tabName) and updated the 5 candidate_parameters components to use it.
Summary
Replace
$.ajaxcalls withlorisFetchincandidate_parameters.Why
This removes jQuery AJAX usage in this module for issue #4213.
Scope
Only AJAX replacement in this module. No unrelated jQuery refactors.
Dependency
Depends on #10333 .
Verification
git grep '\$\.ajax'is clean for touched files.