Last active
January 14, 2019 11:09
-
-
Save qmateub/ee39d9c5cb396c5da312468a30cb0789 to your computer and use it in GitHub Desktop.
Form conversions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
[group]: { // group is products, categories, customers (each collapsible panel in the designs contains a group data) | |
auxiliaryValues: { // this values are just for the form behaviours that's why is called auxiliar | |
enabled: Boolean, // Computed if in the permissions object you have `manage${group}` or `view${group}` | |
viewOnly: Boolean, // you check for `manage${group}` false and `view${group}` true | |
viewAndEdit: Boolean, // you check only form `manage${group}` true | |
}, | |
actionRights: { | |
// publishProducts, unpublishProducts,etc. All the stuff computed from `allSupportedActionRights` and the data from the CORE API. | |
} | |
} | |
} | |
// The idea is to end with N groups in the form values so each panel knows what data contains | |
// and to which group belongs so then is easily to map to the doc again for submitting values. Thougts? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment