From d2c5ee600f947ed262d43b4068104cf99949f516 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Fri, 3 Apr 2026 12:35:28 +0700 Subject: [PATCH] refactor(catalog): compact group card with visual toggles and bottom accordion --- .../catalog/CatalogConfigurator.vue | 108 +++++++++++------- 1 file changed, 64 insertions(+), 44 deletions(-) diff --git a/app/components/catalog/CatalogConfigurator.vue b/app/components/catalog/CatalogConfigurator.vue index ef4de30..6f9abbe 100644 --- a/app/components/catalog/CatalogConfigurator.vue +++ b/app/components/catalog/CatalogConfigurator.vue @@ -308,6 +308,14 @@ function formatOptionLabel(field: ParamFieldKey, value: ParamValue) { return String(value); } +function selectedFieldValue(group: ProductGroup, field: ParamFieldKey) { + const value = getGroupState(group)[field]; + if (value === null) { + return '—'; + } + return formatOptionLabel(field, value); +} + function incrementProduct(product: ProductNode) { if (getQuantity(product.id) === 0) { addProduct({ @@ -376,17 +384,48 @@ function decrementSelected(group: ProductGroup) { :key="group.key" class="surface-card rounded-3xl p-4 md:p-5" > -