CodeValue support
GG maintains lists of "allowed" values for specific fields as groups of CodeValue
records. These are not constrained by the database engine and are stored as varchar
.
/api/v1/app/codes/{lang} returns:
These codes are application-wide. They should be periodically reloaded. SSR can ignore them.
UI
Add a CodeValue
component that displays the currently selected value. It requires codeGroup: string
and value: string
parameters. The component displays the title
of the selected entry.
Add a CodeValueLookup
component for forms similar to CooperatorLookup
in Cooperator.tsx just that it is more of a dropdown list without the search option. It displays the currently selected value (and description), on click it shows a list of options with the current one highlighted as selected.