wyyl/themes/default/account/order.blade.php

69 lines
2.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@extends('layout.master')
@section('body-class', 'page-account-order-list')
@section('content')
<div class="container">
<x-shop-breadcrumb type="static" value="account.order.index" />
{{-- {{ dd($orders) }} --}}
<div class="row">
<x-shop-sidebar/>
<div class="col-12 col-md-9">
<div class="card mb-4 account-card order-wrap">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="card-title">{{ __('shop/account.order.index') }}</h5>
</div>
<div class="card-body">
<table class="table ">
<thead>
<tr>
<th>{{ __('shop/account.order.order_details') }}</th>
<th>{{ __('shop/account.order.amount') }}</th>
<th>{{ __('shop/account.order.state') }}</th>
<th class="text-end">{{ __('shop/account.order.operate') }}</th>
</tr>
</thead>
@foreach ($orders as $order)
<tbody>
<tr class="sep-row"><td colspan="4"></td></tr>
<tr class="head-tr">
<td colspan="4">
<span class="order-created me-4">{{ $order->created_at }}</span>
<span class="order-number">{{ __('shop/account.order.order_number') }}{{ $order->number }}</span>
</td>
</tr>
@foreach ($order->orderProducts as $product)
<tr class="{{ $loop->first ? 'first-tr' : '' }}">
<td>
<div class="product-info">
<div class="img"><img src="{{ $product->image }}" class="img-fluid"></div>
<div class="name">
<span>{{ $product->name }}</span>
</div>
<div class="quantity">{{ $product->quantity }}</div>
</div>
</td>
@if ($loop->first)
<td rowspan="{{ $loop->count }}">{{ currency_format($order->total) }}</td>
<td rowspan="{{ $loop->count }}">{{ __("common.order.{$order->status}") }}</td>
<td rowspan="{{ $loop->count }}" class="text-end">
<a href="{{ shop_route('account.order.show', ['number' => $order->number]) }}" class="btn btn-outline-secondary btn-sm">{{ __('shop/account.order.check') }}</a>
</td>
@endif
</tr>
@endforeach
</tbody>
@endforeach
</table>
</div>
</div>
</div>
</div>
</div>
@endsection