@php $themeColor = $tenant->settings['theme_color'] ?? '#3B82F6'; $logoUrl = method_exists($tenant, 'getLogoUrl') ? $tenant->getLogoUrl() : null; $faviconUrl = method_exists($tenant, 'getFaviconUrl') ? $tenant->getFaviconUrl() : null; $statuses = App\Models\Tenant\WorkOrder::STATUSES; $flow = ['new', 'diagnosis', 'agreement', 'approved', 'in_work', 'awaiting_parts', 'ready', 'done']; $currentIdx = array_search($wo->status, $flow, true); @endphp @if ($faviconUrl) @endif
@include('partials.lang-switcher')
@if ($logoUrl)@endif

{{ $tenant->display_name ?? $tenant->name }}

{{ __('portal.tracking.title_fisa', ['number' => $wo->number]) }}
@if (isset($approvalStatus) && $approvalStatus)
{{ $approvalStatus['message'] }}
@endif @if ($pendingWorks->isNotEmpty() || $pendingParts->isNotEmpty())

{{ __('portal.tracking.approval_needed_title') }}

{{ __('portal.tracking.approval_needed_body') }}

@foreach ($pendingWorks as $w)
{{ $w->name }}
{{ rtrim(rtrim(number_format($w->hours, 2), '0'), '.') }} {{ __('portal.tracking.hours') }} · {{ number_format($w->total, 0, '.', ' ') }} {{ __('portal.common.currency_mdl') }}
@csrf
@endforeach @foreach ($pendingParts as $p)
{{ $p->name }} @if ($p->article) · {{ $p->article }}@endif
{{ rtrim(rtrim(number_format($p->qty, 2), '0'), '.') }} {{ $p->unit ?? __('portal.tracking.unit_pcs') }} · {{ number_format($p->total, 0, '.', ' ') }} {{ __('portal.common.currency_mdl') }}
@csrf
@endforeach
@endif
{{ $statuses[$wo->status] ?? $wo->status }} @if ($wo->eta_at && in_array($wo->status, ['in_work', 'awaiting_parts', 'approved', 'diagnosis'], true))

{{ __('portal.tracking.ready_estimated') }} {{ $wo->eta_at->isoFormat('D MMM YYYY, HH:mm') }}

@endif

{{ __('portal.tracking.details') }}

@if ($wo->vehicle)
{{ __('portal.tracking.auto') }} {{ trim($wo->vehicle->make . ' ' . $wo->vehicle->model) }} @if ($wo->vehicle->plate) · {{ $wo->vehicle->plate }} @endif
@endif @if ($wo->mileage_in)
{{ __('portal.tracking.mileage') }}{{ number_format($wo->mileage_in, 0, '.', ' ') }} km
@endif
{{ __('portal.tracking.opened') }}{{ $wo->opened_at?->isoFormat('D MMM YYYY') }}
@if ($wo->master)
{{ __('portal.tracking.master') }}{{ $wo->master->name }}
@endif

{{ __('portal.tracking.stages') }}

@if ($wo->complaint)

{{ __('portal.tracking.what_asked') }}

{{ $wo->complaint }}

@endif @if ($wo->recommendations)

{{ __('portal.tracking.recommendations') }}

{{ $wo->recommendations }}
@endif @if ($photos->count())

{{ __('portal.tracking.photos') }}

@foreach ($photos as $p) @endforeach
@endif @if ((float) $wo->total > 0)
{{ __('portal.common.total') }} {{ number_format((float) $wo->total, 2, '.', ' ') }} {{ $tenant->settings['currency'] ?? 'MDL' }}
@endif