Merge pull request 'nim_style 9' (#12) from nim_style into master

Reviewed-on: #12
master
nimtaurel 2025-04-29 09:01:23 +00:00
commit f32b389fa3
8 changed files with 133 additions and 101 deletions

View File

@ -17,18 +17,22 @@ $pendingApplications = UniModel::model('pipi_applications', Acl::connection())
->get(); ->get();
?> ?>
<div class="row"> <div class="row d-flex flex-md-row flex-sm-column justify-content-center align-items-md-stretch align-items-sm-center" style="height: calc(100vh - 197px)">
<div class="col-12 col-sm-3"> <div class="col-8 col-md-3 my-5 my-md-0 h-100">
@include('platform.user_profile::user',['name'=>$user->name, 'about'=>$user->about]) @include('platform.user_profile::user',['name'=>$user->name, 'about'=>$user->about])
</div> </div>
<div class="card col-12 col-sm-8 ms-sm-5 applications-history"> <div class="card col-12 col-md-8 ms-md-3 ms-lg-5 applications-history">
<div class="card-body"> <div class="card-body">
<ul class="nav nav-tabs" id="applicationsTab" role="tablist"> <ul class="nav nav-tabs" id="applicationsTab" role="tablist">
<li class="nav-item me-4" role="presentation"> <li class="nav-item me-4" role="presentation">
<a class="nav-link active" id="applications-tab" data-bs-toggle="tab" href="#applications" role="tab" aria-controls="applications" aria-selected="true">@lang('История заказов')</a> <a class="nav-link active" id="applications-tab" data-bs-toggle="tab" href="#applications" role="tab" aria-controls="applications" aria-selected="true">
@lang('История заказов')
</a>
</li> </li>
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<a class="nav-link" id="reserves-tab" data-bs-toggle="tab" href="#reserves" role="tab" aria-controls="reserves" aria-selected="false">@lang('Бронирования')</a> <a class="nav-link" id="reserves-tab" data-bs-toggle="tab" href="#reserves" role="tab" aria-controls="reserves" aria-selected="false">
@lang('Бронирования')
</a>
</li> </li>
</ul> </ul>
<div class="tab-content" id="applicationsTabContent"> <div class="tab-content" id="applicationsTabContent">

View File

@ -1,4 +1,4 @@
<div class="row"> <div class="row h-100">
<div class="card profile-info"> <div class="card profile-info">
<div class="card-body"> <div class="card-body">
@php($profile_image = auth()->user()->profile_image) @php($profile_image = auth()->user()->profile_image)
@ -6,15 +6,15 @@
<div class="profile-img d-flex justify-content-center align-items-center mb-3"> <div class="profile-img d-flex justify-content-center align-items-center mb-3">
<img src="@if($profile_image == null) {{asset("img/avatar.png") }} @else {{ asset("storage/$profile_image") }} @endif" id="image_preview_container" alt="profile_image"> <img src="@if($profile_image == null) {{asset("img/avatar.png") }} @else {{ asset("storage/$profile_image") }} @endif" id="image_preview_container" alt="profile_image">
</div> </div>
<div class="d-flex flex-column justify-content-center align-items-center"> <div class="d-flex flex-column justify-content-center align-items-center text-center">
<h5 class="mb-0">{{$name}}</h5> <h5 class="mb-0">{{$name}}</h5>
<p class="text-muted mb-0" >{{$about}}</p> <p class="text-muted mb-0" >{{$about}}</p>
<hr style="height: 1px; color:#a8a8a8; width: 100%"> <hr style="height: 1px; color:#a8a8a8; width: 100%">
<div class="form-group mb-2"> <div class="form-group mb-2 text-center">
<label>@lang("Электронная почта")</label> <label>@lang("Электронная почта")</label>
<p class="text-muted m-0">{{$user->email}} @if(is_null($user->email_verified_at)) <a href="#" class="btn btn-outline-primary">@lang("Подтвердить")</a> @endif</p> <p class="text-muted m-0">{{$user->email}} @if(is_null($user->email_verified_at)) <a href="#" class="btn btn-outline-primary">@lang("Подтвердить")</a> @endif</p>
</div> </div>
<div class="form-group mb-2"> <div class="form-group mb-2 text-center">
<label>@lang("Телефон")</label> <label>@lang("Телефон")</label>
<p class="text-muted m-0">{{$user->phone}} @if(is_null($user->phone_verified_at)) <a href="#" class="btn btn-outline-primary">@lang("Подтвердить")</a> @endif</p> <p class="text-muted m-0">{{$user->phone}} @if(is_null($user->phone_verified_at)) <a href="#" class="btn btn-outline-primary">@lang("Подтвердить")</a> @endif</p>
</div> </div>

View File

@ -1,4 +1,4 @@
<div class="container text-center my-3 main-page"> <div class="container text-center main-page">
<div class="main-page-header"> <div class="main-page-header">
<p class="top-title">Доступные автомобили</p> <p class="top-title">Доступные автомобили</p>
<p class="title">Выберите лучший автомобиль</p> <p class="title">Выберите лучший автомобиль</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -35,8 +35,7 @@ body {
} }
.main-container { .main-container {
margin: 57px 50px 50px; margin: 107px 50px 50px;
padding: 20px;
} }
//.menu-open{ //.menu-open{
@ -264,8 +263,6 @@ body {
} }
.main-page { .main-page {
padding: 20px;
.main-page-header { .main-page-header {
.top-title { .top-title {
margin: 0; margin: 0;

View File

@ -69,7 +69,6 @@ iframe {
img { img {
width: 100%; width: 100%;
height: 240px;
object-fit: contain; object-fit: contain;
} }
@ -261,9 +260,8 @@ iframe {
.card-body { .card-body {
.profile-content { .profile-content {
.profile-img { .profile-img {
width: 80%; width: 60%;
height: 80%; height: 60%;
padding: 50px 50px 20px;
img { img {
border-radius: 50%; border-radius: 50%;
padding: 10px; padding: 10px;
@ -393,3 +391,20 @@ iframe {
} }
} }
@media (min-width: 768px) and (max-width: 1024px) {
.profile-info {
.card-body {
.profile-content {
.profile-img {
width: 80%;
height: 80%;
}
.btn {
font-size: 11px;
}
}
}
}
}

View File

@ -138,23 +138,13 @@ $nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown"> <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown">
@if(config('platform.user_profile.enabled')) @if(config('platform.user_profile.enabled'))
<li> <li>
<a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}"> <a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}#applications">
Личный кабинет @lang('История заказов')
</a> </a>
</li> </li>
<li> <li>
<a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}"> <a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}#reserves">
Заявки @lang('Бронирования')
</a>
</li>
<li>
<a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}">
Бронирования
</a>
</li>
<li>
<a class="dropdown-item" href="{{ \A7kz\Platform\Modules\Platform\Core\Facades\Core::url('user.profile') }}">
История заказов
</a> </a>
</li> </li>
@endif @endif
@ -192,5 +182,31 @@ $nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
</body> </body>
<script> <script>
$.ajaxSetup({headers: {'X-CSRF-TOKEN': '{{csrf_token()}}'}}); $.ajaxSetup({headers: {'X-CSRF-TOKEN': '{{csrf_token()}}'}});
function activateTabFromHash() {
const hash = window.location.hash;
if (hash === "#reserves") {
const tabTrigger = document.querySelector('#reserves-tab');
if (tabTrigger) {
new bootstrap.Tab(tabTrigger).show();
document.getElementById('applicationsTab').scrollIntoView({ behavior: 'smooth' });
}
} else if (hash === "#applications") {
const tabTrigger = document.querySelector('#applications-tab');
if (tabTrigger) {
new bootstrap.Tab(tabTrigger).show();
document.getElementById('applicationsTab').scrollIntoView({ behavior: 'smooth' });
}
}
}
document.addEventListener("DOMContentLoaded", function () {
activateTabFromHash();
});
window.addEventListener("hashchange", function () {
activateTabFromHash();
});
</script> </script>
</html> </html>