|
|
@@ -0,0 +1,64 @@
|
|
|
+@extends('layouts.app', ['title' => 'Профиль', 'experience' => $user->experience])
|
|
|
+
|
|
|
+@section('content')
|
|
|
+ <div class="px-3 col-xxl-8 offset-xxl-1">
|
|
|
+ <form action="{{ route('profile.store') }}" method="post">
|
|
|
+ @csrf
|
|
|
+
|
|
|
+ @include('partials.input', ['name' => 'email', 'title' => 'E-mail', 'disabled' => true, 'value' => $user->email])
|
|
|
+ @include('partials.input', ['name' => 'name', 'title' => 'Имя', 'required' => true, 'value' => $user->name])
|
|
|
+ @include('partials.input', ['name' => 'surname', 'title' => 'Фамилия', 'value' => $user->surname])
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @include('partials.avatars', ['user' => auth()->user()])
|
|
|
+
|
|
|
+ @include('partials.color', ['name' => 'bg_color', 'title' => 'Фон', 'value' => $user->bg_color ?? '#55def7'])
|
|
|
+
|
|
|
+ @if(auth()->user()->experience > $max_subscribe_experience)
|
|
|
+ <div class="visually-hidden">
|
|
|
+ @include('partials.input', ['name' => 'e_mail', 'title' => 'E-mail', 'value' => $user->email])
|
|
|
+ </div>
|
|
|
+
|
|
|
+ @include('partials.input', ['name' => 'subscribe', 'title' => 'Подпись', 'value' => $user->subscribe ?? '', 'datalist' => $subscribes->pluck('caption')])
|
|
|
+ @else
|
|
|
+ @include('partials.select', ['name' => 'subscribe', 'title' => 'Подпись', 'options' => $subscribes->pluck('caption', 'caption')->toArray(), 'value' => $user->subscribe ?? ''])
|
|
|
+ @endif
|
|
|
+
|
|
|
+ @include('partials.input', ['name' => 'role', 'title' => 'Роли', 'disabled' => true, 'value' => implode(', ', $user->roles->pluck('title')->toArray())])
|
|
|
+ <div class="my-2">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-md-4 text-md-end mt-1 fw-bold pe-3">Уведомления</div>
|
|
|
+ <div class="col-md-8 mt-1 fst-italic">Выберите типы уведомлений, которые будем присылать вам на E-mail</div>
|
|
|
+ </div>
|
|
|
+ @foreach($notification_types as $type_id => $t)
|
|
|
+ @include('partials.checkbox', ['name' => 'types[]', 'title' => $t, 'value' => $type_id, 'checked' => in_array($type_id, auth()->user()->notification_types->pluck('id')->toArray())])
|
|
|
+ @endforeach
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row pwd-change-link mb-3">
|
|
|
+ <div class="offset-md-4">
|
|
|
+ <a onclick="$('.pwg-change').removeClass('d-none'); $('.pwd-change-link').addClass('d-none');" class="text-info" href="#">Сменить пароль</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="pwg-change d-none">
|
|
|
+ @include('partials.input', ['name' => 'current_password', 'type' => 'password', 'title' => 'Текущий пароль'])
|
|
|
+ @include('partials.input', ['name' => 'password', 'type' => 'password', 'title' => 'Новый пароль'])
|
|
|
+ @include('partials.input', ['name' => 'password_confirmation', 'type' => 'password', 'title' => 'Подтверждение пароля'])
|
|
|
+ </div>
|
|
|
+ @include('partials.submit', [''])
|
|
|
+ <a href="#" class="btn btn-outline-info my-3 d-inline-block d-md-none" onclick="$('#logout').submit();">Выход</a>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+@endsection
|
|
|
+
|
|
|
+@push('scripts')
|
|
|
+ <script type="module">
|
|
|
+ $('#subscribe').on('keyup', function (){
|
|
|
+ if($(this).val() === '') {
|
|
|
+ $('#dl-subscribe').attr('open', 'open');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+@endpush
|