diff --git a/app/pages/catalog-settings.vue b/app/pages/catalog-settings.vue index 2662f69..932762a 100644 --- a/app/pages/catalog-settings.vue +++ b/app/pages/catalog-settings.vue @@ -165,6 +165,18 @@ function parseTextOptionList(values: string[]) { return normalizeOptionList(values, 'text'); } +function enabledCustomizationCount(form: CatalogSettingForm) { + return [ + form.allowCustomLength, + form.allowCustomSleeveBrand, + form.allowCustomLabel, + ].filter(Boolean).length; +} + +function filledParameterGroupCount(form: CatalogSettingForm) { + return OPTION_GROUPS.filter((group) => form[group.key].length > 0).length; +} + watch( settings, (items) => { @@ -235,15 +247,31 @@ async function saveAllSettings() { Типы товаров пока не появились в каталоге. -
-
+
-
-

{{ item.productType }}

+ +
+

{{ item.productType }}

+

+ {{ filledParameterGroupCount(formFor(item)) }} параметров, {{ enabledCustomizationCount(formFor(item)) }} кастомные возможности +

+
+
+ + + + + + +
+
+ +
-
+