This commit is contained in:
2026-04-06 18:44:02 +05:00
commit d775fbb9ba
431 changed files with 31234 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
@extends('layouts.app')
@section('title', 'Настройки профиля')
@php $style = 'profile'; @endphp
@section('content')
<div class="container py-4">
@include('profile.partials.profile-sidebar', compact('user'))
<div class="col-md-9">
<div class="card border-0">
<div class="card-body p-4">
<h4 class="mb-4">Настройки профиля</h4>
@if(session('success'))
<div class="alert alert-success alert-dismissible fade show">
{{ session('success') }}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
@endif
<form action="{{ route('profile.update') }}" method="POST">
@csrf
@method('PUT')
<div class="mb-3">
<label class="form-label">Имя <span class="text-danger">*</span></label>
<input type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name', $user->name) }}">
@error('name')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Email <span class="text-danger">*</span></label>
<input type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email', $user->email) }}">
@error('email')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Телефон</label>
<input type="text" class="form-control @error('phone') is-invalid @enderror" name="phone" value="{{ old('phone', $user->phone) }}">
@error('phone')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<hr class="my-4">
<h5 class="mb-3">Смена пароля</h5>
<div class="mb-3">
<label class="form-label">Текущий пароль</label>
<input type="password" class="form-control @error('current_password') is-invalid @enderror" name="current_password">
@error('current_password')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Новый пароль</label>
<input type="password" class="form-control @error('password') is-invalid @enderror" name="password">
@error('password')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Подтверждение пароля</label>
<input type="password" class="form-control" name="password_confirmation">
</div>
<div class="mt-4">
<button type="submit" class="btn btn-dark-green px-4">Сохранить изменения</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,97 @@
@extends('layouts.app')
@section('title', 'Заказ ' . $order->order_number)
@php $style = 'profile'; @endphp
@section('content')
<div class="container py-4">
@include('profile.partials.profile-sidebar', compact('user'))
<div class="col-md-9">
<div class="card border-0">
<div class="card-body p-4">
<div class="d-flex justify-content-between align-items-center mb-4">
<h4 class="mb-0">Заказ #{{ $order->order_number }}</h4>
<a href="{{ route('profile.index') }}" class="btn btn-outline-secondary btn-sm">
Назад
</a>
</div>
<div class="row mb-4">
<div class="col-md-6">
<p><strong>Дата заказа:</strong> {{ $order->created_at->format('d.m.Y H:i') }}</p>
<p><strong>Способ доставки:</strong>
@switch($order->delivery_method)
@case('courier') Курьером @break
@case('pickup') Самовывоз @break
@case('express') Экспресс @break
@endswitch
</p>
<p><strong>Статус доставки:</strong>
<span class="badge bg-{{ $order->delivery_status_color }}">
{{ $order->delivery_status_name }}
</span>
</p>
</div>
<div class="col-md-6">
<p><strong>Способ оплаты:</strong>
@switch($order->payment_method)
@case('cash') Наличными при получении @break
@case('card') Картой при получении @break
@case('online') Онлайн-оплата @break
@endswitch
</p>
<p><strong>Статус оплаты:</strong>
<span class="badge bg-{{ $order->payment_status === 'paid' ? 'success' : 'warning' }}">
{{ $order->payment_status_name }}
</span>
</p>
@if($order->shipping_address)
<p><strong>Адрес доставки:</strong> {{ $order->shipping_address }}</p>
@endif
</div>
</div>
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-light">
<tr>
<th>Товар</th>
<th>Вариация</th>
<th>Кол-во</th>
<th>Цена</th>
<th>Сумма</th>
</tr>
</thead>
<tbody>
@foreach($order->items as $item)
<tr>
<td>{{ $item->product_name }}</td>
<td>{{ $item->variation_name ?? '—' }}</td>
<td>{{ $item->quantity }}</td>
<td>{{ number_format($item->price, 0, '.', ' ') }} </td>
<td>{{ number_format($item->total, 0, '.', ' ') }} </td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr class="table-light">
<td colspan="4" class="text-end fw-bold">Итого:</td>
<td class="fw-bold">{{ number_format($order->total, 0, '.', ' ') }} </td>
</tr>
</tfoot>
</table>
</div>
@if($order->comment)
<div class="mt-4">
<p><strong>Комментарий к заказу:</strong></p>
<p class="text-muted">{{ $order->comment }}</p>
</div>
@endif
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,28 @@
<div class="row">
<div class="col-md-3 mb-4">
<div class="card border-0 tw-bg-orange tw-text-light-gray">
<div class="card-body p-4 text-center">
<div class="mb-3">
<i class="bi bi-person-circle fs-1"></i>
</div>
<h5>{{ $user->name }}</h5>
<p class="small">{{ $user->email }}</p>
<hr>
<nav class="nav flex-column mt-2 mb-2">
<a href="{{ route('profile.index') }}" class="nav-link py-2 px-0 {{ request()->routeIs('profile.index') ? 'active' : '' }}">
<i class="bi bi-speedometer2 me-2"></i> Обзор
</a>
<a href="{{ route('profile.edit') }}" class="nav-link py-2 px-0 {{ request()->routeIs('profile.edit') ? 'active' : '' }}">
<i class="bi bi-gear me-2"></i> Настройки профиля
</a>
<hr class="my-2">
<form method="POST" action="{{ route('logout') }}">
@csrf
<button type="submit" class="btn btn-link nav-link py-2 px-0 text-start">
<i class="bi bi-box-arrow-right me-2"></i> Выйти
</button>
</form>
</nav>
</div>
</div>
</div>

