Previous pill button showed "● ACTIVE" or "○ INACTIVE" but users read
it as a status label, not a clickable action — nobody clicked to
disable.
New UI: 46×24 iOS-style switch that slides between grey (OFF) and
green (ON) with a sliding white knob, plus a text label next to it.
The whole switch is a form button — clicking flips hints_enabled.
Title attribute + label make both directions obvious: "Click pentru
a DEZACTIVA" when on, "Click pentru a ACTIVA" when off.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- New tenant setting: settings.faq_video_url. TextInput on Settings
page → Liste configurabile (accepts YouTube watch URL, youtu.be
short URL, YouTube shorts/embed URL, or Vimeo URL).
- Faq page has getVideoEmbedUrl() that converts recognized URLs to
their /embed/ variant. Unknown URLs fall back to a "?" card with
a direct link. Admins see a "configure in Settings" nudge when no
URL is set.
- Video renders as a 16:9 iframe capped at 480px height, above the
hero.
- .faq-shell is now width:100% (was max-width:1200px) so FAQ uses
all available horizontal space.
- .faq-grid switched from strict 2 columns to
repeat(auto-fit, minmax(420px, 1fr)) so wide screens get 3 columns
and narrow screens stack.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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) <noreply@anthropic.com>
Switched render hook from PAGE_HEADER_ACTIONS_BEFORE to
PAGE_HEADER_HEADING_AFTER:
- Previous hook lived inside the action buttons container which is
skipped on pages without header actions (most Admin pages: Settings,
Integrations, API Tokens, Backup, Activity log).
- Previous hook also pushed the icon to the right side on pages that
did have actions (Clienți, Mașini, Calendar list), which looked
disconnected from the title.
New hook renders "?" immediately after the page heading text on every
page, always visible. Also fixed one URL prefix mismatch:
app/pipeline → app/pipeline-board (actual Filament page slug).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Registry now covers ~50 hints across Service, CRM, Depozit, Finanțe,
Admin, Marketing, Analiză, Shop. Every main tenant page has an entry.
New Hints::forPath(\$path) does str_starts_with matching against a
curated URL prefix map. First match wins so specific paths (e.g.
/work-orders/create) beat broader ones (/work-orders).
A single render hook on PAGE_HEADER_ACTIONS_BEFORE looks up the
current request path and, if it matches, renders a "?" icon next to
the page header actions. Blades that already have <x-hint> tags
embedded (WO dashboard, Calendar, Pipeline, Excel wizard) keep those
on top of the auto-injected header hint.
Net effect: users see "?" icons everywhere in the panel now, and
adding coverage for a new page is a 2-line change (registry entry +
one URL prefix in forPath).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Registry grows from 14 → 25 hints. New entries:
- wo.dashboard.topbar_actions / meta / tabs / history / finance /
timeline / bottom
- wo.create.overview
- crm.clients.overview / vehicles.overview
- finante.dashboard.stats / expenses.overview
"?" icons injected into:
- WO dashboard: top-bar actions, meta header, tabs bar, history card,
finance card, timeline card, bottom action bar (in addition to the
existing dashboard title, PDF preview, chat)
- CalendarBoard: title
- PipelineBoard: title
- Excel import wizard: step 1
- Main tenant dashboard (via PanelsRenderHook::PAGE_START scoped to
Dashboard::class): small banner with a "?" and a shortcut to the
FAQ page for users who don't see the icons
Users now see hint icons on the primary daily-use screens; more can
be added by dropping <x-hint key="..." /> anywhere.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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>
Same Alpine.js overlay pattern as the WO dashboard Docs tab: click
"🖨 PDF programări" opens a centered modal with the PDF iframed at
90vh, plus "Descarcă" and "Deschide în tab nou" fallbacks in the
header and Esc/click-outside to close. iframe src only binds when
the modal is open, so PDF generation doesn't happen on page load.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
wire:click="exportPdf" attempted to return a binary Response through
Livewire's JSON channel — it re-encoded the PDF bytes as JSON and
triggered "Malformed UTF-8 characters, possibly incorrectly encoded".
Added GET /app/appointments/pdf?from=...&to=... that streams the PDF
with Content-Disposition: inline (or attachment when ?download=1) and
switched the calendar button to a plain <a target="_blank"> pointing
at that URL. The button now includes the currently visible period via
query params.
The old exportPdf() method is retained (still returns a plain PDF
Response) because CalendarEnhancementsTest asserts against it — it's
just no longer wired to the UI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously nav had 12 groups, several with just 1 item. Now 8 clean
groups, no orphans:
- Anvelope (1 item) → merged into Service (Seturi anvelope)
- Stoc & Finanțe (1 item) → merged into Depozit (Import factură Excel)
- Tinichigerie (1 item) → merged into Service (Tinichigerie / Detailing)
- Subcontractare (2 items) → merged into Service (Lucrări terți,
Subcontractori)
- Integrări moved from Marketing → Admin (it's a config concern, not
a marketing feature)
- ClientResource + VehicleResource were ungrouped → added to CRM
Final groups:
Admin(8) · Analiză(4) · CRM(5) · Depozit(10) · Finanțe(6) ·
Magazin(2) · Marketing(3) · Service(11)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- WO list row click now opens /work-orders/{id}/dashboard instead of
/edit (via ->recordUrl on the table). Edit remains reachable from
the per-row Filament EditAction.
- CreateWorkOrder redirects to the dashboard after save instead of
the edit page.
- Dashboard top bar exposes: "Listă" (back to WO list), "+ Nou"
(create), and "Editare completă" (full edit form) so users don't
have to hop through the sidebar to move between related WO screens.
The old /work-orders, /create, and /{id}/edit routes stay intact —
just the default navigation flow now converges on the dashboard.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AppointmentResource::\$shouldRegisterNavigation = false so only
CalendarBoard shows in the sidebar as "Calendar". The board already
has a "Listă" view-mode button alongside Zi/Săpt/Lună/Custom, so both
use cases are covered from a single entry. CRUD routes
(/app/appointments/create, /{id}/edit) stay accessible from the
board's click handlers.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CalendarBoard::getNavigationParentItem() now returns the Appointments
resource nav label so the sidebar collapses them into a single
expandable menu item. Routes and logic unchanged — both
/app/appointments and /app/calendar-board still work.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
All "Vizualizare PDF" actions now open a wide (7xl) Filament modal
containing an iframe pointing at the inline PDF endpoint, with a
top-right "Descarcă" and "Deschide în tab nou" fallback.
- WorkOrder edit action + WO table row action
- InjectorProtocol edit action + protocols table row action
- Dashboard Docs tab preview button (Alpine.js overlay since it's
a plain Blade view, not a Filament action)
The underlying /pdf routes stay unchanged (Content-Disposition: inline,
?download=1 for attachment) — the iframe just loads the same URL.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Vehicle model now implements HasMedia + InteractsWithMedia and
registers a 'photos' collection. VehicleResource form gets a
SpatieMediaLibraryFileUpload section (collapsible, max 6 photos,
imageEditor enabled).
Dashboard already checks vehicle->getFirstMediaUrl('photos') first
and falls back to the WO's photos, so uploading here immediately
populates the vehicle card on the dashboard without any view changes.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- WorkOrder and InjectorProtocol PDF routes now respond with
Content-Disposition: inline (opens in browser tab so the user can
read/print/save from the built-in PDF viewer). ?download=1 forces
the classic attachment download.
- CalendarBoard exportPdf() switched to the same inline default.
- WO edit action + WO table row action + injector protocol actions
now use ->url(...)->openUrlInNewTab() instead of streaming the PDF
inline into the current tab.
- Dashboard Docs tab has both a preview link and a "Descarcă" link.
- Vehicle card photo falls back to WO's first uploaded photo when
Vehicle model has no MediaLibrary integration of its own.
Test CalendarEnhancementsTest updated to assert the new inline
response headers.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Documente tab: link to a new /app/work-orders/{id}/pdf route that
streams the invoice PDF via WorkOrderPdfService; also lists any
files uploaded to the 'signed_documents' media collection.
- Chat client card: only show the input form when telegram_bot or
whatsapp_business is enabled AND credentialed in the tenant's
Integrations page. Otherwise render an empty state with a shortcut
to /app/integrations.
RU + EN translations added for the new strings (RO source).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Vehicle model doesn't use Spatie MediaLibrary — the direct call broke
the dashboard for any WO whose vehicle has no MediaLibrary integration.
Guard with method_exists and remove the diagnostic logging + URL echo
now that the routing issue is resolved.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Root cause of the "Fișa #0" bug: the page had
public ?WorkOrder \$record = null;
and the route slug was work-orders/{record}/dashboard. Livewire/Laravel
saw the {record} param and the typed \$record property with the same
name and attempted route model binding via BelongsToTenant scope. When
that resolution didn't return a Model instance in a Livewire hydration
context, mount() ended up being called with 0, so the button worked
but the destination page redirected saying "Fișa #0".
Fix: rename the route parameter to {wo} so it no longer collides with
the property name, receive it as int|string in mount(), and do the
find() ourselves. The property stays as \$record for the Blade view
but is now always populated by our own code.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds Log::warning() on every mount() so we can trace exactly what
record id and URL the button navigates to. Also includes the full URL
in the "not found" alert so the user can copy it back to us.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Without an explicit panel, WorkOrderDashboard::getUrl() resolves the
route name against Filament's current-or-default panel, which in some
Livewire lifecycles or from ambiguous contexts is 'central' — where
the page isn't registered. Symptom: the produced URL ended up empty
or malformed, and clicking the button hit our friendly redirect
claiming WO #0 doesn't exist.
Also removes the temporary /__wo-diag/{id} route added for diagnosis.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Returns tenant context, WO visibility via scope, and the current
dashboard button URL that Filament's Page::getUrl() produces. Will be
removed once the bug is diagnosed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Filament's static ::getUrl(['record' => id]) is the canonical way to
build a page URL with parameters, and it uses the actual route resolver
(handling tenant panel prefix, etc). This is cleaner than hand-building
the path and avoids any \$this-binding ambiguity.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Under some Livewire lifecycles \$this->record isn't hydrated when
getHeaderActions() runs, so \$this->record->id was null and the URL
came out as /app/work-orders//dashboard. Fall back to the URL segment
(always present because we're at /app/work-orders/{id}/edit) and log
which path was taken to help diagnose.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The action ->url() closure was resolving \$this to the Action instance
and its ->getRecord() returned null in header-action context, so the URL
came out as /app/work-orders//dashboard.
getHeaderActions() runs after mount(), so \$this->record is guaranteed
populated. Compute the URL string once and pass it as a plain value.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Inside a Filament Action's ->url() closure, \$this can bind to the
Action instance rather than the Livewire page — so \$this->record was
null and the generated URL became /app/work-orders//dashboard, which
routed as record='' and hit our friendly redirect for id 0.
Switch to \$livewire and prefer getRecord() which is always populated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Livewire's Redirector doesn't have ->send(); the correct API inside a
Livewire mount() is $this->redirect($url).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Instead of a bare 404 when a work-order id doesn't resolve, redirect to
the list with a persistent notification explaining why: either the WO
doesn't exist, or it belongs to a different tenant.
This is the most common 404 cause: user types /app/work-orders/2/dashboard
but WO id 2 is in another tenant's slice — the tenant scope filters it
out and find() returns null.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Made record property nullable (?WorkOrder) and mount() calls find() +
explicit abort(404) instead of findOrFail() (which pass-through the
model's tenant-scoped scope but doesn't clarify the 404 source).
Added Feature test that boots the dashboard route via tenant subdomain
(psauto.service.mir.md-style host), authenticates a user, and verifies
the page returns non-404, non-500. Test passes both with and without
route:cache, so the routing itself is fine — user-side 404 is most
likely browser cache or CDN cache.
307/307 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Filament auto-generates route names from the URL slug, so my custom
Page with slug 'work-orders/{record}/dashboard' got the ugly name
'filament.tenant.pages.work-orders.{record}.dashboard' — where
'{record}' is treated as a literal segment in the name, breaking
route() lookups.
Switch all links + the header-action URL to url('/app/work-orders/'
. \$id . '/dashboard') so they resolve correctly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Right column now shows:
- Timeline card: synthesised events from WO lifecycle fields (created,
opened, approved, closed) + payments + activity_log entries (spatie/
activitylog). Sorted newest first, scrollable.
- Chat client card: outbound notifications history (ClientNotificationLog)
+ inline send form. Prefers Telegram if client has telegram_chat_id,
else falls back to SMS/WhatsApp. Logged either way for UI history.
New bottom action bar (fixed, above footer):
- Previous / Next WO links (adjacent by id) with number preview
- Repeat order: pre-fills create form with same client/vehicle
- Close order (danger button): sets status='done' + closed_at=now, with
wire:confirm guard. Hidden when already closed.
+14 translations. Fixed ready_at reference (not in schema, removed).
All 306 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Custom Filament Page at /app/work-orders/{id}/dashboard renders a
Mitchell1-inspired 3-column layout:
- Top bar: WO#, status badge, actions (Edit / Tracking link)
- Meta header row: creation / opened / ETA / responsible / urgency /
paid amount (6 cells)
- Left sidebar (300px): Client card (avatar, phone, email, status
tag, 3-stat grid: visits/total/debt) + Vehicle card (photo, plate,
VIN, mileage, engine, gearbox) + Repair history (latest 5 for this
vehicle, links to dashboards)
- Middle: tab bar (Lucrări/Piese/Diagnostic/Foto/Documente/Note)
with Alpine-driven switching. Works & Parts show the tables read-
only; add/edit still goes through existing EditWorkOrder Filament
resource. Photos tab shows gallery from spatie/media-library.
- Right (300px): Finance summary card (works cost, parts cost,
discount, total, paid, balance) + placeholder for Timeline+Chat
(Phase 2)
- Responsive: right column collapses <1280px, left <900px.
'Vizualizare dashboard' button added on top of the existing
EditWorkOrder page so users can switch between edit form and info-
dense dashboard.
Fixed getSlug() signature (must match parent with ?Panel $panel).
+14 translations. All 306 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
'PS' was baked in — wrong for multi-tenant. Now:
1. Honor $tenant->settings['protocol_prefix'] if set
2. Else use uppercase first 2 chars of tenant slug
('psauto' → 'PS', 'autoplus' → 'AP', 'plusrepair' → 'PL')
3. Fallback 'PR' if no tenant resolvable
Format changed from 'PS-{companyId}-{year}-{seq}' to '{PREFIX}-{year}-{seq}'
— dropped the redundant companyId since prefix already identifies the
tenant contextually.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prior commit only landed the RO entry; the RU + EN Edits were silently
skipped (file-not-read guard). Now all 3 langs have the label.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previous sed insert-after-'Programări' silently failed because that key
didn't exist. Now placed alphabetically after 'Procentaj' in all 3
lang/nav.php files.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prior version used Cyrillic strings as __() keys — RO users saw
Cyrillic text because fallback = key. Now all PDF labels use RO as
the source-language key (e.g. 'Automobil', 'Nr. înmatriculare',
'Nr. protocol:', 'INJECTOARE'). ru.json + en.json provide translations.
+24 keys covering title, all field labels, table headers, measurement
column headers, before/after subheadings, footer note, conclusion
section, signature block, unit suffixes (km, ml).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MariaDB default collation is case-insensitive on VARCHAR unique indexes,
so 'L' and 'l' clash on units_company_id_code_unique. When a tenant had
'L' in parts.unit (uppercase) and the migration seeds 'l' (lowercase),
the extras loop tried to re-insert 'L' and errored out — blocking all
subsequent migrations (including the new injector_protocols tables).
Fix: lowercase the comparison + switch the extras insert to
insertOrIgnore so a residual race is a no-op.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- WorksRelationManager Name column: getStateUsing(labor?->label()) so
the row shows the labor's localized name (not the raw snapshot);
fallback to stored snapshot when labor is missing.
- 4 explicit empty states with helper description + icon on Works,
Parts, SubcontractJobs, Payments — replaces Filament's auto-generated
'Не найдено X / Создать X для старта.'
- 4 CreateAction titles / modal headings for all four relation managers.
- Notification 'Piesa returnată în stoc' / 'Nimic de restituit' wrapped.
- +11 translation keys.
All 306 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Migration: add nullable `labors.name_en` alongside existing name_ro/
name_ru.
- Labor model: label(?locale) accessor returns name_{locale} with
name_ro fallback.
- LaborResource form: expose 3rd 'Nume (EN)' field.
- Table + Select displays now go through label() so options show the
locale-appropriate name:
/app/labors table column,
WorkOrderResource works Select ('[category] name (Nh)'),
ServiceTemplate items Select,
ServiceComposer WorkOrderWork snapshot on create.
- Snapshot name saved on wo_works.name at creation reflects the
current locale; existing rows keep their stored snapshot untouched.
All 306 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Labor Select options now build '[__(category)] name_ro (hours __(h))'
so category chip and hour suffix translate on RU/EN. Labor name stays
as name_ro (user data — separate long-term concern).
- CreateAction gets explicit label + modalHeading (was 'Create Work
Order Work' auto-generated).
- Notification 'Piese implicite adăugate (N)' rewritten with __(':n')
placeholder.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MechanicKpi getPeriodLabel() was hardcoded to ->locale('ro') which
forced Romanian month names ('iulie 2026') regardless of the app
locale. Same on PDF appointments day-label. Both now switch to
app()->getLocale() so RU shows «июль 2026», EN 'July 2026'.
SetLocale middleware already calls Carbon::setLocale on every
request, so translatedFormat() elsewhere already respects the app
locale — no other files needed patching.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prior 'Everything up-to-date' commit was a no-op because Edit failed.
Now the change lands. Splits specialization by '/' and __()-translates
each token, matching Reports.php + CalendarBoard.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both the row-meta on the master matrix rows and the legend list at
the bottom split specialization by '/' and translate each token via
__(), matching the pattern already used on Reports.php.
'Suspensie / Frâne' → «Подвеска / Тормоза», 'Motor / Cutie viteze' →
«Двигатель / КПП» etc. (all tokens already in the dict).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sections Mesaj client / Sursă & Atribuire / Marketing (UTM), the full
empty-state description, plus previously-missing Lead::SOURCES enum
values (Manual, Apel, Site, Google Maps, SEO, Recomandare) and
STATUSES (Contactat, Convertit, Pierdut).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>