From cae2904c76601868ebc94bcc4aff77a1b8c31190 Mon Sep 17 00:00:00 2001 From: Vasyka Date: Tue, 1 Sep 2026 10:43:33 +0000 Subject: [PATCH] =?UTF-8?q?feat(faq):=20visual=20redesign=20=E2=80=94=20he?= =?UTF-8?q?ro,=20chip=20toggles,=202-col=20colored=20cards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced the flat vertical list with: - Hero strip (gradient blue) with title, subtitle, and 2 stat pills showing total topics + section count - Controls bar in a card: search input with inline icon, pill-shaped toggle button (green when hints ON), reset button with icon - 2-column responsive grid of area cards. Each card has a colored header (service=blue, crm=purple, depozit=amber, finante=green) with icon + name + count badge - Details/summary items use +/− indicators, tinted background when open, hover state; body has pill-styled links and green next-step - Full dark-mode support - Empty state with search icon Same content, much easier to scan and looks like a proper help center. Co-Authored-By: Claude Opus 4.7 (1M context) --- lang/en.json | 5 + lang/ru.json | 5 + .../views/filament/tenant/pages/faq.blade.php | 303 ++++++++++++++---- 3 files changed, 259 insertions(+), 54 deletions(-) diff --git a/lang/en.json b/lang/en.json index 78f129c..e7a25c0 100644 --- a/lang/en.json +++ b/lang/en.json @@ -151,6 +151,7 @@ "Adresă IP": "IP address", "Adresă email": "Email address", "Adresă livrare:": "Delivery address:", + "Aduce înapoi hint-urile ascunse": "Bring back dismissed hints", "Advance": "Advance", "Aer condiționat": "Air conditioning", "Afișează detalii marjă la procesele calculate": "Show margin details in calculations", @@ -936,6 +937,7 @@ "Generez ZIP...": "Generating ZIP...", "Gestionează tokene API": "Manage API tokens", "Gestionează utilizatori (creează/blochează)": "Manage users (create/block)", + "Ghid rapid AutoCRM": "AutoCRM quick guide", "Global": "Global", "Gol — trage un card aici": "Empty — drop a card here", "Google Maps": "Google Maps", @@ -2057,6 +2059,7 @@ "Toate plățile": "All payments", "Toate produsele": "All products", "Toate rolurile": "All roles", + "Toate răspunsurile la un click distanță. Fiecare pagină are propriile hint-uri „?\" — sau caută mai jos.": "All answers a click away. Every page has its own \"?\" hints — or search below.", "Toate statusurile": "All statuses", "Toate timpurile": "All time", "Token generat!": "Token generated!", @@ -2512,11 +2515,13 @@ "salarii": "salaries", "salariu": "salary", "sau": "or", + "secțiuni": "sections", "set anvelope": "tire set", "seturi anvelope": "tire sets", "site": "Website", "subcontractor": "subcontractor", "subcontractori": "subcontractors", + "subiecte": "topics", "săptămâna curentă": "current week", "tehnician": "technician", "tehnicieni": "technicians", diff --git a/lang/ru.json b/lang/ru.json index f759bac..21cac59 100644 --- a/lang/ru.json +++ b/lang/ru.json @@ -151,6 +151,7 @@ "Adresă IP": "IP-адрес", "Adresă email": "Email", "Adresă livrare:": "Адрес доставки:", + "Aduce înapoi hint-urile ascunse": "Вернуть скрытые подсказки", "Advance": "Аванс", "Aer condiționat": "Кондиционер", "Afișează detalii marjă la procesele calculate": "Показать детали маржи в расчётах", @@ -936,6 +937,7 @@ "Generez ZIP...": "Создаю ZIP...", "Gestionează tokene API": "Управление API-токенами", "Gestionează utilizatori (creează/blochează)": "Управление пользователями (создание/блокировка)", + "Ghid rapid AutoCRM": "Быстрый гид AutoCRM", "Global": "Глобально", "Gol — trage un card aici": "Пусто — перетащите карточку сюда", "Google Maps": "Google Maps", @@ -2057,6 +2059,7 @@ "Toate plățile": "Все платежи", "Toate produsele": "Все товары", "Toate rolurile": "Все роли", + "Toate răspunsurile la un click distanță. Fiecare pagină are propriile hint-uri „?\" — sau caută mai jos.": "Все ответы в одном клике. У каждой страницы свои подсказки «?» — или ищи ниже.", "Toate statusurile": "Все статусы", "Toate timpurile": "За всё время", "Token generat!": "Токен создан!", @@ -2512,11 +2515,13 @@ "salarii": "зарплаты", "salariu": "зарплата", "sau": "или", + "secțiuni": "разделов", "set anvelope": "комплект шин", "seturi anvelope": "комплекты шин", "site": "Сайт", "subcontractor": "субподрядчик", "subcontractori": "субподрядчики", + "subiecte": "тем", "săptămâna curentă": "текущая неделя", "tehnician": "техник", "tehnicieni": "техники", diff --git a/resources/views/filament/tenant/pages/faq.blade.php b/resources/views/filament/tenant/pages/faq.blade.php index 4aaabcc..8122d6b 100644 --- a/resources/views/filament/tenant/pages/faq.blade.php +++ b/resources/views/filament/tenant/pages/faq.blade.php @@ -4,80 +4,275 @@ $areas = $this->getAreas(); $grouped = $this->getGrouped(); $user = auth()->user(); + $totalHints = collect($grouped)->sum(fn ($g) => count($g)); + // Distinct accent color per area for card headers + $areaColors = [ + 'service' => '#0ea5e9', + 'crm' => '#8b5cf6', + 'depozit' => '#f59e0b', + 'finante' => '#10b981', + ]; @endphp
-
+ + {{-- HERO --}} +
+
📖
+
+

{{ __('Ghid rapid AutoCRM') }}

+

{{ __('Toate răspunsurile la un click distanță. Fiecare pagină are propriile hint-uri „?" — sau caută mai jos.') }}

+
+
+
+
{{ $totalHints }}
+
{{ __('subiecte') }}
+
+
+
{{ count($areas) }}
+
{{ __('secțiuni') }}
+
+
+
+ + {{-- CONTROLS --}} +
- {{ __('Sugestii pe pagini:') }} + {{ __('Sugestii pe pagini:') }}
@csrf -
@csrf -
- @if (empty($grouped)) -
{{ __('Nicio potrivire pentru „:q".', ['q' => $search]) }}
- @endif - - @foreach ($grouped as $areaKey => $hints) - @php $area = $areas[$areaKey] ?? null; @endphp -
-
- {{ $area['icon'] ?? '📖' }} - {{ $area['label'][$lc] ?? $areaKey }} - ({{ count($hints) }}) + {{-- GRID --}} +
+ @if (empty($grouped)) +
+
🔍
+ {{ __('Nicio potrivire pentru „:q".', ['q' => $search]) }}
- @foreach ($hints as $key => $h) -
- {{ $h['title'][$lc] ?? $h['title']['ro'] }} -
- {{ $h['body'][$lc] ?? $h['body']['ro'] }} - @if (! empty($h['next'][$lc])) -
→ {{ $h['next'][$lc] }}
- @endif - @if (! empty($h['links'])) -
- @endforeach -
- @endforeach + + @endforeach +
+
+ @endforeach +