@include('partials.input', ['name' => 'email',
'type' => 'text',
'title' => 'Логин/email',
'required' => true,
'value' => $user->email ?? '',
'disabled' => ($user && $user->email_verified_at),
])
@include('partials.input', ['name' => 'notification_email',
'type' => 'email',
'title' => 'Email для уведомлений',
'value' => old('notification_email', $user->notification_email ?? '')])
@include('partials.input', ['name' => 'name', 'title' => 'Имя', 'required' => true, 'value' => $user->name ?? ''])
@include('partials.input', ['name' => 'phone', 'title' => 'Телефон', 'value' => $user->phone ?? ''])
@include('partials.input', ['name' => 'password', 'type' => 'password', 'title' => 'Пароль'])
@include('partials.select', [
'name' => 'role_id',
'title' => 'Роль',
'options' => $roles ?? getRoleIdOptions(),
'value' => old('role_id', $user->role_id ?? null),
])
@include('partials.input', ['name' => 'color', 'title' => 'Цвет', 'value' => $user->color ?? '#FFFFFF', 'type' => 'color'])
@if($user)
@include('partials.input', ['name' => 'token_fcm', 'title' => 'FCM Token', 'value' => $user->token_fcm ?? '', 'disabled' => true])
@endif
@php($settings = $notificationSettings ?? [])
@include('partials.notification-settings-table', [
'channels' => $notificationChannels,
'disabledChannels' => $disabledChannels ?? [],
'sections' => [
['title' => 'Площадки', 'settingsKey' => 'orders', 'options' => $orderStatusOptions, 'colors' => $orderStatusColors, 'settings' => $settings['order_settings'] ?? []],
['title' => 'Рекламации', 'settingsKey' => 'reclamations', 'options' => $reclamationStatusOptions, 'colors' => $reclamationStatusColors, 'settings' => $settings['reclamation_settings'] ?? []],
['title' => 'График монтажей', 'settingsKey' => 'schedule', 'options' => $scheduleSourceOptions, 'colors' => [], 'settings' => $settings['schedule_settings'] ?? []],
['title' => 'Чат', 'settingsKey' => 'chat', 'options' => $chatSourceOptions, 'colors' => [], 'settings' => $settings['chat_settings'] ?? []],
],
])
@if(($user?->resolvedRoleSlug()) === \App\Models\Role::ADMIN)
Администратору всегда доступны все права. Пользовательские deny и снятие прав не применяются.
@else
Значение "По роли" оставляет право как в выбранной роли. Allow или deny здесь переопределяют роль только для этого пользователя.
@endif
@include('admin.roles.partials.permissions-table', [
'permissionGroups' => $permissionGroups ?? collect(),
'permissionEffects' => $permissionEffects ?? [],
'inputName' => 'permission_effects',
'adminLocked' => ($user?->resolvedRoleSlug()) === \App\Models\Role::ADMIN,
'inheritLabel' => 'По роли',
])
@if($user)