278 lines
7.7 KiB
PHP
278 lines
7.7 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', 'My Orders - Additional Design')
|
|
|
|
@section('styles')
|
|
<style>
|
|
h1 {
|
|
font-family: 'Abril Fatface', cursive;
|
|
font-size: 2.5rem;
|
|
color: var(--text-primary);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
h2 {
|
|
font-family: 'Abril Fatface', cursive;
|
|
font-size: 1.8rem;
|
|
color: var(--text-primary);
|
|
margin-bottom: var(--spacing-md);
|
|
}
|
|
|
|
.page-intro {
|
|
margin-bottom: var(--spacing-lg);
|
|
}
|
|
|
|
.page-intro p {
|
|
color: var(--text-secondary);
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.orders-section {
|
|
margin-bottom: var(--spacing-xl);
|
|
}
|
|
|
|
.section-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: var(--spacing-md);
|
|
}
|
|
|
|
.btn-new {
|
|
display: inline-block;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.btn-new {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.table-container {
|
|
background: white;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
thead {
|
|
background-color: var(--bg-secondary);
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
th {
|
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
text-align: left;
|
|
font-weight: 600;
|
|
font-size: 0.9rem;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
tbody tr {
|
|
border-bottom: 1px solid var(--border-color);
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
tbody tr:hover {
|
|
background-color: var(--bg-primary);
|
|
}
|
|
|
|
td {
|
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
font-size: 0.95rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.order-number {
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 0.35rem 0.75rem;
|
|
border-radius: 20px;
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.btn-view {
|
|
color: var(--text-primary);
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
transition: var(--transition);
|
|
}
|
|
|
|
.btn-view:hover {
|
|
color: var(--accent-dark);
|
|
}
|
|
|
|
.empty-state {
|
|
background-color: var(--bg-secondary);
|
|
border-radius: 8px;
|
|
padding: var(--spacing-xl);
|
|
text-align: center;
|
|
}
|
|
|
|
.empty-state p {
|
|
font-size: 1.05rem;
|
|
margin-bottom: var(--spacing-md);
|
|
}
|
|
|
|
.empty-state a {
|
|
color: var(--text-primary);
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
padding: var(--spacing-sm) var(--spacing-lg);
|
|
background-color: var(--accent-dark);
|
|
color: white;
|
|
border-radius: 4px;
|
|
display: inline-block;
|
|
transition: var(--transition);
|
|
}
|
|
|
|
.empty-state a:hover {
|
|
background-color: #333;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.4rem;
|
|
}
|
|
|
|
.section-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: var(--spacing-sm);
|
|
}
|
|
|
|
table {
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
th, td {
|
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
}
|
|
|
|
.btn-new {
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
}
|
|
</style>
|
|
@endsection
|
|
|
|
@section('content')
|
|
<div class="container">
|
|
<div class="page-intro">
|
|
<h1>My Orders</h1>
|
|
<p>View your standard and custom orders</p>
|
|
</div>
|
|
|
|
<!-- Standard Orders -->
|
|
<div class="orders-section">
|
|
<h2>Standard Orders</h2>
|
|
|
|
@if ($standardOrders->count() > 0)
|
|
<div class="table-container">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Order #</th>
|
|
<th>Date</th>
|
|
<th>Total</th>
|
|
<th>Status</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($standardOrders as $order)
|
|
<tr>
|
|
<td class="order-number">{{ $order->order_number }}</td>
|
|
<td>{{ $order->created_at->format('d M Y') }}</td>
|
|
<td><strong>R{{ number_format($order->total, 2) }}</strong></td>
|
|
<td>
|
|
<span class="status-badge {{ $order->status }}">
|
|
{{ ucfirst(str_replace('_', ' ', $order->status)) }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<a href="{{ route('my-orders.detail', $order) }}" class="btn-view">View Details</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@else
|
|
<div class="empty-state">
|
|
<p>You haven't placed any standard orders yet.</p>
|
|
<a href="{{ route('wallpapers') }}">Browse Products</a>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<!-- Custom Orders -->
|
|
<div class="orders-section">
|
|
<div class="section-header">
|
|
<h2 style="margin-bottom: 0;">Custom Orders</h2>
|
|
<a href="{{ route('custom-orders.create') }}" class="btn btn-new">+ New Custom Order</a>
|
|
</div>
|
|
|
|
@if ($customOrders->count() > 0)
|
|
<div class="table-container">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Order #</th>
|
|
<th>Type</th>
|
|
<th>Total</th>
|
|
<th>Status</th>
|
|
<th>Deposit</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($customOrders as $order)
|
|
<tr>
|
|
<td class="order-number">{{ $order->order_number }}</td>
|
|
<td class="capitalize">{{ ucfirst($order->type) }}</td>
|
|
<td><strong>R{{ number_format($order->total_cost, 2) }}</strong></td>
|
|
<td>
|
|
<span class="status-badge {{ $order->status }}">
|
|
{{ str_replace('_', ' ', ucfirst($order->status)) }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="status-badge {{ $order->deposit_status }}">
|
|
{{ ucfirst($order->deposit_status) }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<a href="{{ route('custom-orders.show', $order) }}" class="btn-view">View Details</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@else
|
|
<div class="empty-state">
|
|
<p>You haven't created any custom orders yet.</p>
|
|
<a href="{{ route('custom-orders.create') }}">Create Custom Order</a>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endsection
|