View File

@@ -0,0 +1,101 @@
@extends('layouts.app')
@section('title', 'Личный кабинет')
@php $style = 'profile'; @endphp
@section('content')
<div class="container py-4">
@include('profile.partials.profile-sidebar', compact('user'))
<div class="col-md-9">
<div class="card border-0">
<div class="card-body p-4">
<h4 class="mb-4">Мои заказы</h4>
@if($activeOrders->count())
<h5 class="mb-3">Активные заказы</h5>
<div class="table-responsive mb-4">
<table class="table table-bordered">
<thead class="table-light">
<tr>
<th> заказа</th>
<th>Дата</th>
<th>Сумма</th>
<th>Статус</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($activeOrders as $order)
<tr>
<td>{{ $order->order_number }}</td>
<td>{{ $order->created_at->format('d.m.Y H:i') }}</td>
<td>{{ number_format($order->total, 0, '.', ' ') }} </td>
<td>
<span class="badge bg-{{ $order->delivery_status_color }}">
{{ $order->delivery_status_name }}
</span>
</td>
<td>
<a href="{{ route('profile.order.show', $order->id) }}" class="btn btn-sm btn-outline-secondary">
Детали
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
@if($archiveOrders->count())
<h5 class="mb-3">Архив заказов</h5>
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-light">
<tr>
<th> заказа</th>
<th>Дата</th>
<th>Сумма</th>
<th>Статус</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($archiveOrders as $order)
<tr>
<td>{{ $order->order_number }}</td>
<td>{{ $order->created_at->format('d.m.Y H:i') }}</td>
<td>{{ number_format($order->total, 0, '.', ' ') }} </td>
<td>
<span class="badge bg-{{ $order->delivery_status_color }}">
{{ $order->delivery_status_name }}
</span>
</td>
<td>
<a href="{{ route('profile.order.show', $order->id) }}" class="btn btn-sm btn-outline-secondary">
Детали
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
@if($activeOrders->isEmpty() && $archiveOrders->isEmpty())
<div class="text-center py-5">
<i class="bi bi-inbox fs-1 text-muted"></i>
<p class="text-muted mt-2">У вас пока нет заказов</p>
<a href="{{ route('index') }}" class="btn btn-dark-green mt-3">Перейти к покупкам</a>
</div>
@endif
</div>
</div>
</div>
</div>
</div>
@endsection