feat(i18n): convert 38 hardcoded static labels + safe blade wrap + 226 keys

- Convert all remaining static \$modelLabel/\$pluralModelLabel to getter
  methods with __() (AppointmentResource, WorkOrderResource, MasterResource,
  ServiceTemplateResource, LaborResource, and 33 others)
- Safe blade wrap v2 (37 files, 201 wraps): fixed the regex to not match
  `->`, `=>`, `!<` — previous aggressive pass broke @if directives
- Bulk-translate lowercase model-label keys (programări, fișe lucru,
  tehnicieni, șabloane servicii, norme-ore, etc.) — these were the RO
  strings appearing in page titles/breadcrumbs
- Add human RU/EN for mechanic-kpi (Mecanic/Lucrări/Norma ore/etc.)
  and calendar-board words

Tests 306 green. Blade compiles cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-15 06:17:10 +00:00
parent 3911012c65
commit 7077fff3b3
63 changed files with 800 additions and 284 deletions
@@ -16,9 +16,9 @@
@if (! $isError && ($provider || $tokensIn !== null))
<div class="text-xs text-gray-500 dark:text-gray-400 border-t border-gray-200 dark:border-gray-700 pt-2 flex flex-wrap gap-3">
@if ($provider) <span>Provider: <strong>{{ strtoupper($provider) }}</strong></span> @endif
@if ($provider) <span>{{ __('Provider:') }} <strong>{{ strtoupper($provider) }}</strong></span> @endif
@if ($tokensIn !== null || $tokensOut !== null)
<span>Tokens: <strong>{{ ($tokensIn ?? 0) + ($tokensOut ?? 0) }}</strong> ({{ $tokensIn ?? 0 }} in / {{ $tokensOut ?? 0 }} out)</span>
<span>{{ __('Tokens:') }} <strong>{{ ($tokensIn ?? 0) + ($tokensOut ?? 0) }}</strong> ({{ $tokensIn ?? 0 }} in / {{ $tokensOut ?? 0 }} out)</span>
@endif
@if ($latency !== null) <span>Latency: {{ $latency }} ms</span> @endif
</div>
@@ -93,7 +93,7 @@
@if ($totalCalls > 0)
<div style="margin-bottom:12px;padding:10px 14px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;font-size:12px;color:#1e3a8a;">
<strong>Tokens consumate luna aceasta:</strong>
<strong>{{ __('Tokens consumate luna aceasta:') }}</strong>
{{ number_format($totalTokens) }} tokens · {{ $totalCalls }} cereri
@foreach ($usage as $provider => $u)
· {{ strtoupper($provider) }}: {{ number_format($u['tokens_in'] + $u['tokens_out']) }}
@@ -125,10 +125,10 @@
@if (! $chat || $chat->messages->isEmpty())
<div class="ai-empty">
<div style="font-size:32px;margin-bottom:8px;"></div>
<div style="font-size:14px;font-weight:600;margin-bottom:4px;">Asistent AI pentru autoservice</div>
<div style="font-size:14px;font-weight:600;margin-bottom:4px;">{{ __('Asistent AI pentru autoservice') }}</div>
<div style="font-size:12px;">{{ __('Întreabă-mă orice — diagnostic, sumar, sugestii, redactare mesaje către clienți...') }}</div>
<div style="font-size:11px;margin-top:16px;color:#9ca3af;">
<b>Configurare:</b> {{ __('mergi la Setări → Asistent AI și adaugă cheia API (Claude / GPT / Gemini).') }}
<b>{{ __('Configurare:') }}</b> {{ __('mergi la Setări → Asistent AI și adaugă cheia API (Claude / GPT / Gemini).') }}
</div>
</div>
@else
@@ -30,11 +30,11 @@
@click="navigator.clipboard.writeText($refs.t.innerText); copied = true; setTimeout(() => copied = false, 2000)"
style="margin-left:12px;background:#3b82f6;color:white;padding:4px 10px;border:none;border-radius:4px;cursor:pointer;font-size:11px;">
<span x-show="!copied">{{ __('📋 Copiază') }}</span>
<span x-show="copied" x-cloak> Copiat</span>
<span x-show="copied" x-cloak>{{ __('✓ Copiat') }}</span>
</button>
</div>
<button type="button" wire:click="dismissNew" style="font-size:12px;color:#6b7280;background:none;border:none;cursor:pointer;">
Am salvat token-ul, ascunde-l
{{ __('Am salvat token-ul, ascunde-l') }}
</button>
</div>
@endif
@@ -49,8 +49,8 @@
<tr>
<th>{{ __('Nume') }}</th>
<th>{{ __('Folosit ultima dată') }}</th>
<th>Creat</th>
<th>Permisiuni</th>
<th>{{ __('Creat') }}</th>
<th>{{ __('Permisiuni') }}</th>
<th></th>
</tr>
</thead>
@@ -77,10 +77,10 @@
<div class="at-doc" style="margin-top:16px;">
<b>{{ __('Cum folosești API-ul:') }}</b>
<ol style="margin:8px 0 0 20px;">
<li>{{ __('Obține token cu') }} <code>POST /api/v1/login</code> cu <code>email</code>+<code>password</code> JSON</li>
<li>{{ __('Obține token cu') }} <code>{{ __('POST /api/v1/login') }}</code> cu <code>email</code>+<code>password</code> JSON</li>
<li>{{ __('Sau generează unul aici (recomandat pentru integrări permanente)') }}</li>
<li>{{ __('Adaugă header') }} <code>Authorization: Bearer &lt;token&gt;</code> la fiecare request</li>
<li>Endpoints disponibile: <code>/api/v1/clients</code>, <code>/api/v1/vehicles</code>, <code>/api/v1/work-orders</code> (GET, POST, PATCH, DELETE)</li>
<li>{{ __('Adaugă header') }} <code>Authorization: Bearer &lt;token&gt;</code> {{ __('la fiecare request') }}</li>
<li>{{ __('Endpoints disponibile:') }} <code>{{ __('/api/v1/clients') }}</code>, <code>{{ __('/api/v1/vehicles') }}</code>, <code>{{ __('/api/v1/work-orders') }}</code> {{ __('(GET, POST, PATCH, DELETE)') }}</li>
<li>{{ __('Tot apelul trebuie făcut pe subdomain-ul tău:') }} <code>https://{{ tenant()?->slug ?? 'YOURSLUG' }}.service.mir.md/api/v1/...</code></li>
</ol>
</div>
@@ -22,7 +22,7 @@
</p>
<ul class="bk-list">
<li>{{ __('Backup periodic (descarcă local sau sincronizează cu cloud)') }}</li>
<li>Migrare la alt sistem CRM</li>
<li>{{ __('Migrare la alt sistem CRM') }}</li>
<li>{{ __('Audit / verificări fiscale') }}</li>
<li>{{ __('Conformitate GDPR (la cererea ștergerii datelor)') }}</li>
</ul>
@@ -31,12 +31,12 @@
depozit, furnizori, achiziții, plăți, cheltuieli, salarii, useri, logo + favicon, manifest cu metadata.') }}
</p>
<p class="bk-p">
<b>Format:</b> {{ __('ZIP cu fișiere JSON (1 per tabel) + media + manifest.json.') }}
<b>{{ __('Format:') }}</b> {{ __('ZIP cu fișiere JSON (1 per tabel) + media + manifest.json.') }}
</p>
<button type="button" class="bk-btn" wire:click="downloadBackup" wire:loading.attr="disabled">
<span wire:loading.remove wire:target="downloadBackup">{{ __('⬇ Descarcă backup acum') }}</span>
<span wire:loading wire:target="downloadBackup">Generez ZIP...</span>
<span wire:loading wire:target="downloadBackup">{{ __('Generez ZIP...') }}</span>
</button>
<p class="bk-p" style="margin-top:24px;font-size:11px;color:#9ca3af;">
@@ -155,12 +155,12 @@
<div class="cv-shell" x-data="{ dragEventId: null }">
<div class="cv-head">
<div>
<div class="cv-breadcrumb">{{ __('CRM Programări ') }} <strong style="color:var(--cv-text);">Calendar vizual</strong></div>
<h1>Calendar vizual</h1>
<div class="cv-breadcrumb">{{ __('CRM Programări ') }} <strong style="color:var(--cv-text);">{{ __('Calendar vizual') }}</strong></div>
<h1>{{ __('Calendar vizual') }}</h1>
</div>
<div class="cv-btn-group">
<button class="cv-btn" wire:click="exportPdf">{{ __('🖨 PDF programări') }}</button>
<button class="cv-btn" wire:click="openNewPostForm">+ Pod nou</button>
<button class="cv-btn" wire:click="openNewPostForm">{{ __('+ Pod nou') }}</button>
<button class="cv-btn cv-btn-primary" wire:click="openNewForm">{{ __('+ Programare nouă') }}</button>
</div>
</div>
@@ -177,12 +177,12 @@
<div class="cv-kpi-sub">{{ __('programări active') }}</div>
</div>
<div class="cv-kpi">
<div class="cv-kpi-label">Confirmate</div>
<div class="cv-kpi-label">{{ __('Confirmate') }}</div>
<div class="cv-kpi-value green">{{ $stats['confirmed_count'] }} / {{ $stats['total_count'] }}</div>
<div class="cv-kpi-sub">{{ $stats['confirmation_rate_pct'] }}% rata confirmare</div>
</div>
<div class="cv-kpi">
<div class="cv-kpi-label">No-show alert</div>
<div class="cv-kpi-label">{{ __('No-show alert') }}</div>
<div class="cv-kpi-value red">{{ $stats['no_show_alert'] }}</div>
<div class="cv-kpi-sub">{{ __('programări neconfirmate &lt; 24h') }}</div>
</div>
@@ -196,32 +196,32 @@
<button class="cv-btn" wire:click="setWeekToday">{{ __('Astăzi') }}</button>
</div>
<div class="cv-toolbar-group">
<span class="cv-toolbar-label">Mod:</span>
<span class="cv-toolbar-label">{{ __('Mod:') }}</span>
<div class="cv-view-switcher">
<button class="{{ $viewMode === 'day' ? 'active' : '' }}" wire:click="setViewMode('day')">Zi</button>
<button class="{{ $viewMode === 'day' ? 'active' : '' }}" wire:click="setViewMode('day')">{{ __('Zi') }}</button>
<button class="{{ $viewMode === 'week' ? 'active' : '' }}" wire:click="setViewMode('week')">{{ __('Săpt') }}</button>
<button class="{{ $viewMode === 'month' ? 'active' : '' }}" wire:click="setViewMode('month')">{{ __('Lună') }}</button>
<button class="{{ $viewMode === 'custom' ? 'active' : '' }}" wire:click="setViewMode('custom')">Custom</button>
<button class="{{ $viewMode === 'custom' ? 'active' : '' }}" wire:click="setViewMode('custom')">{{ __('Custom') }}</button>
<button class="{{ $viewMode === 'list' ? 'active' : '' }}" wire:click="setViewMode('list')">{{ __('Listă') }}</button>
</div>
</div>
<div class="cv-toolbar-group">
<span class="cv-toolbar-label">Grupare:</span>
<span class="cv-toolbar-label">{{ __('Grupare:') }}</span>
<div class="cv-view-switcher">
<button class="{{ $groupBy === 'post' ? 'active' : '' }}" wire:click="setGroupBy('post')">Pod</button>
<button class="{{ $groupBy === 'master' ? 'active' : '' }}" wire:click="setGroupBy('master')">Mecanic</button>
<button class="{{ $groupBy === 'post' ? 'active' : '' }}" wire:click="setGroupBy('post')">{{ __('Pod') }}</button>
<button class="{{ $groupBy === 'master' ? 'active' : '' }}" wire:click="setGroupBy('master')">{{ __('Mecanic') }}</button>
</div>
</div>
@if ($viewMode === 'custom')
<div class="cv-toolbar-group">
<span class="cv-toolbar-label">De la:</span>
<span class="cv-toolbar-label">{{ __('De la:') }}</span>
<input type="date" class="cv-select" wire:model.live="customStart">
<span class="cv-toolbar-label">{{ __('Până la:') }}</span>
<input type="date" class="cv-select" wire:model.live="customEnd">
</div>
@endif
<div class="cv-toolbar-group" style="margin-left:auto;">
<span class="cv-toolbar-label">Filtru:</span>
<span class="cv-toolbar-label">{{ __('Filtru:') }}</span>
<select class="cv-select" wire:change="setMasterFilter($event.target.value)">
<option value="">{{ __('Toți mecanicii') }}</option>
@foreach ($this->getMasterOptions() as $id => $name)
@@ -230,8 +230,8 @@
</select>
<select class="cv-select" wire:change="setStatusFilter($event.target.value)">
<option value="all">{{ __('Toate statusurile') }}</option>
<option value="confirmed" @if($statusFilter==='confirmed')selected @endif>Confirmate</option>
<option value="unconfirmed" @if($statusFilter==='unconfirmed')selected @endif>Neconfirmate</option>
<option value="confirmed" @if($statusFilter==='confirmed')selected @endif>{{ __('Confirmate') }}</option>
<option value="unconfirmed" @if($statusFilter==='unconfirmed')selected @endif>{{ __('Neconfirmate') }}</option>
<option value="in_work" @if($statusFilter==='in_work')selected @endif>{{ __('În lucru') }}</option>
</select>
</div>
@@ -239,7 +239,7 @@
<div class="cv-notes">
<strong>{{ __('⚙ Cum funcționează:') }}</strong>
Matricea <strong>{{ $groupBy === 'post' ? 'Pod' : 'Mecanic' }} × Zile</strong>{{ __('. Drag-and-drop între celule pentru a reprograma. Indicator de încărcare pe fiecare celulă (ore_planificate / capacitate). Click pe celulă goală → programare rapidă. Click pe eveniment → detalii.') }}
{{ __('Matricea') }} <strong>{{ $groupBy === 'post' ? 'Pod' : 'Mecanic' }} × Zile</strong>{{ __('. Drag-and-drop între celule pentru a reprograma. Indicator de încărcare pe fiecare celulă (ore_planificate / capacitate). Click pe celulă goală → programare rapidă. Click pe eveniment → detalii.') }}
</div>
@if ($viewMode === 'list')
@@ -286,7 +286,7 @@
@endforeach
@foreach ($rows as $row)
<div class="cv-cell cv-row-label" @if ($row['kind'] === 'post' && $row['id']) wire:click="openRenamePost({{ $row['id'] }})" style="cursor:pointer;" title="Click pentru a redenumi" @endif>
<div class="cv-cell cv-row-label" @if ($row['kind'] === 'post' && $row['id']) wire:click="openRenamePost({{ $row['id'] }})" style="cursor:pointer;" title="{{ __('Click pentru a redenumi') }}" @endif>
<span class="cv-row-color" style="background:{{ $row['color'] }}"></span>
<div>
<div>{{ $row['name'] }} @if ($row['kind'] === 'post') <span style="font-size:10px; opacity:0.5;"></span>@endif</div>
@@ -338,7 +338,7 @@
<h3>{{ __('Legendă') }}</h3>
<div class="cv-legend-row">
<div>
<div class="cv-legend-col">Mecanici</div>
<div class="cv-legend-col">{{ __('Mecanici') }}</div>
<div class="cv-legend-items">
@foreach ($this->getMasterOptions() as $id => $name)
@php
@@ -355,13 +355,13 @@
<div class="cv-legend-items">
<div class="cv-legend-item"><span class="cv-load" style="position:static;">05h/10</span> {{ __('liber/ușor') }}</div>
<div class="cv-legend-item"><span class="cv-load warn" style="position:static;">58.5h/10</span> mediu</div>
<div class="cv-legend-item"><span class="cv-load full" style="position:static;">≥9h/10</span> plin</div>
<div class="cv-legend-item"><span class="cv-load full" style="position:static;">{{ __('≥9h/10') }}</span> plin</div>
</div>
</div>
<div>
<div class="cv-legend-col">Stare zi</div>
<div class="cv-legend-col">{{ __('Stare zi') }}</div>
<div class="cv-legend-items">
<div class="cv-legend-item"><span class="cv-legend-dot" style="background:#FAFAFA; border:1px solid var(--cv-border);"></span> Weekend</div>
<div class="cv-legend-item"><span class="cv-legend-dot" style="background:#FAFAFA; border:1px solid var(--cv-border);"></span> {{ __('Weekend') }}</div>
<div class="cv-legend-item"><span class="cv-legend-dot" style="background:repeating-linear-gradient(45deg,#FAFAFA,#FAFAFA 2px,#F1F5F9 2px,#F1F5F9 4px); border:1px solid var(--cv-border);"></span> {{ __('Închis (Duminică/sărbătoare)') }}</div>
<div class="cv-legend-item"><span class="cv-legend-dot" style="background:var(--cv-blue-bg); border:1px solid var(--cv-blue);"></span> {{ __('Astăzi') }}</div>
</div>
@@ -382,11 +382,11 @@
<div class="cv-panel-body">
<div class="cv-two-cols">
@if ($openEvent['client_name'])<div class="cv-pfield"><label>{{ __('Client') }}</label><div class="cv-pfield-val">{{ $openEvent['client_name'] }}</div></div>@endif
@if ($openEvent['client_phone'])<div class="cv-pfield"><label>Telefon</label><div class="cv-pfield-val" style="color:var(--cv-blue);">{{ $openEvent['client_phone'] }}</div></div>@endif
@if ($openEvent['client_phone'])<div class="cv-pfield"><label>{{ __('Telefon') }}</label><div class="cv-pfield-val" style="color:var(--cv-blue);">{{ $openEvent['client_phone'] }}</div></div>@endif
@if ($openEvent['vehicle'])<div class="cv-pfield"><label>{{ __('Auto') }}</label><div class="cv-pfield-val">{{ $openEvent['vehicle'] }}</div></div>@endif
@if ($openEvent['plate'])<div class="cv-pfield"><label>Numar</label><div class="cv-pfield-val">{{ $openEvent['plate'] }}</div></div>@endif
@if ($openEvent['master_name'])<div class="cv-pfield"><label>Maistru</label><div class="cv-pfield-val">{{ $openEvent['master_name'] }}</div></div>@endif
@if ($openEvent['post_name'])<div class="cv-pfield"><label>Pod</label><div class="cv-pfield-val">{{ $openEvent['post_name'] }}</div></div>@endif
@if ($openEvent['plate'])<div class="cv-pfield"><label>{{ __('Numar') }}</label><div class="cv-pfield-val">{{ $openEvent['plate'] }}</div></div>@endif
@if ($openEvent['master_name'])<div class="cv-pfield"><label>{{ __('Maistru') }}</label><div class="cv-pfield-val">{{ $openEvent['master_name'] }}</div></div>@endif
@if ($openEvent['post_name'])<div class="cv-pfield"><label>{{ __('Pod') }}</label><div class="cv-pfield-val">{{ $openEvent['post_name'] }}</div></div>@endif
</div>
@if ($openEvent['notes'])
<div class="cv-pfield"><label>{{ __('Notițe') }}</label><div class="cv-pfield-val" style="white-space:pre-wrap;">{{ $openEvent['notes'] }}</div></div>
@@ -394,7 +394,7 @@
</div>
<div class="cv-panel-actions">
<button class="cv-btn" wire:click="deleteEvent({{ $openEvent['id'] }})" onclick="return confirm('Ștergi această programare?')">{{ __('🗑 Șterge') }}</button>
<a class="cv-btn cv-btn-primary" href="{{ route('filament.tenant.resources.appointments.edit', ['record' => $openEvent['id']]) }}"> Editare</a>
<a class="cv-btn cv-btn-primary" href="{{ route('filament.tenant.resources.appointments.edit', ['record' => $openEvent['id']]) }}">{{ __('↗ Editare') }}</a>
</div>
@endif
</div>
@@ -410,10 +410,10 @@
<div class="cv-close" wire:click="$set('showNewForm', false)"></div>
</div>
<div class="cv-panel-body">
<div class="cv-pfield"><label>Subiect *</label><input wire:model="newAppt.title" type="text" placeholder="Schimb ulei + filtru"></div>
<div class="cv-pfield"><label>{{ __('Subiect *') }}</label><input wire:model="newAppt.title" type="text" placeholder="{{ __('Schimb ulei + filtru') }}"></div>
<div class="cv-two-cols">
<div class="cv-pfield"><label>{{ __('Data *') }}</label><input wire:model="newAppt.date" type="date"></div>
<div class="cv-pfield"><label>Pod</label>
<div class="cv-pfield"><label>{{ __('Pod') }}</label>
<select wire:model="newAppt.post_id">
<option value=""></option>
@foreach ($this->getPostOptions() as $id => $name)
@@ -421,7 +421,7 @@
@endforeach
</select>
</div>
<div class="cv-pfield"><label>De la</label><input wire:model="newAppt.time_start" type="time"></div>
<div class="cv-pfield"><label>{{ __('De la') }}</label><input wire:model="newAppt.time_start" type="time"></div>
<div class="cv-pfield"><label>{{ __('Până la') }}</label><input wire:model="newAppt.time_end" type="time"></div>
</div>
<div class="cv-pfield"><label>{{ __('Client') }}</label>
@@ -432,7 +432,7 @@
@endforeach
</select>
</div>
<div class="cv-pfield"><label>Maistru</label>
<div class="cv-pfield"><label>{{ __('Maistru') }}</label>
<select wire:model="newAppt.master_id">
<option value=""></option>
@foreach ($this->getMasterOptions() as $id => $name)
@@ -457,11 +457,11 @@
<p style="font-size:13px; color:#4a5568; margin-bottom:16px;">{{ __('Poți adăuga un loc de muncă (cu lift sau fără — ex: curte, atelier electric).') }}</p>
<div class="cv-pfield">
<label>{{ __('Nume *') }}</label>
<input type="text" wire:model="newPost.name" placeholder="Ex: Curte 1, Pod 4, Atelier electric" autofocus>
<input type="text" wire:model="newPost.name" placeholder="{{ __('Ex: Curte 1, Pod 4, Atelier electric') }}" autofocus>
</div>
<div class="cv-two-cols">
<div class="cv-pfield">
<label>Culoare</label>
<label>{{ __('Culoare') }}</label>
<input type="color" wire:model="newPost.color" style="height:40px; padding:4px;">
</div>
<div class="cv-pfield">
@@ -491,9 +491,9 @@
<input type="text" wire:model="renamingPostName" autofocus>
</div>
<div class="cv-pfield">
<label>Mecanic implicit</label>
<label>{{ __('Mecanic implicit') }}</label>
<select wire:model="renamingPostMasterId">
<option value=""> niciunul </option>
<option value="">{{ __('— niciunul —') }}</option>
@foreach ($this->getMasterOptions() as $id => $name)
<option value="{{ $id }}">{{ $name }}</option>
@endforeach
@@ -54,7 +54,7 @@
<div class="wiz-field">
<label>{{ __('Furnizor *') }}</label>
<select wire:model="supplierId">
<option value=""> alege </option>
<option value="">{{ __('— alege —') }}</option>
@foreach ($this->getSupplierOptions() as $id => $name)
<option value="{{ $id }}">{{ $name }}</option>
@endforeach
@@ -102,21 +102,21 @@
<div class="wiz-grid">
<div class="wiz-field">
<label>Coloana Articol *</label>
<label>{{ __('Coloana Articol *') }}</label>
<select wire:model="mapping.article_col">
<option value=""></option>
@foreach ($headersPreview['columns'] as $c)<option value="{{ $c }}">{{ $c }}</option>@endforeach
</select>
</div>
<div class="wiz-field">
<label>Coloana Denumire *</label>
<label>{{ __('Coloana Denumire *') }}</label>
<select wire:model="mapping.name_col">
<option value=""></option>
@foreach ($headersPreview['columns'] as $c)<option value="{{ $c }}">{{ $c }}</option>@endforeach
</select>
</div>
<div class="wiz-field">
<label>Coloana Cantitate *</label>
<label>{{ __('Coloana Cantitate *') }}</label>
<select wire:model="mapping.qty_col">
<option value=""></option>
@foreach ($headersPreview['columns'] as $c)<option value="{{ $c }}">{{ $c }}</option>@endforeach
@@ -151,7 +151,7 @@
<div class="wiz-actions">
<button class="wiz-btn" wire:click="$set('step', 1)">{{ __('← Înapoi') }}</button>
<button class="wiz-btn wiz-btn-primary" wire:click="goToStep3">Previzualizare </button>
<button class="wiz-btn wiz-btn-primary" wire:click="goToStep3">{{ __('Previzualizare →') }}</button>
</div>
@endif
@@ -178,7 +178,7 @@
<table class="wiz-preview-table">
<thead>
<tr>
<th>Articol</th><th>Denumire</th><th>Brand</th><th>Cant.</th><th>{{ __('Preț') }}</th><th>Status</th>
<th>{{ __('Articol') }}</th><th>{{ __('Denumire') }}</th><th>{{ __('Brand') }}</th><th>{{ __('Cant.') }}</th><th>{{ __('Preț') }}</th><th>{{ __('Status') }}</th>
</tr>
</thead>
<tbody>
@@ -56,8 +56,8 @@
@if ($tab === 'overview')
<div class="fn-grid fn-grid-4">
<div class="fn-card"><div class="fn-stat-l">{{ __('Încasări') }}</div><div class="fn-stat-v fn-success">{{ number_format($data['income'], 2, '.', ' ') }} MDL</div></div>
<div class="fn-card"><div class="fn-stat-l">Cheltuieli</div><div class="fn-stat-v fn-danger">{{ number_format($data['expenses'], 2, '.', ' ') }} MDL</div></div>
<div class="fn-card"><div class="fn-stat-l">Profit</div><div class="fn-stat-v {{ $data['profit'] >= 0 ? 'fn-success' : 'fn-danger' }}">{{ number_format($data['profit'], 2, '.', ' ') }} MDL</div></div>
<div class="fn-card"><div class="fn-stat-l">{{ __('Cheltuieli') }}</div><div class="fn-stat-v fn-danger">{{ number_format($data['expenses'], 2, '.', ' ') }} MDL</div></div>
<div class="fn-card"><div class="fn-stat-l">{{ __('Profit') }}</div><div class="fn-stat-v {{ $data['profit'] >= 0 ? 'fn-success' : 'fn-danger' }}">{{ number_format($data['profit'], 2, '.', ' ') }} MDL</div></div>
<div class="fn-card"><div class="fn-stat-l">{{ __('Datorii clienți') }}</div><div class="fn-stat-v fn-warning">{{ number_format($data['debtTotal'], 2, '.', ' ') }} MDL</div></div>
</div>
@@ -80,22 +80,22 @@
@endforeach
</div>
<div style="text-align:right;margin-top:12px;font-size:14px;">
Net: <b class="{{ $data['net'] >= 0 ? 'fn-success' : 'fn-danger' }}">{{ number_format($data['net'], 2, '.', ' ') }} MDL</b>
{{ __('Net:') }} <b class="{{ $data['net'] >= 0 ? 'fn-success' : 'fn-danger' }}">{{ number_format($data['net'], 2, '.', ' ') }} MDL</b>
</div>
</div>
@elseif ($tab === 'pnl')
<div class="fn-grid fn-grid-2" style="margin-bottom: 16px;">
<div class="fn-card">
<div class="fn-h3">Venituri</div>
<div class="fn-h3">{{ __('Venituri') }}</div>
<table class="fn-tbl">
<tr><td>Manopere</td><td class="fn-r">{{ number_format($data['worksRevenue'], 2, '.', ' ') }}</td></tr>
<tr><td>{{ __('Manopere') }}</td><td class="fn-r">{{ number_format($data['worksRevenue'], 2, '.', ' ') }}</td></tr>
<tr><td>{{ __('Piese (vânzare)') }}</td><td class="fn-r">{{ number_format($data['partsRevenue'], 2, '.', ' ') }}</td></tr>
<tr style="border-top:2px solid #e5e7eb;"><td class="fn-bold">{{ __('Total venituri') }}</td><td class="fn-r fn-bold fn-success">{{ number_format($data['totalRevenue'], 2, '.', ' ') }}</td></tr>
</table>
</div>
<div class="fn-card">
<div class="fn-h3">Costuri</div>
<div class="fn-h3">{{ __('Costuri') }}</div>
<table class="fn-tbl">
<tr><td>{{ __('Cost piese (achiziție)') }}</td><td class="fn-r fn-danger">{{ number_format($data['partsCost'], 2, '.', ' ') }}</td></tr>
@foreach ($data['expensesByCat'] as $row)
@@ -106,7 +106,7 @@
</div>
</div>
<div class="fn-card" style="text-align:right;">
<div class="fn-stat-l">Profit net</div>
<div class="fn-stat-l">{{ __('Profit net') }}</div>
<div class="fn-stat-v {{ $data['netProfit'] >= 0 ? 'fn-success' : 'fn-danger' }}">{{ number_format($data['netProfit'], 2, '.', ' ') }} MDL</div>
<div style="font-size:12px;color:#6b7280;margin-top:4px;">Marjă: {{ $data['marginPct'] }}%</div>
<div style="font-size:11px;color:#9ca3af;margin-top:4px;">Marjă piese: {{ number_format($data['partsMargin'], 2, '.', ' ') }} MDL</div>
@@ -115,7 +115,7 @@
@elseif ($tab === 'balance')
<div class="fn-grid fn-grid-2">
<div class="fn-card">
<div class="fn-h3">Active</div>
<div class="fn-h3">{{ __('Active') }}</div>
<table class="fn-tbl">
<tr><td>{{ __('Numerar net (toate plățile - cheltuieli)') }}</td><td class="fn-r fn-bold fn-success">{{ number_format($data['netCash'], 2, '.', ' ') }} MDL</td></tr>
<tr><td>{{ __('Datorii clienți (de încasat)') }}</td><td class="fn-r fn-warning">{{ number_format($data['debt'], 2, '.', ' ') }} MDL</td></tr>
@@ -35,7 +35,7 @@
</style>
<div style="background: #fef3c7; border-left: 4px solid #f59e0b; padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px;">
<b>Status:</b> {{ __('aceste integrări sunt placeholder UI le configurezi aici, dar implementarea actuală a fiecărui canal e proiect separat.
{{ __('️') }} <b>{{ __('Status:') }}</b> {{ __('aceste integrări sunt placeholder UI le configurezi aici, dar implementarea actuală a fiecărui canal e proiect separat.
Pentru moment, valorile salvate sunt accesibile în cod via') }} <code>$tenant->settings['integrations']</code>.
</div>
@@ -30,12 +30,12 @@
<table class="kpi-table">
<thead>
<tr>
<th>Mecanic</th>
<th>{{ __('Mecanic') }}</th>
<th>{{ __('Lucrări') }}</th>
<th>Norma ore</th>
<th>Real ore</th>
<th>{{ __('Norma ore') }}</th>
<th>{{ __('Real ore') }}</th>
<th>{{ __('Eficiență') }}</th>
<th>Venit manopere</th>
<th>{{ __('Venit manopere') }}</th>
</tr>
</thead>
<tbody>
@@ -38,7 +38,7 @@
<div class="ob-wrap">
<div class="ob-intro">
<h3>👋 Bun venit!</h3>
<h3>{{ __('👋 Bun venit!') }}</h3>
{{ __('Hai facem 30 de secunde de configurare ca AutoCRM-ul tău arate exact cum vrei tu.
Toate aceste setări pot fi schimbate oricând din meniul „Setări".') }}
</div>
@@ -403,7 +403,7 @@
<form class="pb-panel-body" wire:submit.prevent="createNewLead">
<div class="pb-form-field">
<label>{{ __('Nume') }} *</label>
<input type="text" wire:model="newName" placeholder="Ion Popescu" autofocus>
<input type="text" wire:model="newName" placeholder="{{ __('Ion Popescu') }}" autofocus>
</div>
<div class="pb-form-field">
<label>{{ __('Telefon') }} *</label>
@@ -411,7 +411,7 @@
</div>
<div class="pb-form-field">
<label>{{ __('Auto / model') }}</label>
<input type="text" wire:model="newCar" placeholder="VW Passat 2018">
<input type="text" wire:model="newCar" placeholder="{{ __('VW Passat 2018') }}">
</div>
<div class="pb-form-field">
<label>{{ __('Sursă') }}</label>
@@ -35,7 +35,7 @@
</td>
</tr>
@empty
<tr><td colspan="2" class="rc-empty">Niciun client pierdut. 🎉</td></tr>
<tr><td colspan="2" class="rc-empty">{{ __('Niciun client pierdut. 🎉') }}</td></tr>
@endforelse
</table>
</div>
@@ -104,7 +104,7 @@
<div class="rp-card">
<div class="rp-h3">{{ __('Încasări pe metodă') }}</div>
<table class="rp-tbl">
<thead><tr><th>{{ __('Metodă') }}</th><th class="rp-right">Tranz.</th><th class="rp-right">{{ __('Total') }}</th></tr></thead>
<thead><tr><th>{{ __('Metodă') }}</th><th class="rp-right">{{ __('Tranz.') }}</th><th class="rp-right">{{ __('Total') }}</th></tr></thead>
<tbody>
@forelse ($data['by_method'] as $row)
<tr>
@@ -119,9 +119,9 @@
</table>
</div>
<div class="rp-card">
<div class="rp-h3">Cheltuieli pe categorie</div>
<div class="rp-h3">{{ __('Cheltuieli pe categorie') }}</div>
<table class="rp-tbl">
<thead><tr><th>Categorie</th><th class="rp-right">{{ __('Nr.') }}</th><th class="rp-right">{{ __('Total') }}</th></tr></thead>
<thead><tr><th>{{ __('Categorie') }}</th><th class="rp-right">{{ __('Nr.') }}</th><th class="rp-right">{{ __('Total') }}</th></tr></thead>
<tbody>
@forelse ($data['by_category'] as $row)
<tr>
@@ -150,7 +150,7 @@
</div>
</div>
<div class="rp-card">
<div class="rp-h3">Pe status</div>
<div class="rp-h3">{{ __('Pe status') }}</div>
<table class="rp-tbl">
<tbody>
@forelse ($data['by_status'] as $row)
@@ -169,11 +169,11 @@
<div class="rp-card" style="overflow-x: auto;">
<table class="rp-tbl">
<thead><tr>
<th>Mecanic</th>
<th>Specializare</th>
<th class="rp-right">Manopere</th>
<th>{{ __('Mecanic') }}</th>
<th>{{ __('Specializare') }}</th>
<th class="rp-right">{{ __('Manopere') }}</th>
<th class="rp-right">{{ __('Ore') }}</th>
<th class="rp-right">Venit</th>
<th class="rp-right">{{ __('Venit') }}</th>
</tr></thead>
<tbody>
@forelse ($data['rows'] as $r)
@@ -185,7 +185,7 @@
<td class="rp-right rp-bold rp-success">{{ number_format($r['revenue'], 2, '.', ' ') }}</td>
</tr>
@empty
<tr><td colspan="5" class="rp-muted">Niciun mecanic activ.</td></tr>
<tr><td colspan="5" class="rp-muted">{{ __('Niciun mecanic activ.') }}</td></tr>
@endforelse
</tbody>
</table>
@@ -198,7 +198,7 @@
<th>{{ __('Manoperă') }}</th>
<th class="rp-right">{{ __('Nr.') }}</th>
<th class="rp-right">{{ __('Ore total') }}</th>
<th class="rp-right">Venit</th>
<th class="rp-right">{{ __('Venit') }}</th>
</tr></thead>
<tbody>
@forelse ($data['rows'] as $r)
@@ -220,7 +220,7 @@
<div class="rp-card" style="overflow-x: auto;">
<div class="rp-h3">{{ __('Top piese vândute') }}</div>
<table class="rp-tbl">
<thead><tr><th>{{ __('Piesă') }}</th><th class="rp-right">Cant.</th><th class="rp-right">Venit</th><th class="rp-right">{{ __('Marjă') }}</th></tr></thead>
<thead><tr><th>{{ __('Piesă') }}</th><th class="rp-right">{{ __('Cant.') }}</th><th class="rp-right">{{ __('Venit') }}</th><th class="rp-right">{{ __('Marjă') }}</th></tr></thead>
<tbody>
@forelse ($data['sold'] as $r)
<tr>
@@ -238,7 +238,7 @@
<div class="rp-card">
<div class="rp-h3">{{ __('⚠️ Stoc minim atins') }}</div>
<table class="rp-tbl">
<thead><tr><th>{{ __('Piesă') }}</th><th class="rp-right">{{ __('Stoc') }}</th><th class="rp-right">Min.</th></tr></thead>
<thead><tr><th>{{ __('Piesă') }}</th><th class="rp-right">{{ __('Stoc') }}</th><th class="rp-right">{{ __('Min.') }}</th></tr></thead>
<tbody>
@forelse ($data['low'] as $p)
<tr>
@@ -270,7 +270,7 @@
<td class="rp-right rp-bold">{{ $row->cnt }}</td>
</tr>
@empty
<tr><td colspan="2" class="rp-muted">Niciun lead.</td></tr>
<tr><td colspan="2" class="rp-muted">{{ __('Niciun lead.') }}</td></tr>
@endforelse
</tbody>
</table>
@@ -70,7 +70,7 @@
</div>
<div x-show="lastDecoded" class="sc-status" x-cloak>
Ultimul cod citit: <strong x-text="lastDecoded"></strong>
{{ __('Ultimul cod citit:') }} <strong x-text="lastDecoded"></strong>
</div>
<div class="sc-manual">
@@ -21,9 +21,9 @@
</style>
<div class="vs-card">
<h2 style="font-size:16px;font-weight:600;margin-bottom:12px;">🔎 Decode VIN</h2>
<h2 style="font-size:16px;font-weight:600;margin-bottom:12px;">{{ __('🔎 Decode VIN') }}</h2>
<form wire:submit="decode" style="display:flex;gap:12px;flex-wrap:wrap;">
<input type="text" wire:model="vin" class="vs-input" placeholder="WBAFE81070CY34521" maxlength="17" style="flex:1;min-width:300px;">
<input type="text" wire:model="vin" class="vs-input" placeholder="{{ __('WBAFE81070CY34521') }}" maxlength="17" style="flex:1;min-width:300px;">
<button type="submit" class="vs-btn">{{ __('Decodează') }}</button>
</form>
</div>
@@ -31,13 +31,13 @@
@if ($decoded)
<div class="vs-card">
@if ($decoded['valid'])
<h3 style="font-size:14px;font-weight:600;margin-bottom:16px;"> VIN decodificat</h3>
<h3 style="font-size:14px;font-weight:600;margin-bottom:16px;">{{ __('✅ VIN decodificat') }}</h3>
<div class="vs-grid">
<div><div class="vs-stat-l">{{ __('Producător') }}</div><div class="vs-stat-v">{{ $decoded['manufacturer'] }}</div></div>
<div><div class="vs-stat-l">{{ __('Țară') }}</div><div class="vs-stat-v">{{ $decoded['country'] }}</div></div>
<div><div class="vs-stat-l">An model (estimat)</div><div class="vs-stat-v">{{ $decoded['year'] ?? '—' }}</div></div>
<div><div class="vs-stat-l">WMI</div><div class="vs-stat-v" style="font-family:monospace;">{{ $decoded['wmi'] }}</div></div>
<div><div class="vs-stat-l">Serial</div><div class="vs-stat-v" style="font-family:monospace;font-size:12px;">{{ $decoded['serial'] }}</div></div>
<div><div class="vs-stat-l">{{ __('Serial') }}</div><div class="vs-stat-v" style="font-family:monospace;font-size:12px;">{{ $decoded['serial'] }}</div></div>
</div>
@else
<div style="color:#dc2626;"> {{ $decoded['error'] ?? 'WMI necunoscut — producătorul nu e în baza de date locală.' }}</div>
@@ -49,7 +49,7 @@
<div class="vs-card">
<h3 style="font-size:14px;font-weight:600;margin-bottom:12px;">{{ __('🚗 Mașini cu acest VIN în CRM') }}</h3>
<table class="vs-tbl">
<thead><tr><th>VIN</th><th>Marca/Model</th><th>Plate</th><th>{{ __('Client') }}</th><th>Km</th></tr></thead>
<thead><tr><th>VIN</th><th>{{ __('Marca/Model') }}</th><th>{{ __('Plate') }}</th><th>{{ __('Client') }}</th><th>{{ __('Km') }}</th></tr></thead>
<tbody>
@foreach ($matches as $v)
<tr>
@@ -78,7 +78,7 @@
<div style="color:#9ca3af;text-align:center;padding:20px;">Niciun rezultat pentru {{ $partsQuery }}"</div>
@else
<table class="vs-tbl">
<thead><tr><th>Denumire</th><th>{{ __('Cod') }}</th><th>Brand</th><th>{{ __('Stoc') }}</th><th>{{ __('Preț') }}</th></tr></thead>
<thead><tr><th>{{ __('Denumire') }}</th><th>{{ __('Cod') }}</th><th>{{ __('Brand') }}</th><th>{{ __('Stoc') }}</th><th>{{ __('Preț') }}</th></tr></thead>
<tbody>
@foreach ($parts as $p)
<tr>
@@ -7,6 +7,6 @@
@if ($part->article)
<div class="text-xs text-gray-500 dark:text-gray-400 font-mono">{{ $part->article }}</div>
@endif
<div class="text-xs text-gray-400 mt-1">Payload: <code>{{ $payload }}</code></div>
<div class="text-xs text-gray-400 mt-1">{{ __('Payload:') }} <code>{{ $payload }}</code></div>
</div>
</div>
@@ -18,7 +18,7 @@
</div>
<div class="space-y-2">
<label class="block text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Link</label>
<label class="block text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">{{ __('Link') }}</label>
<div class="flex gap-2">
<input
type="text"
@@ -11,7 +11,7 @@
<dt class="text-gray-500 dark:text-gray-400">VIN</dt>
<dd class="font-mono text-gray-900 dark:text-gray-100">{{ $info['vin'] }}</dd>
<dt class="text-gray-500 dark:text-gray-400">Regiune</dt>
<dt class="text-gray-500 dark:text-gray-400">{{ __('Regiune') }}</dt>
<dd class="text-gray-900 dark:text-gray-100">{{ $info['region'] ?? '—' }}</dd>
<dt class="text-gray-500 dark:text-gray-400">{{ __('Țară') }}</dt>
@@ -20,16 +20,16 @@
<dt class="text-gray-500 dark:text-gray-400">{{ __('Producător') }}</dt>
<dd class="text-gray-900 dark:text-gray-100 font-semibold">{{ $info['manufacturer'] ?? '— (WMI necunoscut)' }}</dd>
<dt class="text-gray-500 dark:text-gray-400">An model</dt>
<dt class="text-gray-500 dark:text-gray-400">{{ __('An model') }}</dt>
<dd class="text-gray-900 dark:text-gray-100 font-semibold">{{ $info['year'] ?? '—' }}</dd>
<dt class="text-gray-500 dark:text-gray-400">{{ __('Cod uzină') }}</dt>
<dd class="font-mono text-gray-900 dark:text-gray-100">{{ $info['plant'] ?? '—' }}</dd>
<dt class="text-gray-500 dark:text-gray-400">Checksum (ISO)</dt>
<dt class="text-gray-500 dark:text-gray-400">{{ __('Checksum (ISO)') }}</dt>
<dd class="text-gray-900 dark:text-gray-100">
@if ($info['checksum_valid'])
<span class="text-green-600 dark:text-green-400"> valid</span>
<span class="text-green-600 dark:text-green-400">{{ __('✓ valid') }}</span>
@else
<span class="text-gray-500">{{ __('— (multe VIN-uri europene nu respectă checksum-ul NA)') }}</span>
@endif