arshtech commited on
Commit
08cd3bb
·
verified ·
1 Parent(s): 2caf08a

Create templates/admin.html

Browse files
Files changed (1) hide show
  1. templates/admin.html +70 -0
templates/admin.html ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "base.html" %}
2
+
3
+ {% block content %}
4
+ <div class="bg-white rounded-lg shadow-lg p-8">
5
+ <h2 class="text-3xl font-bold text-center mb-8">Admin Dashboard</h2>
6
+
7
+ <!-- Pending Seller Approvals -->
8
+ <section class="mb-12">
9
+ <h3 class="text-2xl font-bold mb-4">Pending Seller Approvals</h3>
10
+
11
+ {% if pending_sellers %}
12
+ <div class="overflow-x-auto">
13
+ <table class="min-w-full bg-white">
14
+ <thead>
15
+ <tr class="bg-gray-200">
16
+ <th class="py-2 px-4 border">Name</th>
17
+ <th class="py-2 px-4 border">Email</th>
18
+ <th class="py-2 px-4 border">Phone</th>
19
+ <th class="py-2 px-4 border">Action</th>
20
+ </tr>
21
+ </thead>
22
+ <tbody>
23
+ {% for seller in pending_sellers %}
24
+ <tr>
25
+ <td class="py-2 px-4 border">{{ seller.name }}</td>
26
+ <td class="py-2 px-4 border">{{ seller.email }}</td>
27
+ <td class="py-2 px-4 border">{{ seller.phone }}</td>
28
+ <td class="py-2 px-4 border">
29
+ <a href="{{ url_for('approve_seller', user_id=seller._id) }}"
30
+ class="bg-green-600 text-white px-4 py-1 rounded hover:bg-green-700">
31
+ Approve
32
+ </a>
33
+ </td>
34
+ </tr>
35
+ {% endfor %}
36
+ </tbody>
37
+ </table>
38
+ </div>
39
+ {% else %}
40
+ <p class="text-gray-600">No pending seller approvals.</p>
41
+ {% endif %}
42
+ </section>
43
+
44
+ <!-- Pending Car Approvals -->
45
+ <section>
46
+ <h3 class="text-2xl font-bold mb-4">Pending Car Approvals</h3>
47
+
48
+ {% if pending_cars %}
49
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
50
+ {% for car in pending_cars %}
51
+ <div class="border rounded-lg p-4">
52
+ <h4 class="text-xl font-bold">{{ car.name }}</h4>
53
+ <p class="text-gray-600">Year: {{ car.year }}</p>
54
+ <p class="text-blue-600 font-bold">${{ car.price }}</p>
55
+ <p class="text-gray-700">{{ car.description }}</p>
56
+ <div class="mt-4">
57
+ <a href="{{ url_for('approve_car', car_id=car._id) }}"
58
+ class="bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700">
59
+ Approve Car
60
+ </a>
61
+ </div>
62
+ </div>
63
+ {% endfor %}
64
+ </div>
65
+ {% else %}
66
+ <p class="text-gray-600">No pending car approvals.</p>
67
+ {% endif %}
68
+ </section>
69
+ </div>
70
+ {% endblock %}