Review everything related to Editors / Modules
This issue is more abstract.
A review of the all the stuff related to editors/modules is needed. It's not very well commented but I would be happy to help explaining what is going on.
Module displays basically information corresponding to a Django model.
Editor can be thought as Form Manager. It contains
Each module should have a custom editor.
You also have
groupModules to handle cases where you can have multiple times the same module (for example several CountryScholarships).
Few improvements I see:
- Remove all the
Editorshould be able to detect its field by looking through its
- Instead of giving a
valueto a field and a
fieldMapping, maybe give it
fieldMapping(it would reduce redundancy). Or better create a new prop and give it an array of [
fieldMapping]. You would need to add a prop
extractValue, a function that takes
props.modelData[props.fieldMapping]and make the potential necessary conversions (e.g. dates).
- Review the stuff related to