Skip to content

[candidate_parameters] Family tab should rely on options from SQL instead of redefining them in JS #10499

@ridz1208

Description

@ridz1208

Is your feature request related to an existing module?
The Candidate Parameter's Family tab allows a user to select the type of relationship between 2 candidates but the source of truth of the possible relationship types is defined in both SQL (family table) AND in the JavaScript code https://github.com/aces/Loris/blob/main/modules/candidate_parameters/jsx/FamilyInfo.js#L135 making project flexibility very limited without an override.

Describe the solution you'd like
There is no reason the options can not be loaded directly from the SQL, if it is done for proper labeling, we can use either an automatic underscore-to-space conversion or a name-label in SQL to manually define labels for each.

Additional context
The Candidate parameters module is reachable by going to access profile (candidate_list) --> click on a candidate --> click on candidate info.
In some cases the Family tab is unaccessible if the study configuration does not have it enables (check config module)

Metadata

Metadata

Assignees

Labels

Beginner FriendlyPR or Issue appears to be easy for someone to use to familiarize themselves with LORISLanguage: JavascriptPR or issue that update Javascript codeLanguage: PHPPR or issue that update PHP codeLanguage: SQLPR or issue that update SQL codeModule: candidate_parametersPR or issue related to candidate_parameters moduleProposalPR or issue suggesting an improvement that can be accepted, rejected or altered

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions