Fix total readOnly, label pay_status/discount, add RU/EN translations

- pay_status: add label Statut plată (was showing English auto-label)
- discount_pct: rename label to Reducere % (standard RO terminology)
- total: disabled() → readOnly() so field looks active (not grayed out)
  while still preventing manual editing; $set() from discount live works
- Add ru/en translations: Statut plată, Reducere %

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-08 07:43:51 +00:00
parent 116495ce0b
commit 1215bc8be2
3 changed files with 7 additions and 3 deletions
@@ -148,9 +148,9 @@ class WorkOrderResource extends Resource
Schemas\Components\Section::make(__('Plată & total')) Schemas\Components\Section::make(__('Plată & total'))
->columns(3)->collapsible()->collapsed()->compact() ->columns(3)->collapsible()->collapsed()->compact()
->schema([ ->schema([
Forms\Components\Select::make('pay_status')->options(\App\Support\I18n::opts(WorkOrder::PAY_STATUSES))->default('unpaid')->required(), Forms\Components\Select::make('pay_status')->label(__('Statut plată'))->options(\App\Support\I18n::opts(WorkOrder::PAY_STATUSES))->default('unpaid')->required(),
Forms\Components\TextInput::make('discount_pct') Forms\Components\TextInput::make('discount_pct')
->label(__('Discount %')) ->label(__('Reducere %'))
->numeric() ->numeric()
->default(0) ->default(0)
->live(onBlur: true) ->live(onBlur: true)
@@ -173,7 +173,7 @@ class WorkOrderResource extends Resource
->placeholder(__('Ex: 25')) ->placeholder(__('Ex: 25'))
->helperText(__('Doar pentru cazuri speciale. Lasă gol → folosește marja mecanicului.')) ->helperText(__('Doar pentru cazuri speciale. Lasă gol → folosește marja mecanicului.'))
->visible(fn () => auth()->user()?->canDo(\App\Auth\Permissions::FINANCE_VIEW_INTERNAL_MARGIN) ?? false), ->visible(fn () => auth()->user()?->canDo(\App\Auth\Permissions::FINANCE_VIEW_INTERNAL_MARGIN) ?? false),
Forms\Components\TextInput::make('total')->label(__('Total'))->numeric()->disabled()->dehydrated(false), Forms\Components\TextInput::make('total')->label(__('Total'))->numeric()->readOnly()->dehydrated(false),
Forms\Components\Toggle::make('approved')->label(__('Aprobat de client')), Forms\Components\Toggle::make('approved')->label(__('Aprobat de client')),
Forms\Components\DatePicker::make('closed_at')->label(__('Închis')), Forms\Components\DatePicker::make('closed_at')->label(__('Închis')),
]), ]),
+2
View File
@@ -1763,6 +1763,7 @@
"Responsabil": "Assignee", "Responsabil": "Assignee",
"Rest de achitat:": "Balance due:", "Rest de achitat:": "Balance due:",
"Rest de plată": "Balance due", "Rest de plată": "Balance due",
"Reducere %": "Discount %",
"Restanță": "Debt", "Restanță": "Debt",
"Restaurează": "Restore", "Restaurează": "Restore",
"Restituire": "Restituire", "Restituire": "Restituire",
@@ -1936,6 +1937,7 @@
"Spune-i sistemului ce reprezintă fiecare coloană din fișier. Vom salva configurația pentru imporțările viitoare.": "Tell the system what each column represents. We save the mapping for future imports.", "Spune-i sistemului ce reprezintă fiecare coloană din fișier. Vom salva configurația pentru imporțările viitoare.": "Tell the system what each column represents. We save the mapping for future imports.",
"Standard": "Standard", "Standard": "Standard",
"Stare": "Condition", "Stare": "Condition",
"Statut plată": "Payment status",
"Stare timp": "Time state", "Stare timp": "Time state",
"Stare zi": "Day status", "Stare zi": "Day status",
"Start": "Start", "Start": "Start",
+2
View File
@@ -1763,6 +1763,7 @@
"Responsabil": "Ответственный", "Responsabil": "Ответственный",
"Rest de achitat:": "Остаток к оплате:", "Rest de achitat:": "Остаток к оплате:",
"Rest de plată": "К оплате", "Rest de plată": "К оплате",
"Reducere %": "Скидка %",
"Restanță": "Задолженность", "Restanță": "Задолженность",
"Restaurează": "Восстановить", "Restaurează": "Восстановить",
"Restituire": "Restituire", "Restituire": "Restituire",
@@ -1936,6 +1937,7 @@
"Spune-i sistemului ce reprezintă fiecare coloană din fișier. Vom salva configurația pentru imporțările viitoare.": "Укажите системе, что означает каждая колонка. Мы сохраним настройку для будущих импортов.", "Spune-i sistemului ce reprezintă fiecare coloană din fișier. Vom salva configurația pentru imporțările viitoare.": "Укажите системе, что означает каждая колонка. Мы сохраним настройку для будущих импортов.",
"Standard": "Стандартно", "Standard": "Стандартно",
"Stare": "Состояние", "Stare": "Состояние",
"Statut plată": "Статус оплаты",
"Stare timp": "Время", "Stare timp": "Время",
"Stare zi": "Состояние дня", "Stare zi": "Состояние дня",
"Start": "Начало", "Start": "Начало",