diff --git a/app/components/catalog/CatalogConfigurator.vue b/app/components/catalog/CatalogConfigurator.vue index 68c517e..49d5100 100644 --- a/app/components/catalog/CatalogConfigurator.vue +++ b/app/components/catalog/CatalogConfigurator.vue @@ -199,6 +199,22 @@ function visibleFields(group: ProductGroup) { return parameterFields.filter((field) => getAllFieldOptions(group, field.key).length > 1); } +function visibleFieldsByColumn(group: ProductGroup) { + const visibleKeys = new Set(visibleFields(group).map((field) => field.key)); + + const leftColumn = parameterFields.filter((field) => ( + visibleKeys.has(field.key) + && ['widthMm', 'lengthM'].includes(field.key) + )); + + const rightColumn = parameterFields.filter((field) => ( + visibleKeys.has(field.key) + && ['thicknessMicron', 'quantityPerBox', 'sleeveBrand'].includes(field.key) + )); + + return { leftColumn, rightColumn }; +} + function requiredKeys(group: ProductGroup) { return visibleFields(group).map((field) => field.key); } @@ -422,38 +438,76 @@ function decrementSelected(group: ProductGroup) {
{{ field.label }}
+{{ field.label }}
-{{ field.label }}
+ +