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();
?>
<div class="row">
<div class="col-12 col-sm-3">
<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-8 col-md-3 my-5 my-md-0 h-100">
@include('platform.user_profile::user',['name'=>$user->name, 'about'=>$user->about])
</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">
<ul class="nav nav-tabs" id="applicationsTab" role="tablist">
<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 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>
</ul>
<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-body">
@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">
<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 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>
<p class="text-muted mb-0" >{{$about}}</p>
<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>
<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 class="form-group mb-2">
<div class="form-group mb-2 text-center">
<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>
</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">
<p class="top-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 {
margin: 57px 50px 50px;
padding: 20px;
margin: 107px 50px 50px;
}
//.menu-open{
@ -264,8 +263,6 @@ body {
}
.main-page {
padding: 20px;
.main-page-header {
.top-title {
margin: 0;

View File

@ -69,7 +69,6 @@ iframe {
img {
width: 100%;
height: 240px;
object-fit: contain;
}
@ -261,9 +260,8 @@ iframe {
.card-body {
.profile-content {
.profile-img {
width: 80%;
height: 80%;
padding: 50px 50px 20px;
width: 60%;
height: 60%;
img {
border-radius: 50%;
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

@ -2,7 +2,7 @@
$nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
?>
<!doctype html>
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
@ -138,23 +138,13 @@ $nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown">
@if(config('platform.user_profile.enabled'))
<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>
</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>
</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>
@endif
@ -192,5 +182,31 @@ $nav = \A7kz\Platform\Modules\Platform\Navigation\Facades\Nav::config();
</body>
<script>
$.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>
</html>