Commit Graph

68 Commits

Author SHA1 Message Date
wasrusgen
1ca8b3a5a1 bot: role buttons → MiniApp directly + branded splash loader
Bot: упрощён до одного шага — /start показывает 2 reply-кнопки
[👤 Я менеджер] [🏠 Я клиент], обе уже WebApp — открывают кабинет
сразу с нужным role= в query. Никаких промежуточных меню.

MiniApp: новый брендированный загрузочный экран с логотипом ZOV
(inline SVG, fill = walnut #6B4A2B), дыхательной анимацией 2.2s,
тонкой полоской прогресса и подписью «Открываем кабинет · ZOV».
Splash прячется (350мс минимум + fade-out) после рендера главного
экрана или маунта подэкрана (Podbor/Clients/Measurements).

Cache bust v=20260513c.
2026-05-12 18:54:09 +03:00
wasrusgen
b2438507c3 bot: persistent reply keyboard with WebApp buttons + info actions
Now after /start, manager sees a bottom keyboard (4 rows) for fast access:
  Row 1: 🤖 Подбор техники | 📐 Новый замер   ← WebApp
  Row 2: 👥 Мои клиенты    | 🏠 Кабинет       ← WebApp
  Row 3: ℹ️ Что умеет бот? | 📞 Куратор       ← text
  Row 4: 📋 Чек-лист встречи                  ← text

WebApp buttons jump straight to a MiniApp screen via ?go=<podbor|measure|clients>;
app.js parses ?go on load and pre-sets location.hash so the right module mounts.

Added /menu (re-show keyboard) and /hide (remove). Text buttons trigger
in-chat info responses (bot description, contact, meeting checklist).

Cache bust v=20260513b.
2026-05-12 18:37:24 +03:00
wasrusgen
10bcc75b13 measurements: kitchen layout wizard + 5 layout pictograms + profile integration
5 LAYOUT PICTOGRAMS (podbor.picts.js):
- linear: одна стена с гарнитуром
- l_shape: Г-образная, две стены с подсвеченным углом
- u_shape: П-образная, три стены
- island: линейный гарнитур + отдельный остров посередине
- peninsula: Г-образная + барная стойка-полуостров
Все в стиле D · top-down view, walnut stroke, теплые градиенты

MEASUREMENTS.JS WIZARD (5 шагов):
1. client_info — имя + телефон (валидация)
2. layout — pict-карточки 5 типов
3. size — длины стен (1-3 по layout), площадь, потолок (мм)
4. openings — окно / дверь / коммуникации / заметки
5. summary — обзор + Сохранить → POST /api/measurement

BACKEND (main.py):
- New /api/measurements (POST) для списка замеров менеджера
  с опц. фильтрами по client_tg_id
- _handle_measurement теперь дописывает имя+телефон клиента в notes
  (если client_tg_id не зарегистрирован — это новый клиент без аккаунта)
- handlers dispatcher: 'measurements' route added

ROUTING (app.js):
- Quick-action 'Новый замер' wired to '#/measure'
- routeByHash: Measurements.mount on #/measure

CLIENT PROFILE (clients.js):
- New section 'Замеры · N' on client history page
- fetchMeasurements() filters by client_tg_id or name match in notes
- layoutLabel() shows Russian label (Прямая / Угловая Г / etc.)
- Cache bump v=20260512c
2026-05-12 17:41:01 +03:00
wasrusgen
c4f3016b56 miniapp: client profile tab — list + history + lead detail
NEW FILE assets/clients.js:
- Clients.mount(container) — hash-routed view
  - #/clients              — list of all clients (cards: avatar, name, phone, leads count, last date)
  - #/clients/client/<key> — single client history (all leads as items)
  - #/clients/lead/<id>    — full lead detail with re-rendered report

UI:
- Card style: avatar with initial, name + phone, footer with N подборов + дата
- Pluralization for Russian (1 подбор / 2 подбора / 5 подборов)
- Date format: 'сегодня · 14:30' or 'DD.MM.YYYY'
- Status pills: new / sent / viewed / ordered

PODBOR.JS:
- Exposed renderSavedReport(ai, leadId) for Clients module reuse
- Same renderer as live podbor — same matrix, pros/cons, links

APP.JS:
- Quick action 'Клиенты' added (icon: user)
- Hash router: #/clients → Clients.mount()

INDEX.HTML:
- clients.js script added
- Cache bumped to v=20260512a

CSS:
- .client-list, .client-card with avatar+meta+footer
- .client-detail-head (big card with avatar 56px)
- .leads-list with .lead-item (grid: date | id | status | arrow)
- .loader-inline for async fetch
- .ai-text-fallback for legacy text-only responses
2026-05-12 07:20:54 +03:00
wasrusgen
a849491f56 fix(miniapp): /api/me path for FastAPI backend (was ?path=me from Apps Script) 2026-05-10 22:19:34 +03:00
wasrusgen
f85d3a9d1e feat(miniapp): switch BACKEND_URL to Cloudflare Tunnel → VPS backend (GigaChat live) 2026-05-10 22:18:53 +03:00
wasrusgen
d1165d5e4f feat(miniapp): «Подбор техники» screen — 7-step picker (categories/niches/budget/infra/scenario/brands/summary) wired to /api/podbor 2026-05-09 13:34:46 +03:00
wasrusgen
86cd4eb614 fix(miniapp/A): tighter quick action cards (no min-height) + smaller hero buttons 2026-05-09 13:06:54 +03:00
wasrusgen
af7dc07720 feat: one-tap role buttons (WebApp directly, no intermediate step) + role param in URL/backend 2026-05-09 13:05:20 +03:00
wasrusgen
017d179746 feat(miniapp): manager home v2 — greeting + hero today-task + 2x2 quick actions + active projects + bottom nav 2026-05-09 12:59:41 +03:00
wasrusgen
ce91c0283b feat(miniapp): lock to variant A; green active dot; tighter spacing in menu and profile card 2026-05-09 12:25:19 +03:00
wasrusgen
7e0d2b98b0 feat(miniapp): three-variant design switcher (Brand/A/C) with literal palettes from mockups 2026-05-09 12:19:14 +03:00
wasrusgen
5032b27049 fix(miniapp): detect Telegram dark theme via tg.colorScheme; bump dark-mode contrast 2026-05-09 11:47:28 +03:00
wasrusgen
d7bd0aa5c2 feat(miniapp): hybrid Architectural Clean design — Inter + Instrument Serif italic + JetBrains Mono, paper palette, ZOV accents 2026-05-09 11:31:30 +03:00
wasrusgen
67dd0eac0c fix(miniapp): correct backend URL format + drop Content-Type to avoid CORS preflight 2026-05-09 11:11:21 +03:00
wasrusgen
4f0c51c453 feat(miniapp): connect to deployed Apps Script backend 2026-05-09 10:45:35 +03:00
wasrusgen
57eefbbf5c feat(miniapp): premium redesign — gradient profile card, SVG icons, native-style grouped menus, dark theme 2026-05-09 01:22:30 +03:00
wasrusgen
0c5ed48303 chore: initial scaffold (bot, miniapp, backend, docs) 2026-05-08 23:56:48 +03:00