fm-editor: add a linkedSearchConditions field option
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 20 Apr 2021 21:57:08 +0000 (17:57 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 20 Apr 2021 22:31:14 +0000 (18:31 -0400)
commitb2aa2073ca3d0a3d36ad803f7e183d85cc2fe146
treee096b62907d85fe27c82e43ea9329672bea95022
parent6362f13a8770c293a1a47c2ca119e8d4ad4480d5
fm-editor: add a linkedSearchConditions field option

This option allows the caller to specify conditions to add
when retrieving values for a linked field, e.g., to specify
that only active values should be fetched.

Example usage:

[fieldOptions]="{fund:{linkedSearchConditions:{'active':'t'}}}"

If the underlying record has a value set for the linked field, that
value will be included when preloadLinkedValues and the value
doesn't otherwise meet the search conditions.

This patch also sorts the values if preloadLinkedValues is used.

TODO: add a limit condition?

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts
Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html