From 6e0e85db869b56d3e093c6e63d3e74418a8d1a17 Mon Sep 17 00:00:00 2001 From: wasrusgen Date: Wed, 3 Jun 2026 13:43:17 +0300 Subject: [PATCH] =?UTF-8?q?ux(cabinet):=20=D0=BE=D0=B1=D1=8A=D0=B5=D0=B4?= =?UTF-8?q?=D0=B8=D0=BD=D0=B8=D1=82=D1=8C=20=D0=AD=D1=82=D0=B0=D0=BF=201+2?= =?UTF-8?q?=20=D0=B2=20=C2=AB=D0=A0=D0=B0=D0=B7=D0=B3=D0=BE=D0=B2=D0=BE?= =?UTF-8?q?=D1=80=20=D1=81=20=D0=95=D0=BB=D0=B5=D0=BD=D0=BE=D0=B9=C2=BB=20?= =?UTF-8?q?=E2=80=94=20=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=20=D0=BD=D0=B5?= =?UTF-8?q?=20=D1=82=D0=B5=D1=80=D1=8F=D0=B5=D1=82=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=82=D0=B5=D0=BA=D1=81=D1=82=20(4=20=D1=88=D0=B0=D0=B3=D0=B0?= =?UTF-8?q?=20=D0=B2=D0=BC=D0=B5=D1=81=D1=82=D0=BE=205)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/cabinet.html | 44 +++++++++++--------------------------------- 1 file changed, 11 insertions(+), 33 deletions(-) diff --git a/docs/cabinet.html b/docs/cabinet.html index e62c976..da4154e 100644 --- a/docs/cabinet.html +++ b/docs/cabinet.html @@ -280,11 +280,10 @@ body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);displ
👤
Профиль компании
О вашей деятельности
Путь к результату
-
1
Этап 1
Знакомство
Интервью с Еленой
-
2
Этап 2
Диагностика
Углубление
-
3
Этап 3
Документы
Материалы
-
4
Этап 4
Анализ
Модель бизнеса
-
5
Этап 5
План
ТЗ на программу
+
1
Этап 1
Разговор с Еленой
Знакомство и диагностика
+
2
Этап 2
Документы
Материалы
+
3
Этап 3
Анализ
Модель бизнеса
+
4
Этап 4
План
ТЗ на программу
💬
Консультант
Связаться с Русланом
@@ -305,9 +304,9 @@ body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);displ - +
-
💬
Этап 1 из 5 · В процессе
Знакомство
Расскажите Елене о вашем бизнесе — текстом или голосом
+
💬
Этап 1 из 4 · В процессе
Разговор с Еленой
Расскажите о бизнесе — Елена знакомится и сразу углубляется в детали. Текстом или голосом.
@@ -316,20 +315,9 @@ body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);displ
- -
-
🔍
Этап 2 из 5 · Диагностика
Углубляемся
Елена задаёт уточняющие вопросы — отвечайте. Это продолжение разговора с Этапа 1.
-
-
- - - -
-
-
-
📁
Этап 3 из 5
Документы
Загрузите материалы — Елена учтёт их в анализе
+
📁
Этап 2 из 4
Документы
Загрузите материалы — Елена учтёт их в анализе
📎
@@ -343,13 +331,13 @@ body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);displ
-
🧠
Этап 4 из 5
Анализ бизнеса
Елена строит модель вашего бизнеса
+
🧠
Этап 3 из 4
Анализ бизнеса
Елена строит модель вашего бизнеса
-
🚀
Этап 5 из 5
План — ТЗ на программу
Проект системы для вашего бизнеса
+
🚀
Этап 4 из 4
План — ТЗ на программу
Проект системы для вашего бизнеса
@@ -389,7 +377,7 @@ const urlToken=new URLSearchParams(location.search).get("t"); if(urlToken)localStorage.setItem("cab_token",urlToken); let token=urlToken||localStorage.getItem("cab_token"), state=null, cur=1; const chat=document.getElementById("chat"), inp=document.getElementById("inp"); -const PCTS={1:20,2:40,3:60,4:80,5:100}; +const PCTS={1:25,3:50,4:75,5:100}; // 4 шага для клиента (Этап 1 объединён) function esc(s){return (s||"").replace(/&/g,"&").replace(//g,">")} function fmt(s){return esc(s).replace(/\*\*(.+?)\*\*/g,"$1")} @@ -411,7 +399,6 @@ function go(n){ document.getElementById('si'+n).classList.add('active'); if(PCTS[n]!=null){document.getElementById('pbPct').textContent=PCTS[n]+'%';document.getElementById('pbFill').style.width=PCTS[n]+'%';} if(n===1){renderChat1();requestAnimationFrame(scrollChatBottom);} // ре-рендер из общей беседы - if(n===2)renderChat2(); // продолжение того же диалога if(n===6){renderOpChat();startOpPoll();}else{stopOpPoll();} if(n===3)renderDocs(); if(n===4)renderAnalysis(); @@ -593,15 +580,6 @@ function renderAll(){ checkPayment(); } function renderChat1(){const c=document.getElementById("chat");if(!c)return;c.innerHTML="";(state.messages||[]).forEach(m=>addMsg(m.role==="user"?"user":"elena",m.content));} -/* ── Этап 2 — продолжение диалога (тот же state.messages) ── */ -function addMsg2(role,text){const c=document.getElementById("chat2");if(!c)return;const m=document.createElement("div");m.className="msg "+(role==="user"?"user":"");m.innerHTML=`
${role==='user'?'Я':'Е'}
${fmt(text)}
`;c.appendChild(m);const sc=c.parentElement;if(sc)sc.scrollTop=sc.scrollHeight;} -function renderChat2(){const c=document.getElementById("chat2");if(!c)return;c.innerHTML="";const m=state.messages||[];if(!m.length){c.innerHTML='
Начните разговор на Этапе 1 — здесь Елена продолжит уточнять детали.
';return;}m.forEach(x=>addMsg2(x.role==="user"?"user":"elena",x.content));requestAnimationFrame(()=>{const sc=c.parentElement;if(sc)sc.scrollTop=sc.scrollHeight;});} -async function sendMsg2(){const i=document.getElementById("inp2");const t=i.value.trim();if(!t)return;if(recording)stopMic();i.value="";i.style.height="auto";addMsg2("user",t);state.messages.push({role:"user",content:t}); - const btn=document.getElementById("send2");btn.disabled=true; - const tp=document.createElement("div");tp.className="msg";tp.id="typing2";tp.innerHTML='
Е
';document.getElementById("chat2").appendChild(tp);const sc=document.getElementById("chat2").parentElement;if(sc)sc.scrollTop=sc.scrollHeight; - try{const r=await fetch(`${API}/api/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token,message:t})});const d=await r.json();const x=document.getElementById("typing2");if(x)x.remove();addMsg2("elena",d.reply||("Ошибка: "+(d.error||"?")));state.messages.push({role:"assistant",content:d.reply||""});unlockStages();}catch(e){const x=document.getElementById("typing2");if(x)x.remove();addMsg2("elena","Ошибка связи: "+e.message);} - btn.disabled=false; -} function money(n){return (n||0).toLocaleString("ru-RU")+" ₽"} function checkPayment(){ const crm=state.crm||{};const deal=crm.deal_amount||0; @@ -668,7 +646,7 @@ async function payVia(method){ function unlockStages(){ // Этап 4 доступен если есть достаточно сообщений const enough=state.messages.length>=3; - [2,3,4,5].forEach(n=>{const si=document.getElementById('si'+n);if(enough||n<=3)si.classList.remove('locked');}); + [3,4,5].forEach(n=>{const si=document.getElementById('si'+n);if(si&&(enough||n===3))si.classList.remove('locked');}); } async function sendMsg(){