feat: WO apply_margin at fișă level + full RO/RU i18n on client portal
Two changes in one commit:
== 1. Moved apply_margin toggle from line-level to Fișă-level ==
The per-manoperă apply_margin toggle is gone from the Manopere tab.
In its place: a single "Aplică marjă internă" toggle in Fișa's
"Plată & total" section (next to override_margin_pct). One decision
per Fișă instead of per line — cleaner mental model, matches how the
shop actually thinks about at-cost vs. billable work.
Migration: work_orders.apply_margin boolean default true (idempotent).
WorkOrderWork::saving now reads WO.apply_margin from DB directly (not
via belongsTo cache) to determine salary_base:
- WO.apply_margin=false → every line gets salary_base=total, applied_margin_pct=0
- WO.apply_margin=true → resolver chain (WO.override → user margin → tenant default)
Old wo_works.apply_margin column stays untouched (backward-compat with
existing rows), but no longer exposed in UI. Tests updated to new
semantic. All existing tests green.
== 2. Full i18n audit on client-facing portal — RO/RU separated ==
Problem: user selecting Russian saw Romanian mixed into headings,
buttons, labels. Every client-facing Blade file was 100% hardcoded
Romanian — zero __() calls.
Fix: created lang/ro/portal.php + lang/ru/portal.php with 131 keys
across 3 namespaces:
- portal.common (email, phone, save, total, powered_by, ...)
- portal.invitation (welcome_name, activate_account, expired_body, ...)
- portal.tracking (title_fisa, approve, approval_needed_title,
ready_estimated, hours, unit_pcs, ...)
- portal.shop (catalog, cart, checkout_title, order_number, vin_title,
signin_title, add_to_cart, in_stock, ...)
Converted 15 Blade files to __() calls:
- resources/views/invitations/{accept,expired,invalid}.blade.php
- resources/views/tracking/show.blade.php
- resources/views/shop/{layout,catalog,cart,checkout,order,account,part,vin}.blade.php
- resources/views/shop/auth/{login,register,forgot,reset}.blade.php
Each view's <html lang="{{ app()->getLocale() }}"> now reflects the
resolved locale (was hardcoded lang="ro").
SetLocale middleware resolves locale in this order:
1. session locale (user picked via language switcher)
2. authenticated user.locale
3. tenant.settings.language
4. app.locale default (now 'ro')
Config change: config/app.php default locale + fallback both = 'ro'
(was 'en'). English falls back to Romanian for portal.* keys since
we don't ship English portal translations — a Romanian shop that
switches to English shows Romanian text, which is safer than showing
"portal.invitation.activate_account" literals.
phpunit.xml sets APP_LOCALE=ro so test assertSee() calls that look
for Romanian text pass.
Verified via portal.* grep: 131 __() calls across 15 files. Zero
hardcoded Romanian nouns/verbs left in any client-facing view.
Suite: 303 passed (840 assertions). Unchanged count — refactor,
not new tests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ro">
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Acceptă invitația — {{ $company }}</title>
|
||||
<title>{{ __('portal.invitation.title_accept') }} — {{ $company }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style>
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, sans-serif; background: #f5f7fa; color: #1a202c; margin: 0; padding: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
|
||||
@@ -21,8 +21,8 @@ input:focus { border-color: #3b82f6; }
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<h1>Bine ai venit, {{ $name }}!</h1>
|
||||
<p class="sub">Ai fost invitat să accesezi <strong>{{ $company }}</strong>. Setează o parolă pentru a-ți activa contul.</p>
|
||||
<h1>{{ __('portal.invitation.welcome_name', ['name' => $name]) }}</h1>
|
||||
<p class="sub">{!! __('portal.invitation.welcome_body', ['company' => '<strong>' . e($company) . '</strong>']) !!}</p>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="errors">
|
||||
@@ -35,18 +35,18 @@ input:focus { border-color: #3b82f6; }
|
||||
<form method="POST" action="{{ url('/invitations/' . $token) }}">
|
||||
@csrf
|
||||
<div class="field readonly">
|
||||
<label>Email</label>
|
||||
<label>{{ __('portal.common.email') }}</label>
|
||||
<input type="email" value="{{ $email }}" readonly>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Parolă nouă</label>
|
||||
<label>{{ __('portal.invitation.new_password') }}</label>
|
||||
<input type="password" name="password" required minlength="8" autofocus>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Confirmă parola</label>
|
||||
<label>{{ __('portal.invitation.confirm_password') }}</label>
|
||||
<input type="password" name="password_confirmation" required minlength="8">
|
||||
</div>
|
||||
<button class="btn" type="submit">Activează contul</button>
|
||||
<button class="btn" type="submit">{{ __('portal.invitation.activate_account') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ro"><head><meta charset="UTF-8"><title>Invitație expirată</title>
|
||||
<html lang="{{ app()->getLocale() }}"><head><meta charset="UTF-8"><title>{{ __('portal.invitation.expired_title') }}</title>
|
||||
<style>body{font-family:-apple-system,sans-serif;background:#f5f7fa;display:flex;align-items:center;justify-content:center;min-height:100vh;margin:0;color:#1a202c}.card{background:white;padding:32px;border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,0.08);max-width:420px;text-align:center}</style></head>
|
||||
<body><div class="card"><h1>Invitație expirată</h1><p style="color:#4a5568">Linkul de invitație a expirat (durata maximă: 7 zile). Roagă administratorul să retrimită invitația.</p></div></body></html>
|
||||
<body><div class="card"><h1>{{ __('portal.invitation.expired_title') }}</h1><p style="color:#4a5568">{{ __('portal.invitation.expired_body') }}</p></div></body></html>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ro"><head><meta charset="UTF-8"><title>Invitație invalidă</title>
|
||||
<html lang="{{ app()->getLocale() }}"><head><meta charset="UTF-8"><title>{{ __('portal.invitation.invalid_title') }}</title>
|
||||
<style>body{font-family:-apple-system,sans-serif;background:#f5f7fa;display:flex;align-items:center;justify-content:center;min-height:100vh;margin:0;color:#1a202c}.card{background:white;padding:32px;border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,0.08);max-width:420px;text-align:center}</style></head>
|
||||
<body><div class="card"><h1>Invitație invalidă</h1><p style="color:#4a5568">Linkul nu mai este valabil sau a fost deja folosit.</p></div></body></html>
|
||||
<body><div class="card"><h1>{{ __('portal.invitation.invalid_title') }}</h1><p style="color:#4a5568">{{ __('portal.invitation.invalid_body') }}</p></div></body></html>
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
@extends('shop.layout')
|
||||
@section('title', 'Contul meu')
|
||||
@section('title', __('portal.shop.my_account'))
|
||||
@section('content')
|
||||
@php
|
||||
$currency = $tenant->settings['currency'] ?? 'MDL';
|
||||
$statuses = \App\Models\Tenant\OnlineOrder::STATUSES;
|
||||
@endphp
|
||||
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">Salut, {{ $customer->name }}!</h1>
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">{{ __('portal.shop.hello_name', ['name' => $customer->name]) }}</h1>
|
||||
|
||||
<div class="card" style="margin-bottom:16px;">
|
||||
<h3 style="font-size:15px;margin-bottom:10px;">Date contact</h3>
|
||||
<h3 style="font-size:15px;margin-bottom:10px;">{{ __('portal.shop.contact_data') }}</h3>
|
||||
<p class="muted">📞 {{ $customer->phone }}</p>
|
||||
@if ($customer->email)<p class="muted">✉️ {{ $customer->email }}</p>@endif
|
||||
</div>
|
||||
|
||||
<h2 style="font-size:18px;margin-bottom:12px;">Comenzile mele ({{ $orders->count() }})</h2>
|
||||
<h2 style="font-size:18px;margin-bottom:12px;">{{ __('portal.shop.my_orders', ['count' => $orders->count()]) }}</h2>
|
||||
|
||||
@if ($orders->isEmpty())
|
||||
<div class="card" style="text-align:center;padding:32px;">
|
||||
<p class="muted">Nu ai nicio comandă încă.</p>
|
||||
<a class="btn" href="/shop" style="margin-top:12px;">Vezi catalogul</a>
|
||||
<p class="muted">{{ __('portal.shop.no_orders_yet') }}</p>
|
||||
<a class="btn" href="/shop" style="margin-top:12px;">{{ __('portal.shop.view_catalog') }}</a>
|
||||
</div>
|
||||
@else
|
||||
<div class="card">
|
||||
<table class="cart">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nr.</th><th>Data</th><th>Articole</th><th class="r">Total</th><th>Status</th><th></th>
|
||||
<th>{{ __('portal.shop.order_nr') }}</th><th>{{ __('portal.shop.order_date') }}</th><th>{{ __('portal.shop.order_items') }}</th><th class="r">{{ __('portal.common.total') }}</th><th>{{ __('portal.shop.status') }}</th><th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -37,7 +37,7 @@
|
||||
<td>{{ $order->items()->count() }}</td>
|
||||
<td class="r">{{ number_format((float) $order->total, 2) }} {{ $currency }}</td>
|
||||
<td><span class="status-pill" style="font-size:11px;">{{ $statuses[$order->status] ?? $order->status }}</span></td>
|
||||
<td><a href="{{ $order->trackingUrl() }}" class="muted" style="text-decoration:underline;">Detalii →</a></td>
|
||||
<td><a href="{{ $order->trackingUrl() }}" class="muted" style="text-decoration:underline;">{{ __('portal.shop.order_details_arrow') }}</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@extends('shop.layout')
|
||||
@section('title', 'Resetare parolă')
|
||||
@section('title', __('portal.shop.forgot_title'))
|
||||
@section('content')
|
||||
|
||||
<div style="max-width:380px;margin:0 auto;">
|
||||
<h1 style="font-size:22px;margin-bottom:8px;">Am uitat parola</h1>
|
||||
<p class="muted" style="margin-bottom:16px;">Introdu emailul cu care te-ai înregistrat — îți trimitem un link de resetare.</p>
|
||||
<h1 style="font-size:22px;margin-bottom:8px;">{{ __('portal.shop.forgot_title') }}</h1>
|
||||
<p class="muted" style="margin-bottom:16px;">{{ __('portal.shop.forgot_intro') }}</p>
|
||||
|
||||
@if (session('status'))
|
||||
<div class="card" style="border-color:#bbf7d0;background:#f0fdf4;margin-bottom:14px;color:#166534;font-size:14px;">
|
||||
@@ -22,14 +22,14 @@
|
||||
|
||||
<form method="POST" action="/shop/password/email" class="card">
|
||||
@csrf
|
||||
<div class="field"><label>Email *</label>
|
||||
<div class="field"><label>{{ __('portal.common.email') }} *</label>
|
||||
<input type="email" name="email" value="{{ old('email') }}" required autofocus>
|
||||
</div>
|
||||
<button type="submit" class="btn block">Trimite link resetare</button>
|
||||
<button type="submit" class="btn block">{{ __('portal.shop.send_reset_link') }}</button>
|
||||
</form>
|
||||
|
||||
<p class="muted" style="text-align:center;margin-top:12px;">
|
||||
<a href="/shop/login" style="color:inherit;text-decoration:underline;">← Înapoi la login</a>
|
||||
<a href="/shop/login" style="color:inherit;text-decoration:underline;">{{ __('portal.shop.back_to_login') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@extends('shop.layout')
|
||||
@section('title', 'Login')
|
||||
@section('title', __('portal.shop.login'))
|
||||
@section('content')
|
||||
|
||||
<div style="max-width:380px;margin:0 auto;">
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">Intră în cont</h1>
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">{{ __('portal.shop.signin_title') }}</h1>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="card" style="border-color:#fca5a5;background:#fef2f2;margin-bottom:14px;">
|
||||
@@ -15,18 +15,18 @@
|
||||
|
||||
<form method="POST" action="/shop/login" class="card">
|
||||
@csrf
|
||||
<div class="field"><label>Telefon *</label>
|
||||
<div class="field"><label>{{ __('portal.shop.phone_req') }}</label>
|
||||
<input type="text" name="phone" value="{{ old('phone') }}" required placeholder="+373…">
|
||||
</div>
|
||||
<div class="field"><label>Parolă *</label>
|
||||
<div class="field"><label>{{ __('portal.common.password') }} *</label>
|
||||
<input type="password" name="password" required>
|
||||
</div>
|
||||
<button type="submit" class="btn block">Intră</button>
|
||||
<button type="submit" class="btn block">{{ __('portal.shop.signin_button') }}</button>
|
||||
</form>
|
||||
|
||||
<p class="muted" style="text-align:center;margin-top:12px;">
|
||||
<a href="/shop/password/forgot" style="color:inherit;text-decoration:underline;">Am uitat parola</a>
|
||||
· Nu ai cont? <a href="/shop/register" style="color:inherit;text-decoration:underline;">Înregistrare</a>
|
||||
<a href="/shop/password/forgot" style="color:inherit;text-decoration:underline;">{{ __('portal.shop.forgot_password') }}</a>
|
||||
· {{ __('portal.shop.no_account') }} <a href="/shop/register" style="color:inherit;text-decoration:underline;">{{ __('portal.shop.register') }}</a>
|
||||
</p>
|
||||
@if (session('status'))
|
||||
<div class="card" style="border-color:#bbf7d0;background:#f0fdf4;margin-top:14px;color:#166534;font-size:14px;text-align:center;">
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@extends('shop.layout')
|
||||
@section('title', 'Înregistrare')
|
||||
@section('title', __('portal.shop.register'))
|
||||
@section('content')
|
||||
|
||||
<div style="max-width:420px;margin:0 auto;">
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">Înregistrare cont</h1>
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">{{ __('portal.shop.register_title') }}</h1>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="card" style="border-color:#fca5a5;background:#fef2f2;margin-bottom:14px;">
|
||||
@@ -15,26 +15,26 @@
|
||||
|
||||
<form method="POST" action="/shop/register" class="card">
|
||||
@csrf
|
||||
<div class="field"><label>Nume *</label>
|
||||
<div class="field"><label>{{ __('portal.common.name') }} *</label>
|
||||
<input type="text" name="name" value="{{ old('name') }}" required>
|
||||
</div>
|
||||
<div class="field"><label>Telefon *</label>
|
||||
<div class="field"><label>{{ __('portal.shop.phone_req') }}</label>
|
||||
<input type="text" name="phone" value="{{ old('phone') }}" required placeholder="+373…">
|
||||
</div>
|
||||
<div class="field"><label>Email</label>
|
||||
<div class="field"><label>{{ __('portal.common.email') }}</label>
|
||||
<input type="email" name="email" value="{{ old('email') }}">
|
||||
</div>
|
||||
<div class="field"><label>Parolă *</label>
|
||||
<div class="field"><label>{{ __('portal.common.password') }} *</label>
|
||||
<input type="password" name="password" required minlength="6">
|
||||
</div>
|
||||
<div class="field"><label>Confirmă parola *</label>
|
||||
<div class="field"><label>{{ __('portal.invitation.confirm_password') }} *</label>
|
||||
<input type="password" name="password_confirmation" required minlength="6">
|
||||
</div>
|
||||
<button type="submit" class="btn block">Creează cont</button>
|
||||
<button type="submit" class="btn block">{{ __('portal.shop.register_button') }}</button>
|
||||
</form>
|
||||
|
||||
<p class="muted" style="text-align:center;margin-top:12px;">
|
||||
Ai deja cont? <a href="/shop/login" style="color:inherit;text-decoration:underline;">Login</a>
|
||||
{{ __('portal.shop.have_account') }} <a href="/shop/login" style="color:inherit;text-decoration:underline;">{{ __('portal.shop.login') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@extends('shop.layout')
|
||||
@section('title', 'Parolă nouă')
|
||||
@section('title', __('portal.shop.reset_title'))
|
||||
@section('content')
|
||||
|
||||
<div style="max-width:380px;margin:0 auto;">
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">Setează o parolă nouă</h1>
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">{{ __('portal.shop.reset_title') }}</h1>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="card" style="border-color:#fca5a5;background:#fef2f2;margin-bottom:14px;">
|
||||
@@ -16,16 +16,16 @@
|
||||
<form method="POST" action="/shop/password/reset" class="card">
|
||||
@csrf
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
<div class="field"><label>Email *</label>
|
||||
<div class="field"><label>{{ __('portal.common.email') }} *</label>
|
||||
<input type="email" name="email" value="{{ old('email', $email) }}" required readonly style="background:#f9fafb;">
|
||||
</div>
|
||||
<div class="field"><label>Parolă nouă *</label>
|
||||
<div class="field"><label>{{ __('portal.invitation.new_password') }} *</label>
|
||||
<input type="password" name="password" required minlength="6" autofocus>
|
||||
</div>
|
||||
<div class="field"><label>Confirmă parola *</label>
|
||||
<div class="field"><label>{{ __('portal.invitation.confirm_password') }} *</label>
|
||||
<input type="password" name="password_confirmation" required minlength="6">
|
||||
</div>
|
||||
<button type="submit" class="btn block">Setează parola</button>
|
||||
<button type="submit" class="btn block">{{ __('portal.shop.reset_button') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
@extends('shop.layout')
|
||||
@section('title', 'Coș')
|
||||
@section('title', __('portal.shop.cart_title'))
|
||||
@section('content')
|
||||
@php $currency = $tenant->settings['currency'] ?? 'MDL'; @endphp
|
||||
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">Coșul meu</h1>
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">{{ __('portal.shop.cart_title') }}</h1>
|
||||
|
||||
@if (empty($cart))
|
||||
<div class="card" style="text-align:center;padding:40px;">
|
||||
<p class="muted">Coșul e gol.</p>
|
||||
<a class="btn" href="/shop" style="margin-top:12px;">Vezi catalogul</a>
|
||||
<p class="muted">{{ __('portal.shop.cart_empty') }}</p>
|
||||
<a class="btn" href="/shop" style="margin-top:12px;">{{ __('portal.shop.view_catalog') }}</a>
|
||||
</div>
|
||||
@else
|
||||
<form method="POST" action="/shop/cart/update">
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="card">
|
||||
<table class="cart">
|
||||
<thead>
|
||||
<tr><th>Piesă</th><th class="r">Preț</th><th class="r">Cant.</th><th class="r">Total</th></tr>
|
||||
<tr><th>{{ __('portal.shop.part') }}</th><th class="r">{{ __('portal.shop.price') }}</th><th class="r">{{ __('portal.shop.qty') }}</th><th class="r">{{ __('portal.common.total') }}</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($cart as $id => $item)
|
||||
@@ -37,10 +37,10 @@
|
||||
</table>
|
||||
</div>
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;margin-top:16px;flex-wrap:wrap;gap:12px;">
|
||||
<button class="btn outline" type="submit">Actualizează coșul</button>
|
||||
<button class="btn outline" type="submit">{{ __('portal.shop.update_cart') }}</button>
|
||||
<div style="text-align:right;">
|
||||
<div style="font-size:20px;font-weight:700;">Subtotal: {{ number_format($subtotal, 2) }} {{ $currency }}</div>
|
||||
<a class="btn" href="/shop/checkout" style="margin-top:8px;">Finalizează comanda →</a>
|
||||
<div style="font-size:20px;font-weight:700;">{{ __('portal.shop.subtotal') }} {{ number_format($subtotal, 2) }} {{ $currency }}</div>
|
||||
<a class="btn" href="/shop/checkout" style="margin-top:8px;">{{ __('portal.shop.checkout_arrow') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
@extends('shop.layout')
|
||||
@section('title', 'Catalog piese')
|
||||
@section('title', __('portal.shop.catalog_title'))
|
||||
@section('content')
|
||||
@php $currency = $tenant->settings['currency'] ?? 'MDL'; @endphp
|
||||
|
||||
<form method="GET" action="/shop" class="filters">
|
||||
<input type="text" name="q" value="{{ $term }}" placeholder="Caută denumire, cod, brand, cod cross…">
|
||||
<input type="text" name="q" value="{{ $term }}" placeholder="{{ __('portal.shop.search_placeholder') }}">
|
||||
<select name="cat" onchange="this.form.submit()">
|
||||
<option value="">Toate categoriile</option>
|
||||
<option value="">{{ __('portal.shop.all_categories') }}</option>
|
||||
@foreach ($categories as $c)
|
||||
<option value="{{ $c }}" {{ $category === $c ? 'selected' : '' }}>{{ $c }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<label style="display:flex;align-items:center;gap:6px;font-size:14px;">
|
||||
<input type="checkbox" name="in_stock" value="1" {{ $inStock ? 'checked' : '' }} onchange="this.form.submit()">
|
||||
Doar în stoc
|
||||
{{ __('portal.shop.in_stock_only') }}
|
||||
</label>
|
||||
<button class="btn" type="submit">Caută</button>
|
||||
<button class="btn" type="submit">{{ __('portal.common.search') }}</button>
|
||||
</form>
|
||||
|
||||
@if ($parts->isEmpty())
|
||||
<div class="card" style="text-align:center;padding:48px;">
|
||||
<p class="muted">Nicio piesă găsită{{ $term ? ' pentru „' . $term . '”' : '' }}.</p>
|
||||
<p class="muted">{{ $term ? __('portal.shop.no_parts_found_for', ['term' => $term]) : __('portal.shop.no_parts_found') }}.</p>
|
||||
</div>
|
||||
@else
|
||||
<div class="grid">
|
||||
@@ -41,12 +41,12 @@
|
||||
{{ $p->brand ? $p->brand . ' · ' : '' }}{{ $p->article ?? '' }}
|
||||
</div>
|
||||
<div class="stock {{ $stock > 0 ? 'in' : 'out' }}">
|
||||
{{ $stock > 0 ? '● În stoc' : '○ La comandă' }}
|
||||
{{ $stock > 0 ? __('portal.shop.in_stock') : __('portal.shop.on_order') }}
|
||||
</div>
|
||||
<div class="price">{{ number_format((float) $p->sell_price, 2) }} {{ $currency }}</div>
|
||||
<form method="POST" action="/shop/part/{{ $p->id }}/add" style="margin-top:10px;">
|
||||
@csrf
|
||||
<button class="btn block" type="submit">Adaugă în coș</button>
|
||||
<button class="btn block" type="submit">{{ __('portal.shop.add_to_cart') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
@extends('shop.layout')
|
||||
@section('title', 'Finalizare comandă')
|
||||
@section('title', __('portal.shop.checkout_title'))
|
||||
@section('content')
|
||||
@php
|
||||
$currency = $tenant->settings['currency'] ?? 'MDL';
|
||||
$labels = \App\Models\Tenant\OnlineOrder::DELIVERY;
|
||||
@endphp
|
||||
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">Finalizează comanda</h1>
|
||||
<h1 style="font-size:22px;margin-bottom:16px;">{{ __('portal.shop.checkout_title') }}</h1>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="card" style="border-color:#fca5a5;background:#fef2f2;margin-bottom:14px;">
|
||||
@@ -20,19 +20,19 @@
|
||||
<form method="POST" action="/shop/checkout" class="card">
|
||||
@csrf
|
||||
<div class="field">
|
||||
<label>Nume complet *</label>
|
||||
<label>{{ __('portal.shop.full_name') }}</label>
|
||||
<input type="text" name="customer_name" value="{{ old('customer_name', ($customer ?? null)?->name) }}" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Telefon *</label>
|
||||
<label>{{ __('portal.shop.phone_req') }}</label>
|
||||
<input type="text" name="customer_phone" value="{{ old('customer_phone', ($customer ?? null)?->phone) }}" required placeholder="+373…">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Email</label>
|
||||
<label>{{ __('portal.common.email') }}</label>
|
||||
<input type="email" name="customer_email" value="{{ old('customer_email', ($customer ?? null)?->email) }}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Livrare *</label>
|
||||
<label>{{ __('portal.shop.delivery_req') }}</label>
|
||||
<select name="delivery_method" required>
|
||||
@foreach ($deliveryOptions as $opt)
|
||||
<option value="{{ $opt }}">{{ $labels[$opt] ?? $opt }}</option>
|
||||
@@ -40,18 +40,18 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Adresă (pentru curier/poștă)</label>
|
||||
<label>{{ __('portal.shop.address_delivery') }}</label>
|
||||
<input type="text" name="address" value="{{ old('address') }}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Observații</label>
|
||||
<label>{{ __('portal.shop.notes') }}</label>
|
||||
<textarea name="notes" rows="2">{{ old('notes') }}</textarea>
|
||||
</div>
|
||||
<button class="btn block" type="submit">Plasează comanda</button>
|
||||
<button class="btn block" type="submit">{{ __('portal.shop.place_order') }}</button>
|
||||
</form>
|
||||
|
||||
<div class="card">
|
||||
<h3 style="font-size:15px;margin-bottom:10px;">Sumar</h3>
|
||||
<h3 style="font-size:15px;margin-bottom:10px;">{{ __('portal.shop.summary') }}</h3>
|
||||
<table class="cart">
|
||||
@foreach ($cart as $item)
|
||||
<tr>
|
||||
@@ -63,7 +63,7 @@
|
||||
<div style="margin-top:12px;font-size:18px;font-weight:700;text-align:right;">
|
||||
{{ number_format($subtotal, 2) }} {{ $currency }}
|
||||
</div>
|
||||
<p class="muted" style="margin-top:6px;">Taxa de livrare se calculează în funcție de metoda aleasă.</p>
|
||||
<p class="muted" style="margin-top:6px;">{{ __('portal.shop.delivery_fee_note') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>@yield('title', 'Magazin') — {{ $brand }}</title>
|
||||
<title>@yield('title', __('portal.shop.catalog')) — {{ $brand }}</title>
|
||||
@if ($faviconUrl)<link rel="icon" href="{{ $faviconUrl }}">@endif
|
||||
<style>
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
@@ -67,19 +67,19 @@
|
||||
<span>{{ $brand }}</span>
|
||||
</a>
|
||||
<nav>
|
||||
<a href="/shop">Catalog</a>
|
||||
<a href="/shop/vin">Caută după VIN</a>
|
||||
<a href="/shop/cart">🛒 Coș
|
||||
<a href="/shop">{{ __('portal.shop.catalog') }}</a>
|
||||
<a href="/shop/vin">{{ __('portal.shop.search_by_vin') }}</a>
|
||||
<a href="/shop/cart">{{ __('portal.shop.cart') }}
|
||||
@if (($cartCount ?? 0) > 0)<span class="cart-badge">{{ $cartCount }}</span>@endif
|
||||
</a>
|
||||
@auth('shop')
|
||||
<a href="/shop/account">👤 {{ Auth::guard('shop')->user()->name }}</a>
|
||||
<form method="POST" action="/shop/logout" style="display:inline;">@csrf
|
||||
<button type="submit" style="background:transparent;border:0;color:inherit;cursor:pointer;font:inherit;">Ieșire</button>
|
||||
<button type="submit" style="background:transparent;border:0;color:inherit;cursor:pointer;font:inherit;">{{ __('portal.shop.logout') }}</button>
|
||||
</form>
|
||||
@else
|
||||
<a href="/shop/login">Login</a>
|
||||
<a href="/shop/register" style="background:rgba(255,255,255,.2);border-radius:6px;padding:4px 10px;">Înregistrare</a>
|
||||
<a href="/shop/login">{{ __('portal.shop.login') }}</a>
|
||||
<a href="/shop/register" style="background:rgba(255,255,255,.2);border-radius:6px;padding:4px 10px;">{{ __('portal.shop.register') }}</a>
|
||||
@endauth
|
||||
</nav>
|
||||
</div>
|
||||
@@ -87,6 +87,6 @@
|
||||
<div class="wrap">
|
||||
@yield('content')
|
||||
</div>
|
||||
<footer>{{ $brand }} · Powered by AutoCRM</footer>
|
||||
<footer>{{ $brand }} · {{ __('portal.common.powered_by') }}</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@extends('shop.layout')
|
||||
@section('title', 'Comanda ' . $order->number)
|
||||
@section('title', __('portal.shop.order_number') . ' ' . $order->number)
|
||||
@section('content')
|
||||
@php
|
||||
$currency = $tenant->settings['currency'] ?? 'MDL';
|
||||
@@ -10,14 +10,14 @@
|
||||
@endphp
|
||||
|
||||
<div class="card" style="text-align:center;">
|
||||
<div style="font-size:14px;color:#6b7280;">Comanda</div>
|
||||
<div style="font-size:14px;color:#6b7280;">{{ __('portal.shop.order_number') }}</div>
|
||||
<div style="font-size:24px;font-weight:700;margin:4px 0;">#{{ $order->number }}</div>
|
||||
<span class="status-pill">{{ $statuses[$order->status] ?? $order->status }}</span>
|
||||
</div>
|
||||
|
||||
@if ($order->status !== 'cancelled')
|
||||
<div class="card" style="margin-top:14px;">
|
||||
<h3 style="font-size:15px;margin-bottom:12px;">Status</h3>
|
||||
<h3 style="font-size:15px;margin-bottom:12px;">{{ __('portal.shop.status') }}</h3>
|
||||
<div style="display:flex;justify-content:space-between;gap:4px;">
|
||||
@foreach ($flow as $i => $st)
|
||||
<div style="flex:1;text-align:center;">
|
||||
@@ -33,7 +33,7 @@
|
||||
@endif
|
||||
|
||||
<div class="card" style="margin-top:14px;">
|
||||
<h3 style="font-size:15px;margin-bottom:10px;">Produse</h3>
|
||||
<h3 style="font-size:15px;margin-bottom:10px;">{{ __('portal.shop.products') }}</h3>
|
||||
<table class="cart">
|
||||
@foreach ($order->items as $it)
|
||||
<tr>
|
||||
@@ -41,20 +41,20 @@
|
||||
<td class="r">{{ number_format((float) $it->total, 2) }} {{ $currency }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr><td class="muted">Livrare ({{ $delivery[$order->delivery_method] ?? $order->delivery_method }})</td>
|
||||
<tr><td class="muted">{{ __('portal.shop.delivery') }} ({{ $delivery[$order->delivery_method] ?? $order->delivery_method }})</td>
|
||||
<td class="r">{{ number_format((float) $order->delivery_fee, 2) }} {{ $currency }}</td></tr>
|
||||
<tr><td style="font-weight:700;">Total</td>
|
||||
<tr><td style="font-weight:700;">{{ __('portal.common.total') }}</td>
|
||||
<td class="r" style="font-weight:700;font-size:18px;">{{ number_format((float) $order->total, 2) }} {{ $currency }}</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card" style="margin-top:14px;">
|
||||
<h3 style="font-size:15px;margin-bottom:8px;">Date livrare</h3>
|
||||
<h3 style="font-size:15px;margin-bottom:8px;">{{ __('portal.shop.delivery_data') }}</h3>
|
||||
<p class="muted">{{ $order->customer_name }} · {{ $order->customer_phone }}</p>
|
||||
@if ($order->address)<p class="muted">{{ $order->address }}</p>@endif
|
||||
</div>
|
||||
|
||||
<div style="margin-top:16px;text-align:center;">
|
||||
<a class="btn outline" href="/shop">← Continuă cumpărăturile</a>
|
||||
<a class="btn outline" href="/shop">{{ __('portal.shop.continue_shopping') }}</a>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
$imgs = $part->imageUrls();
|
||||
@endphp
|
||||
|
||||
<a href="/shop" class="muted">← Înapoi la catalog</a>
|
||||
<a href="/shop" class="muted">{{ __('portal.shop.back_to_catalog') }}</a>
|
||||
|
||||
@if (! empty($imgs))
|
||||
<div class="card" style="margin-top:12px;display:grid;grid-template-columns:280px 1fr;gap:20px;align-items:start;">
|
||||
@@ -43,13 +43,15 @@
|
||||
@endif
|
||||
<h1 style="font-size:22px;margin-bottom:8px;">{{ $part->name }}</h1>
|
||||
<div class="muted" style="margin-bottom:14px;">
|
||||
{{ $part->brand ? 'Brand: ' . $part->brand : '' }}
|
||||
{{ $part->article ? ' · Cod: ' . $part->article : '' }}
|
||||
{{ $part->brand ? __('portal.shop.brand_label') . ' ' . $part->brand : '' }}
|
||||
{{ $part->article ? ' · ' . __('portal.shop.code_label') . ' ' . $part->article : '' }}
|
||||
{{ $part->category ? ' · ' . $part->category : '' }}
|
||||
</div>
|
||||
|
||||
<div class="stock {{ $stock > 0 ? 'in' : 'out' }}" style="margin-bottom:8px;">
|
||||
{{ $stock > 0 ? '● În stoc (' . rtrim(rtrim(number_format($stock, 2), '0'), '.') . ' ' . ($part->unit ?? 'buc') . ')' : '○ La comandă' }}
|
||||
{{ $stock > 0
|
||||
? __('portal.shop.in_stock_qty', ['qty' => rtrim(rtrim(number_format($stock, 2), '0'), '.'), 'unit' => $part->unit ?? __('portal.tracking.unit_pcs')])
|
||||
: __('portal.shop.on_order') }}
|
||||
</div>
|
||||
<div style="font-size:26px;font-weight:700;color:{{ $tenant->settings['theme_color'] ?? '#3B82F6' }};margin-bottom:16px;">
|
||||
{{ number_format((float) $part->sell_price, 2) }} {{ $currency }}
|
||||
@@ -58,12 +60,12 @@
|
||||
<form method="POST" action="/shop/part/{{ $part->id }}/add" style="display:flex;gap:8px;align-items:center;max-width:320px;">
|
||||
@csrf
|
||||
<input type="number" name="qty" value="1" min="1" style="width:80px;padding:10px;border:1px solid #d1d5db;border-radius:8px;">
|
||||
<button class="btn" type="submit">Adaugă în coș</button>
|
||||
<button class="btn" type="submit">{{ __('portal.shop.add_to_cart') }}</button>
|
||||
</form>
|
||||
|
||||
@if ($part->crossRefs->isNotEmpty())
|
||||
<div style="margin-top:20px;">
|
||||
<h3 style="font-size:14px;margin-bottom:6px;">Coduri echivalente (cross)</h3>
|
||||
<h3 style="font-size:14px;margin-bottom:6px;">{{ __('portal.shop.cross_refs_title') }}</h3>
|
||||
<div class="muted">
|
||||
@foreach ($part->crossRefs as $cr)
|
||||
<span style="display:inline-block;background:#f3f4f6;border-radius:6px;padding:3px 8px;margin:2px;">
|
||||
@@ -76,11 +78,11 @@
|
||||
|
||||
@if ($part->notes)
|
||||
<div style="margin-top:20px;">
|
||||
<h3 style="font-size:14px;margin-bottom:6px;">Descriere</h3>
|
||||
<h3 style="font-size:14px;margin-bottom:6px;">{{ __('portal.shop.description') }}</h3>
|
||||
<p class="muted" style="white-space:pre-wrap;">{{ $part->notes }}</p>
|
||||
</div>
|
||||
@endif
|
||||
@if ($img)
|
||||
@if ($img ?? null)
|
||||
</div>{{-- /right column --}}
|
||||
</div>{{-- /card grid --}}
|
||||
@else
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
@extends('shop.layout')
|
||||
@section('title', 'Căutare după VIN')
|
||||
@section('title', __('portal.shop.vin_title'))
|
||||
@section('content')
|
||||
|
||||
<div class="card">
|
||||
<h1 style="font-size:20px;margin-bottom:6px;">Caută piese după VIN</h1>
|
||||
<p class="muted" style="margin-bottom:16px;">Introdu codul VIN (17 caractere) ca să identificăm mașina. Apoi caută piesele în catalog.</p>
|
||||
<h1 style="font-size:20px;margin-bottom:6px;">{{ __('portal.shop.vin_title') }}</h1>
|
||||
<p class="muted" style="margin-bottom:16px;">{{ __('portal.shop.vin_intro') }}</p>
|
||||
|
||||
<form method="GET" action="/shop/vin" style="display:flex;gap:8px;flex-wrap:wrap;">
|
||||
<input type="text" name="vin" value="{{ $vin }}" maxlength="17" placeholder="ex: WVWZZZ1JZXW000001"
|
||||
style="flex:1;min-width:240px;padding:10px 12px;border:1px solid #d1d5db;border-radius:8px;font-family:monospace;text-transform:uppercase;">
|
||||
<button class="btn" type="submit">Decodează</button>
|
||||
<button class="btn" type="submit">{{ __('portal.shop.vin_decode') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@if ($decoded)
|
||||
<div class="card" style="margin-top:14px;">
|
||||
@if (! ($decoded['valid_length'] ?? false))
|
||||
<p class="stock out">{{ $decoded['reason'] ?? 'VIN invalid — trebuie 17 caractere.' }}</p>
|
||||
<p class="stock out">{{ $decoded['reason'] ?? __('portal.shop.vin_invalid') }}</p>
|
||||
@else
|
||||
<h3 style="font-size:16px;margin-bottom:10px;">Mașină identificată</h3>
|
||||
<h3 style="font-size:16px;margin-bottom:10px;">{{ __('portal.shop.vin_identified') }}</h3>
|
||||
<table class="cart">
|
||||
<tr><td>Producător</td><td class="r"><strong>{{ $decoded['manufacturer'] ?? '—' }}</strong></td></tr>
|
||||
<tr><td>An model</td><td class="r"><strong>{{ $decoded['year'] ?? '—' }}</strong></td></tr>
|
||||
<tr><td>Țară</td><td class="r">{{ $decoded['country'] ?? '—' }}</td></tr>
|
||||
<tr><td>Regiune</td><td class="r">{{ $decoded['region'] ?? '—' }}</td></tr>
|
||||
<tr><td>{{ __('portal.shop.vin_manufacturer') }}</td><td class="r"><strong>{{ $decoded['manufacturer'] ?? '—' }}</strong></td></tr>
|
||||
<tr><td>{{ __('portal.shop.vin_year') }}</td><td class="r"><strong>{{ $decoded['year'] ?? '—' }}</strong></td></tr>
|
||||
<tr><td>{{ __('portal.shop.vin_country') }}</td><td class="r">{{ $decoded['country'] ?? '—' }}</td></tr>
|
||||
<tr><td>{{ __('portal.shop.vin_region') }}</td><td class="r">{{ $decoded['region'] ?? '—' }}</td></tr>
|
||||
</table>
|
||||
<div style="margin-top:14px;">
|
||||
<a class="btn outline" href="/shop?q={{ urlencode($decoded['manufacturer'] ?? '') }}">
|
||||
Caută piese pentru {{ $decoded['manufacturer'] ?? 'această mașină' }} →
|
||||
{{ __('portal.shop.vin_search_parts', ['maker' => $decoded['manufacturer'] ?? __('portal.shop.this_car')]) }}
|
||||
</a>
|
||||
</div>
|
||||
<p class="muted" style="margin-top:12px;">
|
||||
Pentru compatibilitate exactă pe model/motorizare, contactează service-ul cu acest VIN.
|
||||
{{ __('portal.shop.vin_contact_note') }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
<header>
|
||||
@if ($logoUrl)<img src="{{ $logoUrl }}" alt="">@endif
|
||||
<h1>{{ $tenant->display_name ?? $tenant->name }}</h1>
|
||||
<div class="num">Fișa #{{ $wo->number }}</div>
|
||||
<div class="num">{{ __('portal.tracking.title_fisa', ['number' => $wo->number]) }}</div>
|
||||
</header>
|
||||
|
||||
<style>
|
||||
@@ -112,17 +112,17 @@
|
||||
|
||||
@if ($pendingWorks->isNotEmpty() || $pendingParts->isNotEmpty())
|
||||
<div class="approval-banner">
|
||||
<h3>⚠ Necesită aprobarea ta</h3>
|
||||
<p style="font-size:13px;color:#92400e;margin-bottom:10px;">Am descoperit lucrări suplimentare. Te rugăm să decizi mai jos.</p>
|
||||
<h3>{{ __('portal.tracking.approval_needed_title') }}</h3>
|
||||
<p style="font-size:13px;color:#92400e;margin-bottom:10px;">{{ __('portal.tracking.approval_needed_body') }}</p>
|
||||
@foreach ($pendingWorks as $w)
|
||||
<div class="approval-line">
|
||||
<div class="approval-line-title">{{ $w->name }}</div>
|
||||
<div class="approval-line-amount">{{ rtrim(rtrim(number_format($w->hours, 2), '0'), '.') }} ore · {{ number_format($w->total, 0, '.', ' ') }} MDL</div>
|
||||
<div class="approval-line-amount">{{ rtrim(rtrim(number_format($w->hours, 2), '0'), '.') }} {{ __('portal.tracking.hours') }} · {{ number_format($w->total, 0, '.', ' ') }} {{ __('portal.common.currency_mdl') }}</div>
|
||||
<div class="approval-line-actions">
|
||||
<form method="POST" action="{{ route('tracking.approve', ['token' => $wo->tracking_token, 'kind' => 'work', 'lineToken' => $w->approval_token]) }}" style="flex:1;display:flex;gap:8px;">
|
||||
@csrf
|
||||
<button type="submit" name="decision" value="approve" class="btn-approve">✅ Aprob</button>
|
||||
<button type="submit" name="decision" value="decline" class="btn-decline">❌ Nu aprob</button>
|
||||
<button type="submit" name="decision" value="approve" class="btn-approve">{{ __('portal.tracking.approve') }}</button>
|
||||
<button type="submit" name="decision" value="decline" class="btn-decline">{{ __('portal.tracking.decline') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -130,12 +130,12 @@
|
||||
@foreach ($pendingParts as $p)
|
||||
<div class="approval-line">
|
||||
<div class="approval-line-title">{{ $p->name }} @if ($p->article) <span style="font-family:monospace;color:#6b7280;font-weight:400;">· {{ $p->article }}</span>@endif</div>
|
||||
<div class="approval-line-amount">{{ rtrim(rtrim(number_format($p->qty, 2), '0'), '.') }} {{ $p->unit ?? 'buc' }} · {{ number_format($p->total, 0, '.', ' ') }} MDL</div>
|
||||
<div class="approval-line-amount">{{ rtrim(rtrim(number_format($p->qty, 2), '0'), '.') }} {{ $p->unit ?? __('portal.tracking.unit_pcs') }} · {{ number_format($p->total, 0, '.', ' ') }} {{ __('portal.common.currency_mdl') }}</div>
|
||||
<div class="approval-line-actions">
|
||||
<form method="POST" action="{{ route('tracking.approve', ['token' => $wo->tracking_token, 'kind' => 'part', 'lineToken' => $p->approval_token]) }}" style="flex:1;display:flex;gap:8px;">
|
||||
@csrf
|
||||
<button type="submit" name="decision" value="approve" class="btn-approve">✅ Aprob</button>
|
||||
<button type="submit" name="decision" value="decline" class="btn-decline">❌ Nu aprob</button>
|
||||
<button type="submit" name="decision" value="approve" class="btn-approve">{{ __('portal.tracking.approve') }}</button>
|
||||
<button type="submit" name="decision" value="decline" class="btn-decline">{{ __('portal.tracking.decline') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,32 +147,32 @@
|
||||
<span class="status-badge">{{ $statuses[$wo->status] ?? $wo->status }}</span>
|
||||
@if ($wo->eta_at && in_array($wo->status, ['in_work', 'awaiting_parts', 'approved', 'diagnosis'], true))
|
||||
<p style="margin-top:10px;color:#6b7280;font-size:14px;">
|
||||
Gata estimat: <strong style="color:#111827">{{ $wo->eta_at->isoFormat('D MMM YYYY, HH:mm') }}</strong>
|
||||
{{ __('portal.tracking.ready_estimated') }} <strong style="color:#111827">{{ $wo->eta_at->isoFormat('D MMM YYYY, HH:mm') }}</strong>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Detalii</h2>
|
||||
<h2>{{ __('portal.tracking.details') }}</h2>
|
||||
@if ($wo->vehicle)
|
||||
<div class="row">
|
||||
<span class="k">Auto</span>
|
||||
<span class="k">{{ __('portal.tracking.auto') }}</span>
|
||||
<span class="v">{{ trim($wo->vehicle->make . ' ' . $wo->vehicle->model) }}
|
||||
@if ($wo->vehicle->plate) · {{ $wo->vehicle->plate }} @endif
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
@if ($wo->mileage_in)
|
||||
<div class="row"><span class="k">Kilometraj</span><span class="v">{{ number_format($wo->mileage_in, 0, '.', ' ') }} km</span></div>
|
||||
<div class="row"><span class="k">{{ __('portal.tracking.mileage') }}</span><span class="v">{{ number_format($wo->mileage_in, 0, '.', ' ') }} km</span></div>
|
||||
@endif
|
||||
<div class="row"><span class="k">Deschis</span><span class="v">{{ $wo->opened_at?->isoFormat('D MMM YYYY') }}</span></div>
|
||||
<div class="row"><span class="k">{{ __('portal.tracking.opened') }}</span><span class="v">{{ $wo->opened_at?->isoFormat('D MMM YYYY') }}</span></div>
|
||||
@if ($wo->master)
|
||||
<div class="row"><span class="k">Maistru</span><span class="v">{{ $wo->master->name }}</span></div>
|
||||
<div class="row"><span class="k">{{ __('portal.tracking.master') }}</span><span class="v">{{ $wo->master->name }}</span></div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Etape</h2>
|
||||
<h2>{{ __('portal.tracking.stages') }}</h2>
|
||||
<ul class="timeline">
|
||||
@foreach ($flow as $i => $st)
|
||||
@php
|
||||
@@ -187,21 +187,21 @@
|
||||
|
||||
@if ($wo->complaint)
|
||||
<div class="card">
|
||||
<h2>Ce ne-ai cerut</h2>
|
||||
<h2>{{ __('portal.tracking.what_asked') }}</h2>
|
||||
<p style="font-size:14px;white-space:pre-wrap;">{{ $wo->complaint }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($wo->recommendations)
|
||||
<div class="card">
|
||||
<h2>Recomandări</h2>
|
||||
<h2>{{ __('portal.tracking.recommendations') }}</h2>
|
||||
<div class="note" style="white-space:pre-wrap;">{{ $wo->recommendations }}</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($photos->count())
|
||||
<div class="card">
|
||||
<h2>Fotografii</h2>
|
||||
<h2>{{ __('portal.tracking.photos') }}</h2>
|
||||
<div class="photos">
|
||||
@foreach ($photos as $p)
|
||||
<a href="{{ $p->getUrl() }}" target="_blank" rel="noopener">
|
||||
@@ -215,14 +215,14 @@
|
||||
@if ((float) $wo->total > 0)
|
||||
<div class="card">
|
||||
<div class="totals">
|
||||
<span class="lbl">Total</span>
|
||||
<span class="lbl">{{ __('portal.common.total') }}</span>
|
||||
<span class="amt">{{ number_format((float) $wo->total, 2, '.', ' ') }} {{ $tenant->settings['currency'] ?? 'MDL' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<footer>
|
||||
Powered by AutoCRM
|
||||
{{ __('portal.common.powered_by') }}
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user