57bdc1b594
Two fixes:
== 1. Language switcher (RO/RU/EN) in portal headers ==
New partial resources/views/partials/lang-switcher.blade.php with two
visual styles:
- style='chip' (default) — white-tinted glass for colored headers
(shop nav bar, tracking page hero)
- style='light' — outlined buttons for pale backgrounds (invitation
accept card)
Each button is a POST form to the existing /locale/{lang} route which:
- puts locale in session
- persists to user.locale if authenticated
- redirects back to the same page
Included in:
- resources/views/shop/layout.blade.php (right side of top nav,
after login/register)
- resources/views/tracking/show.blade.php (top-right of hero header,
absolutely positioned)
- resources/views/invitations/accept.blade.php (top-right of card,
above welcome heading, light style)
Current locale button is highlighted (opaque white on colored bg /
blue on pale bg). Others are muted until hovered.
Two new translation keys:
- portal.common.language (RO: Limbă / RU: Язык)
== 2. apply_margin toggle back in "Plată & total" ==
Previous session's edit didn't persist to the file. Now confirmed in
place: WorkOrderResource form's "Plată & total" section shows a
"Aplică marjă internă" toggle between discount_pct and
override_margin_pct. Gated by FINANCE_VIEW_INTERNAL_MARGIN so only
owner / admin / manager / accountant see it. Default = true.
When toggled off on a Fișă, WorkOrderWork::saving hook writes
salary_base = total for every line on that WO (no reduction).
Backend logic already in place — this commit fixes the missing UI
control.
Suite: 303 passed (840 assertions). Unchanged — refactor + view only.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
157 lines
5.9 KiB
PHP
157 lines
5.9 KiB
PHP
<?php
|
|
|
|
return [
|
|
// ─── Common ───
|
|
'common' => [
|
|
'email' => 'Email',
|
|
'phone' => 'Telefon',
|
|
'name' => 'Nume',
|
|
'password' => 'Parolă',
|
|
'save' => 'Salvează',
|
|
'cancel' => 'Anulează',
|
|
'back' => 'Înapoi',
|
|
'search' => 'Caută',
|
|
'total' => 'Total',
|
|
'yes' => 'Da',
|
|
'no' => 'Nu',
|
|
'required' => '*',
|
|
'currency_mdl' => 'MDL',
|
|
'powered_by' => 'Powered by AutoCRM',
|
|
'language' => 'Limbă',
|
|
],
|
|
|
|
// ─── Invitation flow ───
|
|
'invitation' => [
|
|
'title_accept' => 'Acceptă invitația',
|
|
'welcome_name' => 'Bine ai venit, :name!',
|
|
'welcome_body' => 'Ai fost invitat să accesezi :company. Setează o parolă pentru a-ți activa contul.',
|
|
'new_password' => 'Parolă nouă',
|
|
'confirm_password' => 'Confirmă parola',
|
|
'activate_account' => 'Activează contul',
|
|
'expired_title' => 'Invitație expirată',
|
|
'expired_body' => 'Linkul de invitație a expirat (durata maximă: 7 zile). Roagă administratorul să retrimită invitația.',
|
|
'invalid_title' => 'Invitație invalidă',
|
|
'invalid_body' => 'Linkul nu mai este valabil sau a fost deja folosit.',
|
|
],
|
|
|
|
// ─── WO tracking (public) ───
|
|
'tracking' => [
|
|
'title_fisa' => 'Fișa #:number',
|
|
'ready_estimated' => 'Gata estimat:',
|
|
'details' => 'Detalii',
|
|
'auto' => 'Auto',
|
|
'mileage' => 'Kilometraj',
|
|
'opened' => 'Deschis',
|
|
'master' => 'Maistru',
|
|
'stages' => 'Etape',
|
|
'what_asked' => 'Ce ne-ai cerut',
|
|
'recommendations' => 'Recomandări',
|
|
'photos' => 'Fotografii',
|
|
'approval_needed_title' => '⚠ Necesită aprobarea ta',
|
|
'approval_needed_body' => 'Am descoperit lucrări suplimentare. Te rugăm să decizi mai jos.',
|
|
'hours' => 'ore',
|
|
'approve' => '✅ Aprob',
|
|
'decline' => '❌ Nu aprob',
|
|
'unit_pcs' => 'buc',
|
|
],
|
|
|
|
// ─── Shop navigation & layout ───
|
|
'shop' => [
|
|
'catalog' => 'Catalog',
|
|
'search_by_vin' => 'Caută după VIN',
|
|
'cart' => '🛒 Coș',
|
|
'login' => 'Login',
|
|
'register' => 'Înregistrare',
|
|
'logout' => 'Ieșire',
|
|
|
|
// Catalog
|
|
'catalog_title' => 'Catalog piese',
|
|
'search_placeholder' => 'Caută denumire, cod, brand, cod cross…',
|
|
'all_categories' => 'Toate categoriile',
|
|
'in_stock_only' => 'Doar în stoc',
|
|
'no_parts_found' => 'Nicio piesă găsită',
|
|
'no_parts_found_for' => 'Nicio piesă găsită pentru „:term"',
|
|
'in_stock' => '● În stoc',
|
|
'on_order' => '○ La comandă',
|
|
'add_to_cart' => 'Adaugă în coș',
|
|
|
|
// Cart
|
|
'cart_title' => 'Coșul meu',
|
|
'cart_empty' => 'Coșul e gol.',
|
|
'view_catalog' => 'Vezi catalogul',
|
|
'part' => 'Piesă',
|
|
'price' => 'Preț',
|
|
'qty' => 'Cant.',
|
|
'update_cart' => 'Actualizează coșul',
|
|
'subtotal' => 'Subtotal:',
|
|
'checkout_arrow' => 'Finalizează comanda →',
|
|
|
|
// Checkout
|
|
'checkout_title' => 'Finalizează comanda',
|
|
'full_name' => 'Nume complet *',
|
|
'phone_req' => 'Telefon *',
|
|
'delivery_req' => 'Livrare *',
|
|
'address_delivery' => 'Adresă (pentru curier/poștă)',
|
|
'notes' => 'Observații',
|
|
'place_order' => 'Plasează comanda',
|
|
'summary' => 'Sumar',
|
|
'delivery_fee_note' => 'Taxa de livrare se calculează în funcție de metoda aleasă.',
|
|
|
|
// Order status
|
|
'order_number' => 'Comanda',
|
|
'status' => 'Status',
|
|
'products' => 'Produse',
|
|
'delivery' => 'Livrare',
|
|
'delivery_data' => 'Date livrare',
|
|
'continue_shopping' => '← Continuă cumpărăturile',
|
|
|
|
// Part detail
|
|
'back_to_catalog' => '← Înapoi la catalog',
|
|
'brand_label' => 'Brand:',
|
|
'code_label' => 'Cod:',
|
|
'in_stock_qty' => '● În stoc (:qty :unit)',
|
|
'cross_refs_title' => 'Coduri echivalente (cross)',
|
|
'description' => 'Descriere',
|
|
|
|
// VIN
|
|
'vin_title' => 'Caută piese după VIN',
|
|
'vin_intro' => 'Introdu codul VIN (17 caractere) ca să identificăm mașina. Apoi caută piesele în catalog.',
|
|
'vin_decode' => 'Decodează',
|
|
'vin_invalid' => 'VIN invalid — trebuie 17 caractere.',
|
|
'vin_identified' => 'Mașină identificată',
|
|
'vin_manufacturer' => 'Producător',
|
|
'vin_year' => 'An model',
|
|
'vin_country' => 'Țară',
|
|
'vin_region' => 'Regiune',
|
|
'vin_search_parts' => 'Caută piese pentru :maker →',
|
|
'vin_contact_note' => 'Pentru compatibilitate exactă pe model/motorizare, contactează service-ul cu acest VIN.',
|
|
'this_car' => 'această mașină',
|
|
|
|
// Account
|
|
'my_account' => 'Contul meu',
|
|
'hello_name' => 'Salut, :name!',
|
|
'contact_data' => 'Date contact',
|
|
'my_orders' => 'Comenzile mele (:count)',
|
|
'no_orders_yet' => 'Nu ai nicio comandă încă.',
|
|
'order_nr' => 'Nr.',
|
|
'order_date' => 'Data',
|
|
'order_items' => 'Articole',
|
|
'order_details_arrow' => 'Detalii →',
|
|
|
|
// Auth
|
|
'signin_title' => 'Intră în cont',
|
|
'signin_button' => 'Intră',
|
|
'forgot_password' => 'Am uitat parola',
|
|
'no_account' => 'Nu ai cont?',
|
|
'register_title' => 'Înregistrare cont',
|
|
'register_button' => 'Creează cont',
|
|
'have_account' => 'Ai deja cont?',
|
|
'forgot_title' => 'Am uitat parola',
|
|
'forgot_intro' => 'Introdu emailul cu care te-ai înregistrat — îți trimitem un link de resetare.',
|
|
'send_reset_link' => 'Trimite link resetare',
|
|
'back_to_login' => '← Înapoi la login',
|
|
'reset_title' => 'Setează o parolă nouă',
|
|
'reset_button' => 'Setează parola',
|
|
],
|
|
];
|