diff --git a/app/Filament/Tenant/Resources/WorkOrderResource.php b/app/Filament/Tenant/Resources/WorkOrderResource.php index 36faa46..8941e8e 100644 --- a/app/Filament/Tenant/Resources/WorkOrderResource.php +++ b/app/Filament/Tenant/Resources/WorkOrderResource.php @@ -114,6 +114,11 @@ class WorkOrderResource extends Resource ->schema([ Forms\Components\Select::make('pay_status')->options(WorkOrder::PAY_STATUSES)->default('unpaid')->required(), Forms\Components\TextInput::make('discount_pct')->label('Discount %')->numeric()->default(0), + Forms\Components\Toggle::make('apply_margin') + ->label('Aplică marjă internă') + ->default(true) + ->helperText('On = din prețul manoperelor se scade marja pentru salariu. Off = manopere la cost (salariu pe Total integral).') + ->visible(fn () => auth()->user()?->canDo(\App\Auth\Permissions::FINANCE_VIEW_INTERNAL_MARGIN) ?? false), Forms\Components\TextInput::make('override_margin_pct')->label('Marjă internă (%) — override') ->numeric()->step(0.01)->minValue(0)->maxValue(90) ->placeholder('Ex: 25') diff --git a/lang/ro/portal.php b/lang/ro/portal.php index 98d2f95..85478ef 100644 --- a/lang/ro/portal.php +++ b/lang/ro/portal.php @@ -17,6 +17,7 @@ return [ 'required' => '*', 'currency_mdl' => 'MDL', 'powered_by' => 'Powered by AutoCRM', + 'language' => 'Limbă', ], // ─── Invitation flow ─── diff --git a/lang/ru/portal.php b/lang/ru/portal.php index 4269099..b4cc6e9 100644 --- a/lang/ru/portal.php +++ b/lang/ru/portal.php @@ -17,6 +17,7 @@ return [ 'required' => '*', 'currency_mdl' => 'MDL', 'powered_by' => 'Работает на AutoCRM', + 'language' => 'Язык', ], // ─── Приглашение ─── diff --git a/resources/views/invitations/accept.blade.php b/resources/views/invitations/accept.blade.php index 3674e6c..339ac66 100644 --- a/resources/views/invitations/accept.blade.php +++ b/resources/views/invitations/accept.blade.php @@ -21,6 +21,9 @@ input:focus { border-color: #3b82f6; }
{!! __('portal.invitation.welcome_body', ['company' => '' . e($company) . '']) !!}
diff --git a/resources/views/partials/lang-switcher.blade.php b/resources/views/partials/lang-switcher.blade.php new file mode 100644 index 0000000..8b7880c --- /dev/null +++ b/resources/views/partials/lang-switcher.blade.php @@ -0,0 +1,45 @@ +@php + $locales = [ + 'ro' => ['label' => 'RO', 'full' => 'Română', 'flag' => '🇷🇴'], + 'ru' => ['label' => 'RU', 'full' => 'Русский', 'flag' => '🇷🇺'], + 'en' => ['label' => 'EN', 'full' => 'English', 'flag' => '🇬🇧'], + ]; + $current = app()->getLocale(); + // Default: dark-glass style suits colored header (shop, tracking). Override via $style param. + $style = $style ?? 'chip'; +@endphp + +@if ($style === 'chip') +