@saltcorn/badges
Advanced tools
Comparing version 0.1.0 to 0.1.1
22
index.js
@@ -39,5 +39,6 @@ const { | ||
.forEach((f) => { | ||
agg_field_opts.push( | ||
`${table.name}.${key_field.name}.${f.name}` | ||
); | ||
agg_field_opts.push({ | ||
name: `${table.name}.${key_field.name}.${f.name}`, | ||
label: `${table.name}.${key_field.name}→${f.name}`, | ||
}); | ||
}); | ||
@@ -58,5 +59,6 @@ }); | ||
joined_table.fields.forEach((jf) => { | ||
agg_field_opts.push( | ||
`${table.name}.${key_field.name}.${kf.name}.${jf.name}` | ||
); | ||
agg_field_opts.push({ | ||
label: `${table.name}.${key_field.name}→${kf.name}→${jf.name}`, | ||
name: `${table.name}.${key_field.name}.${kf.name}.${jf.name}`, | ||
}); | ||
}); | ||
@@ -73,3 +75,3 @@ } | ||
attributes: { | ||
options: agg_field_opts.join(), | ||
options: agg_field_opts, | ||
}, | ||
@@ -96,2 +98,5 @@ }, | ||
const relSplit = relation.split("."); | ||
if (relSplit.length < 3) { | ||
throw new Error("badges view incorrectly configured. No relation chosen"); | ||
} | ||
if (relSplit.length === 3) { | ||
@@ -142,2 +147,5 @@ const [relTableNm, relField, valField] = relSplit; | ||
const relSplit = relation.split("."); | ||
if (relSplit.length < 3) { | ||
throw new Error("badges view incorrectly configured. No relation chosen"); | ||
} | ||
if (relSplit.length === 3) { | ||
@@ -144,0 +152,0 @@ const [relTableNm, relField, valField] = relSplit; |
{ | ||
"name": "@saltcorn/badges", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Display badges from relationships", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7759
201