ZettaKonsult/zetta-workspace

use rules to generate stuff

Offen

#73 geöffnet am 11.01.2018

 (2 Kommentare) (0 Reaktionen) (2 zugewiesene Personen)JavaScript (0 Forks)auto 404
enhancementhelp wanted

Repository-Metriken

Stars
 (0 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

rules contain a lot of information from this it should be possible to dynamically generate a form that makes sense for the given case.

{ id: string, name: string, group: string, attribute: enum[label, id], key: string, func: enum[only, lessThan, moreThan, none, atMost, atLeast], value: string, error: string }

a rule like this could return an object like

{ label: "nation", - name of the group if it contains one, not used for singel required plans options: [], - id to the plans that you can choose from obligatory: number, - number of obligatory number of plans if any variable: boolean - to indicate if the ui should account for the user adding or removing plans }

options.length === 1 && obligatory === 1 could then be rendered as a disabled field

label && options > 1 && obligatory > 1 && variable could then be rendered right away as 2 selects with the option to add more but not remove below 2 fields

Don't know if this should be accomplished by just writing a lot of boilerplate or if there is some cool way of doing this.

Contributor Guide