feat(hints): contextual help system + FAQ page (MVP)
Infrastructure for a portal-wide in-app help system:
* Users have hints_enabled (default true) and dismissed_hints (JSON
array) columns. User::shouldSeeHint(key) checks both.
* app/Support/Hints.php — single-source-of-truth registry with 14
pilot hints across Service (5), CRM (3), Depozit (3), Finanțe (3).
Each entry has RO/RU/EN title + body + optional next-step + links.
* <x-hint key="wo.dashboard.overview" /> Blade component renders a
small "?" icon with Alpine.js popover; the popover shows title,
body, next-step, related links and an "X" button that POSTs to
/app/hints/{key}/dismiss.
* HintController handles dismiss (per key), toggle (global on/off)
and reset (clear dismissed + re-enable). Routes are auth:web.
* /app/faq page (Filament Page under Admin group) renders the whole
registry grouped by area with a live search box and buttons to
toggle global hints or reset dismissed ones.
* Wired 3 pilot hints into the WO dashboard: title (overview), Docs
tab PDF preview, and the Chat client card.
Follow-ups: extend registry to cover more pages and add <x-hint>
tags where useful. Filament resource fields can also reuse the same
copy via ->hint()/->helperText().
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -379,7 +379,7 @@
|
||||
|
||||
{{-- ── TOP BAR ── --}}
|
||||
<div class="wd-topbar">
|
||||
<span class="wd-wo-title">{{ __('Fișă') }} {{ $wo->number }}</span>
|
||||
<span class="wd-wo-title">{{ __('Fișă') }} {{ $wo->number }}<x-hint key="wo.dashboard.overview" /></span>
|
||||
<span class="wd-status {{ $statusClass }}">
|
||||
{{ __(\App\Models\Tenant\WorkOrder::STATUSES[$wo->status] ?? $wo->status) }}
|
||||
<span style="opacity:.6;">▾</span>
|
||||
@@ -696,6 +696,7 @@
|
||||
<button type="button" class="wd-btn" @click="pdfOpen = true">
|
||||
🔍 {{ __('Vizualizează factură (PDF)') }}
|
||||
</button>
|
||||
<span style="display:inline-block;"><x-hint key="wo.dashboard.pdf" /></span>
|
||||
<a class="wd-btn" href="{{ url('/app/work-orders/' . $wo->id . '/pdf?download=1') }}">
|
||||
⬇️ {{ __('Descarcă factură (PDF)') }}
|
||||
</a>
|
||||
@@ -809,7 +810,7 @@
|
||||
@endphp
|
||||
<div class="wd-card">
|
||||
<div class="wd-card-hd">
|
||||
<h3>{{ __('Chat client') }}</h3>
|
||||
<h3>{{ __('Chat client') }}<x-hint key="wo.dashboard.chat" /></h3>
|
||||
@if ($telegramEnabled && $wo->client?->telegram_chat_id)
|
||||
<span style="font-size:10px;color:var(--wd-blue);">✓ Telegram</span>
|
||||
@elseif ($whatsappEnabled && $wo->client?->phone)
|
||||
|
||||
Reference in New Issue
Block a user