feat(i18n): fix widgets, pipeline & mechanic boards + missing translations
Follow-up to previous i18n pass — user reported many visible RO strings on
EN/RU locales because auto-wrap missed:
- Stat::make() first-arg labels in StatsOverview, FinanceOverview, PlatformStats
- $heading static in LowStockTable (converted to getHeading() method)
- Pipeline board Blade view: 40+ literal strings wrapped with {{ __() }}
- Mechanic board Blade view: statuses, buttons, block modal
- PipelineBoard.php hardcoded tag labels, stage labels, notify strings
- MechanicBoard.php confirmBlock notification
Added human RU + EN translations for the visible strings shown in the
screenshots (dashboard widgets, Client/Vehicle list breadcrumbs & columns,
pipeline board topbar/stats/filters/cards/detail panel/quick actions,
mechanic board stats/statuses/block modal). All 306 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -71,11 +71,11 @@
|
||||
|
||||
<div class="mb-stats">
|
||||
<div class="mb-stat">
|
||||
<div class="lbl">Active acum</div>
|
||||
<div class="lbl">{{ __('Active acum') }}</div>
|
||||
<div class="val">{{ $counts['active'] }}</div>
|
||||
</div>
|
||||
<div class="mb-stat">
|
||||
<div class="lbl">Închise azi</div>
|
||||
<div class="lbl">{{ __('Închise azi') }}</div>
|
||||
<div class="val">{{ $counts['closed_today'] }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,7 +93,7 @@
|
||||
<a href="{{ route('filament.tenant.resources.work-orders.edit', $wo) }}" class="num" style="text-decoration:none;color:#3b82f6;">#{{ $wo->number }}</a>
|
||||
<span class="plate">{{ $wo->vehicle?->plate ?? '—' }}</span>
|
||||
</div>
|
||||
<div class="client">{{ $wo->client?->name ?? 'fără client' }} · {{ $wo->vehicle?->make }} {{ $wo->vehicle?->model }}</div>
|
||||
<div class="client">{{ $wo->client?->name ?? __('fără client') }} · {{ $wo->vehicle?->make }} {{ $wo->vehicle?->model }}</div>
|
||||
@if ($wo->complaint)
|
||||
<div class="complaint">{{ $wo->complaint }}</div>
|
||||
@endif
|
||||
@@ -112,31 +112,31 @@
|
||||
<div style="flex:1;">
|
||||
<span style="font-weight:600;">{{ $w->name }}</span>
|
||||
<div style="margin-top:3px; display:flex; gap:4px; align-items:center; flex-wrap:wrap;">
|
||||
<span style="background:{{ $stColor }}; color:white; padding:1px 6px; border-radius:4px; font-size:10px; font-weight:600;">{{ \App\Models\Tenant\WorkOrderWork::MECHANIC_STATUSES[$ms] }}</span>
|
||||
<span style="background:{{ $stColor }}; color:white; padding:1px 6px; border-radius:4px; font-size:10px; font-weight:600;">{{ __(\App\Models\Tenant\WorkOrderWork::MECHANIC_STATUSES[$ms]) }}</span>
|
||||
@if ($w->hours > 0)
|
||||
<span style="color:#6b7280; font-size:10px;">{{ rtrim(rtrim(number_format($w->hours, 2), '0'), '.') }}h norm</span>
|
||||
<span style="color:#6b7280; font-size:10px;">{{ rtrim(rtrim(number_format($w->hours, 2), '0'), '.') }}{{ __('h norm') }}</span>
|
||||
@endif
|
||||
@if ($w->actual_hours > 0 && $effColor)
|
||||
<span style="color:{{ $effColor }}; font-weight:600; font-size:10px;">{{ rtrim(rtrim(number_format($w->actual_hours, 2), '0'), '.') }}h real ({{ $w->efficiencyPct() }}%)</span>
|
||||
<span style="color:{{ $effColor }}; font-weight:600; font-size:10px;">{{ rtrim(rtrim(number_format($w->actual_hours, 2), '0'), '.') }}{{ __('h real') }} ({{ $w->efficiencyPct() }}%)</span>
|
||||
@endif
|
||||
@if ($w->block_reason)
|
||||
<span style="color:#dc2626; font-size:10px;">⚠ {{ \App\Models\Tenant\WorkOrderWork::BLOCK_REASONS[$w->block_reason] ?? $w->block_reason }}</span>
|
||||
<span style="color:#dc2626; font-size:10px;">⚠ {{ __(\App\Models\Tenant\WorkOrderWork::BLOCK_REASONS[$w->block_reason] ?? $w->block_reason) }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:flex; gap:4px; margin-top:6px; flex-wrap:wrap;">
|
||||
@if (in_array($ms, ['pending', 'blocked']))
|
||||
<button wire:click="startWork({{ $w->id }})" style="background:#3b82f6;color:white;border:none;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">▶ Start</button>
|
||||
<button wire:click="startWork({{ $w->id }})" style="background:#3b82f6;color:white;border:none;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">▶ {{ __('Start') }}</button>
|
||||
@endif
|
||||
@if ($ms === 'in_progress')
|
||||
<button wire:click="pauseWork({{ $w->id }})" style="background:#f59e0b;color:white;border:none;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">⏸ Pauză</button>
|
||||
<button wire:click="doneWork({{ $w->id }})" style="background:#10b981;color:white;border:none;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">✓ Done</button>
|
||||
<button wire:click="openBlockModal({{ $w->id }})" style="background:#fff;color:#dc2626;border:1px solid #dc2626;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">🔴 Blochez</button>
|
||||
<button wire:click="pauseWork({{ $w->id }})" style="background:#f59e0b;color:white;border:none;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">⏸ {{ __('Pauză') }}</button>
|
||||
<button wire:click="doneWork({{ $w->id }})" style="background:#10b981;color:white;border:none;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">✓ {{ __('Done') }}</button>
|
||||
<button wire:click="openBlockModal({{ $w->id }})" style="background:#fff;color:#dc2626;border:1px solid #dc2626;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">🔴 {{ __('Blochez') }}</button>
|
||||
@endif
|
||||
@if ($ms === 'paused')
|
||||
<button wire:click="resumeWork({{ $w->id }})" style="background:#3b82f6;color:white;border:none;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">▶ Reia</button>
|
||||
<button wire:click="doneWork({{ $w->id }})" style="background:#10b981;color:white;border:none;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">✓ Done</button>
|
||||
<button wire:click="resumeWork({{ $w->id }})" style="background:#3b82f6;color:white;border:none;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">▶ {{ __('Reia') }}</button>
|
||||
<button wire:click="doneWork({{ $w->id }})" style="background:#10b981;color:white;border:none;padding:4px 8px;border-radius:4px;font-size:11px;cursor:pointer;">✓ {{ __('Done') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@@ -155,19 +155,19 @@
|
||||
@if ($blockingWorkId)
|
||||
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:9999; display:flex; align-items:center; justify-content:center;" wire:click="$set('blockingWorkId', null)">
|
||||
<div class="mb-modal-content" style="background:white; border-radius:12px; padding:20px; max-width:400px; width:90%;" wire:click.stop>
|
||||
<h2 style="font-size:16px; font-weight:600; margin-bottom:12px; color:#dc2626;">🔴 Blochez lucrarea</h2>
|
||||
<p style="font-size:13px; color:#4b5563; margin-bottom:14px;">Selectează motivul pentru care lucrarea nu poate continua. Va fi vizibil managerului.</p>
|
||||
<label style="font-size:11px; color:#6b7280; text-transform:uppercase; font-weight:600; display:block; margin-bottom:4px;">Motiv *</label>
|
||||
<h2 style="font-size:16px; font-weight:600; margin-bottom:12px; color:#dc2626;">🔴 {{ __('Blochez lucrarea') }}</h2>
|
||||
<p style="font-size:13px; color:#4b5563; margin-bottom:14px;">{{ __('Selectează motivul pentru care lucrarea nu poate continua. Va fi vizibil managerului.') }}</p>
|
||||
<label style="font-size:11px; color:#6b7280; text-transform:uppercase; font-weight:600; display:block; margin-bottom:4px;">{{ __('Motiv') }} *</label>
|
||||
<select wire:model="blockReason" style="width:100%; padding:8px 10px; border:1px solid #cbd5e1; border-radius:6px; font-size:14px; margin-bottom:12px;">
|
||||
@foreach (\App\Models\Tenant\WorkOrderWork::BLOCK_REASONS as $k => $v)
|
||||
<option value="{{ $k }}">{{ $v }}</option>
|
||||
<option value="{{ $k }}">{{ __($v) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<label style="font-size:11px; color:#6b7280; text-transform:uppercase; font-weight:600; display:block; margin-bottom:4px;">Detalii (opțional)</label>
|
||||
<textarea wire:model="blockNote" rows="2" style="width:100%; padding:8px 10px; border:1px solid #cbd5e1; border-radius:6px; font-size:14px; margin-bottom:14px;" placeholder="Ex: Lipsește filtrul Mann W712/83"></textarea>
|
||||
<label style="font-size:11px; color:#6b7280; text-transform:uppercase; font-weight:600; display:block; margin-bottom:4px;">{{ __('Detalii (opțional)') }}</label>
|
||||
<textarea wire:model="blockNote" rows="2" style="width:100%; padding:8px 10px; border:1px solid #cbd5e1; border-radius:6px; font-size:14px; margin-bottom:14px;" placeholder="{{ __('Ex: Lipsește filtrul Mann W712/83') }}"></textarea>
|
||||
<div style="display:flex; gap:8px;">
|
||||
<button wire:click="$set('blockingWorkId', null)" style="flex:1; padding:8px; background:white; color:#4b5563; border:1px solid #cbd5e1; border-radius:6px; cursor:pointer;">Anulează</button>
|
||||
<button wire:click="confirmBlock" style="flex:1; padding:8px; background:#dc2626; color:white; border:none; border-radius:6px; cursor:pointer; font-weight:600;">Blochez</button>
|
||||
<button wire:click="$set('blockingWorkId', null)" style="flex:1; padding:8px; background:white; color:#4b5563; border:1px solid #cbd5e1; border-radius:6px; cursor:pointer;">{{ __('Anulează') }}</button>
|
||||
<button wire:click="confirmBlock" style="flex:1; padding:8px; background:#dc2626; color:white; border:none; border-radius:6px; cursor:pointer; font-weight:600;">{{ __('Blochez') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user