Added new admin features, updated login functionality, and modified orders view

This commit is contained in:
UronShrestha
2024-07-15 13:51:36 +05:45
parent d8e17eef70
commit 9c427917b8
8 changed files with 203 additions and 38 deletions

View File

@ -0,0 +1,104 @@
<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">
<p class="card-title mb-0">Our Customers</p>
<div class="table-responsive">
@php
use Illuminate\Support\Facades\URL;
@endphp
<table class="table table-striped table-bordered" id="product-table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Picture</th>
<th>Email</th>
<th>Type</th>
<th>Created At</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@php
$i = 0;
@endphp
@foreach ($customers as $customer)
@php
$i++;
@endphp
<tr>
<td>{{ $i }}</td>
<td>{{ $customer->name }}</td>
<td><img src="{{ asset('uploads/profiles/' . $customer->picture) }}"
alt="" class="img-fluid rounded mx-auto d-block"></td>
<td>{{ $customer->email }}</td>
<td>{{ $customer->type }}</td>
<td>{{ $customer->created_at }}</td>
<td>{{ $customer->status }}</td>
<td>
@if ($customer->status == 'Active')
<a class="btn btn-danger"
href="{{ url::to('changeUserStatus/Blocked', ['id' => $customer->id]) }}">Block</a>
@else
<a class="btn btn-success"
href="{{ url::to('changeUserStatus/Active', ['id' => $customer->id]) }}">Active</a>
@endif
</td>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- content-wrapper ends -->
<x-adminfooter />

View File

@ -375,7 +375,7 @@
</a>
<div class="collapse" id="form-elements">
<ul class="nav flex-column sub-menu">
<li class="nav-item"><a class="nav-link" href="#">View
<li class="nav-item"><a class="nav-link" href="{{ route('ourCustomers') }}">View
All</a></li>
</ul>
</div>

View File

@ -17,7 +17,6 @@
<th>S.No.</th>
<th>Name</th>
<th>Address</th>
{{-- <th>Description</th> --}}
<th>Phone</th>
<th>Status</th>
<th>Order Date</th>
@ -38,7 +37,6 @@
<td>{{ $i }}</td>
<td>{{ $item->name }}</td>
<td>{{ $item->address }}</td>
{{-- <td>{{ $item->description }}</td> --}}
<td>{{ $item->phone }}</td>
<td>{{ $item->status }}</td>
<td>{{ $item->created_at }}</td>
@ -116,9 +114,6 @@
@endforeach
</tbody>
<tfoot>
<tr>
<td colspan="4" style="text-align: center;">
@ -130,9 +125,7 @@
</tfoot>
</table>
</div>
<!-- Modal footer -->
<div class="modal-footer">