This commit is contained in:
68
resources/views/admin/orders/show.blade.php
Normal file
68
resources/views/admin/orders/show.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@section('content')
|
||||
@include('partials.breadcrumbs', [
|
||||
'items' => [
|
||||
['label' => 'Админка', 'url' => route('admin.dashboard')],
|
||||
['label' => 'Заказы', 'url' => route('admin.orders.index')],
|
||||
['label' => 'Заказ #' . $order->id, 'url' => null],
|
||||
],
|
||||
])
|
||||
|
||||
<section class="pc-section">
|
||||
<div class="pc-section-title">
|
||||
<h2>Заказ #{{ $order->id }}</h2>
|
||||
</div>
|
||||
|
||||
<div class="pc-grid pc-grid-2">
|
||||
<div class="pc-card">
|
||||
<h3>Статус</h3>
|
||||
<form class="pc-form" method="post" action="{{ route('admin.orders.update', $order) }}">
|
||||
@csrf
|
||||
@method('put')
|
||||
<label>
|
||||
Текущий статус
|
||||
<select name="status">
|
||||
@foreach (['new' => 'Новый', 'processing' => 'В обработке', 'paid' => 'Оплачен', 'shipped' => 'Отправлен', 'completed' => 'Завершен', 'cancelled' => 'Отменен'] as $value => $label)
|
||||
<option value="{{ $value }}" @selected($order->status === $value)>{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
<button class="pc-btn primary" type="submit">Обновить статус</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="pc-card">
|
||||
<h3>Покупатель</h3>
|
||||
<p><strong>{{ $order->customer_name }}</strong></p>
|
||||
<p>{{ $order->email }}</p>
|
||||
<p>Оплата: {{ $order->payment_method_label }}</p>
|
||||
@if ($order->phone)
|
||||
<p>{{ $order->phone }}</p>
|
||||
@endif
|
||||
@if ($order->address)
|
||||
<p>{{ $order->address }}</p>
|
||||
@endif
|
||||
@if ($order->comment)
|
||||
<p>Комментарий: {{ $order->comment }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pc-card">
|
||||
<h3>Состав заказа</h3>
|
||||
<div class="pc-account-orders">
|
||||
@foreach ($order->items as $item)
|
||||
<div class="pc-account-order">
|
||||
<span>{{ $item->name }} × {{ $item->quantity }}</span>
|
||||
<strong>{{ number_format($item->subtotal, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="pc-cart-summary-row">
|
||||
<span>Итого</span>
|
||||
<strong>{{ number_format($order->total, 0, '.', ' ') }} {{ config('shop.currency_symbol', '₽') }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user