1
0
Fork 0
mirror of synced 2024-07-04 05:50:57 +12:00

Adjustments to accomodate the updates scanner type

This commit is contained in:
Dean 2022-10-10 12:11:29 +01:00
parent dc38ad03a0
commit cbdf7c8bd1
2 changed files with 2 additions and 3 deletions

View file

@ -51,7 +51,7 @@ const componentMap = {
"field/link": FormFieldSelect, "field/link": FormFieldSelect,
"field/array": FormFieldSelect, "field/array": FormFieldSelect,
"field/json": FormFieldSelect, "field/json": FormFieldSelect,
"field/barcodeqr": FormFieldSelect, "field/barcode/qr": FormFieldSelect,
// Some validation types are the same as others, so not all types are // Some validation types are the same as others, so not all types are
// explicitly listed here. e.g. options uses string validation // explicitly listed here. e.g. options uses string validation
"validation/string": ValidationEditor, "validation/string": ValidationEditor,

View file

@ -26,7 +26,7 @@
let entries = Object.entries(schema ?? {}) let entries = Object.entries(schema ?? {})
let types = [] let types = []
if ((type === "field/options", type === "field/barcodeqr")) { if ((type === "field/options", type === "field/barcode/qr")) {
// allow options to be used on both options and string fields // allow options to be used on both options and string fields
types = [type, "field/string"] types = [type, "field/string"]
} else { } else {
@ -35,7 +35,6 @@
types = types.map(type => type.split("/")[1]) types = types.map(type => type.split("/")[1])
entries = entries.filter(entry => types.includes(entry[1].type)) entries = entries.filter(entry => types.includes(entry[1].type))
return entries.map(entry => entry[0]) return entries.map(entry => entry[0])
} }
</script> </script>