174 lines
9.0 KiB
PHP
174 lines
9.0 KiB
PHP
|
<x-adminheader />
|
||
|
|
||
|
<!-- partial -->
|
||
|
<div class="main-panel">
|
||
|
<div class="content-wrapper">
|
||
|
<div class="row">
|
||
|
<div class="col-md-12 grid-margin">
|
||
|
<div class="row">
|
||
|
<div class="col-12 col-xl-8 mb-4 mb-xl-0">
|
||
|
<h3 class="font-weight-bold">Welcome Aamir</h3>
|
||
|
<h6 class="font-weight-normal mb-0">All systems are running smoothly!
|
||
|
</h6>
|
||
|
</div>
|
||
|
<div class="col-12 col-xl-4">
|
||
|
<div class="justify-content-end d-flex">
|
||
|
<div class="dropdown flex-md-grow-1 flex-xl-grow-0">
|
||
|
<button class="btn btn-sm btn-light bg-white dropdown-toggle" type="button"
|
||
|
id="dropdownMenuDate2" data-toggle="dropdown" aria-haspopup="true"
|
||
|
aria-expanded="true">
|
||
|
<i class="mdi mdi-calendar"></i> Today (10 Jan 2021)
|
||
|
</button>
|
||
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuDate2">
|
||
|
<a class="dropdown-item" href="#">January - March</a>
|
||
|
<a class="dropdown-item" href="#">March - June</a>
|
||
|
<a class="dropdown-item" href="#">June - August</a>
|
||
|
<a class="dropdown-item" href="#">August - November</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="col-md-12 grid-margin stretch-card">
|
||
|
<div class="card">
|
||
|
<div class="card-body">
|
||
|
<!-- Button to Open the Modal -->
|
||
|
{{-- <button type="button" class="btn btn-primary float-right" data-toggle="modal"
|
||
|
data-target="#myModal">
|
||
|
Add New
|
||
|
</button> --}}
|
||
|
<!-- The Modal -->
|
||
|
<div class="modal" id="myModal">
|
||
|
<div class="modal-dialog">
|
||
|
<div class="modal-content">
|
||
|
|
||
|
<!-- Modal Header -->
|
||
|
<div class="modal-header">
|
||
|
<h4 class="modal-title"> Add New Product</h4>
|
||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||
|
</div>
|
||
|
|
||
|
<!-- Modal body -->
|
||
|
<div class="modal-body">
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<!-- Modal footer -->
|
||
|
<div class="modal-footer">
|
||
|
<button type="button" class="btn btn-danger"
|
||
|
data-dismiss="modal">Close</button>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<p class="card-title mb-0">Our Orders</p>
|
||
|
<div class="table-responsive">
|
||
|
<table class="table table-striped table-bordered" id="product-table">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>ID</th>
|
||
|
<th>Customer Name</th>
|
||
|
<th> Customer Status</th>
|
||
|
<th>Phone</th>
|
||
|
<th>Address</th>
|
||
|
<th>Email</th>
|
||
|
<th>Bill</th>
|
||
|
<th> Status</th>
|
||
|
<th>Order Date</th>
|
||
|
<th>Actions</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
@php
|
||
|
$i = 0;
|
||
|
@endphp
|
||
|
@foreach ($orders as $order)
|
||
|
@php
|
||
|
$i++;
|
||
|
@endphp
|
||
|
<tr>
|
||
|
<td>{{ $i }}</td>
|
||
|
|
||
|
<td>{{ $order->name }}</td>
|
||
|
<td>
|
||
|
@if ($order->userStatus == 'Active')
|
||
|
<span
|
||
|
class="badge badge-success d-flex justify-content-center">Active</span>
|
||
|
@else
|
||
|
<span
|
||
|
class="badge badge-danger d-flex justify-content-center">Blocked</span>
|
||
|
@endif
|
||
|
|
||
|
|
||
|
</td>
|
||
|
<td>{{ $order->phone }}</td>
|
||
|
<td>{{ $order->address }}</td>
|
||
|
<td>{{ $order->email }}</td>
|
||
|
<td>NRs {{ $order->bill }}</td>
|
||
|
<td>
|
||
|
<div class="badge badge-light d-flex justify-content-center">
|
||
|
{{ $order->status }}
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
{{-- @if ($order->status == 'Pending')
|
||
|
<span
|
||
|
class="badge badge-warning d-flex justify-content-center">Pending</span>
|
||
|
@elseif ($order->status == 'Paid')
|
||
|
<span
|
||
|
class="badge badge-info d-flex justify-content-center">Paid</span>
|
||
|
@elseif ($order->status == 'Delivered')
|
||
|
<span
|
||
|
class="badge badge-success d-flex justify-content-center">Delivered</span>
|
||
|
@elseif ($order->status == 'Rejected')
|
||
|
<span
|
||
|
class="badge badge-danger d-flex justify-content-center">Rejected</span>
|
||
|
@endif
|
||
|
</td> --}}
|
||
|
<td>{{ $order->created_at }}</td>
|
||
|
<td>
|
||
|
@if ($order->status == 'Paid')
|
||
|
<a href="{{ route('changeOrderStatus', ['status' => 'Accepted', 'id' => $order->id]) }}"
|
||
|
class="btn btn-info">Accept</a>
|
||
|
<a href="{{ route('changeOrderStatus', ['status' => 'Rejected', 'id' => $order->id]) }}"
|
||
|
class="btn btn-danger">Reject</a>
|
||
|
@elseif ($order->status == 'Accepted')
|
||
|
<a href="{{ route('changeOrderStatus', ['status' => 'Delivered', 'id' => $order->id]) }}"
|
||
|
class="btn btn-success">Completed</a>
|
||
|
@elseif ($order->status == 'Delivered')
|
||
|
Deliver Complete
|
||
|
@else
|
||
|
<a href="{{ route('changeOrderStatus', ['status' => 'Accepted', 'id' => $order->id]) }}"
|
||
|
class="btn btn-info">Accept</a>
|
||
|
@endif
|
||
|
</td>
|
||
|
</tr>
|
||
|
@endforeach
|
||
|
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
<!-- content-wrapper ends -->
|
||
|
|
||
|
<x-adminfooter />
|