diff --git a/miniapp/assets/podbor.css b/miniapp/assets/podbor.css index a714a63..c4423d7 100644 --- a/miniapp/assets/podbor.css +++ b/miniapp/assets/podbor.css @@ -1130,6 +1130,7 @@ text-transform: uppercase; color: var(--muted); flex-shrink: 0; + max-width: 40%; } .rev-val { font-family: var(--font-sans); @@ -1137,7 +1138,12 @@ font-weight: 500; color: var(--ink); text-align: right; - line-height: 1.3; + line-height: 1.35; + flex: 1; + min-width: 0; + overflow-wrap: break-word; + word-break: normal; + hyphens: auto; } .rev-val .muted { color: var(--muted); font-weight: 400; } diff --git a/miniapp/assets/podbor.js b/miniapp/assets/podbor.js index d985425..6434bf4 100644 --- a/miniapp/assets/podbor.js +++ b/miniapp/assets/podbor.js @@ -439,7 +439,22 @@ const Podbor = (function () { function getCatState(catKey) { const cs = state.per_cat[catKey]; - if (cs && cs.answers) return cs; // уже в новой форме + if (cs && cs.answers) { + // Чистим ответы для шагов, которых больше нет в текущей схеме + // (нужно при обновлении логики категории: например убрали класс энерго у ПММ) + const config = PODBOR_PARAMS[catKey]; + if (config?.steps) { + const validKeys = new Set(config.steps.map(s => s.key)); + const filtered = {}; + for (const [k, v] of Object.entries(cs.answers)) { + if (validKeys.has(k)) filtered[k] = v; + } + if (Object.keys(filtered).length !== Object.keys(cs.answers).length) { + cs.answers = filtered; + } + } + return cs; + } // Миграция / инициализация return { answers: {}, notes: cs?.notes || "", _step: 0 }; } diff --git a/miniapp/index.html b/miniapp/index.html index 7b18c11..aeea769 100644 --- a/miniapp/index.html +++ b/miniapp/index.html @@ -12,8 +12,8 @@ - - + +