@extends('layouts.app') @section('content')
@csrf @if($user) @endif
@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', 'title' => 'Роль', 'options' => getRoles(), 'value' => $user->role ?? \App\Models\Role::MANAGER]) @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'] ?? []], ], ])
@if($user && !is_null($user->deleted_at))
ПОЛЬЗОВАТЕЛЬ УДАЛЁН!!!
Восстановить
@else @include('partials.submit', ['delete' => ['form_id' => 'delete-user']]) @if($user && auth()->id() !== $user->id) @endif @endif
@if($user)
@csrf
@method('DELETE') @csrf
@csrf
@endif
@endsection @push('scripts') @endpush