|
@@ -85,7 +85,7 @@ const combineExtraMeta = (metaG, metaExtra) => {
|
|
|
};
|
|
|
|
|
|
// ---------------------------------------------------------------------------------------------------------------------
|
|
|
-// Build Modelled Metadata - Form Metadata Factory - UNDERWAY
|
|
|
+// Build Modelled Metadata - Form Metadata Factory
|
|
|
|
|
|
const buildClassName = (t = 'text') => {
|
|
|
const start = t[0].toUpperCase() + t.slice(1);
|
|
@@ -97,11 +97,11 @@ const buildClassName = (t = 'text') => {
|
|
|
|
|
|
const buildModeledField = metaFoG => {
|
|
|
const type = isContainer(metaFoG) ? 'container' : metaFoG.type;
|
|
|
- const fieldType = buildClassName(type);
|
|
|
- if (!fmdModels[fieldType]) {
|
|
|
- throw new Error(`No model for field type "${type}"`);
|
|
|
+ const className = buildClassName(type);
|
|
|
+ if (!fmdModels[className]) {
|
|
|
+ throw new Error(`No metadata model "${className}" for type "${type}"`);
|
|
|
}
|
|
|
- return new fmdModels[fieldType](metaFoG);
|
|
|
+ return new fmdModels[className](metaFoG);
|
|
|
};
|
|
|
|
|
|
// Build Form Group Member
|