Update templates/seller_dashboard.html
Browse files- templates/seller_dashboard.html +23 -32
templates/seller_dashboard.html
CHANGED
|
@@ -5,42 +5,37 @@
|
|
| 5 |
<h2 class="text-3xl font-bold text-center mb-8">Seller Dashboard</h2>
|
| 6 |
|
| 7 |
<!-- Add Car Form -->
|
| 8 |
-
<section class="mb-12
|
| 9 |
-
<h3 class="text-2xl font-bold mb-4"
|
| 10 |
<form method="POST" action="{{ url_for('add_car') }}" class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 11 |
<div>
|
| 12 |
-
<label class="block text-gray-700 mb-2" for="name">Car Name
|
| 13 |
<input type="text" id="name" name="name" required
|
| 14 |
-
class="w-full px-3 py-2 border border-gray-300 rounded-md
|
| 15 |
-
placeholder="e.g., Maruti Suzuki Swift">
|
| 16 |
</div>
|
| 17 |
|
| 18 |
<div>
|
| 19 |
<label class="block text-gray-700 mb-2" for="year">Year of Registration</label>
|
| 20 |
-
<input type="number" id="year" name="year"
|
| 21 |
-
class="w-full px-3 py-2 border border-gray-300 rounded-md
|
| 22 |
-
placeholder="e.g., 2022">
|
| 23 |
</div>
|
| 24 |
|
| 25 |
<div>
|
| 26 |
-
<label class="block text-gray-700 mb-2" for="price">Price (
|
| 27 |
<input type="number" id="price" name="price" required
|
| 28 |
-
class="w-full px-3 py-2 border border-gray-300 rounded-md
|
| 29 |
-
placeholder="e.g., 650000">
|
| 30 |
</div>
|
| 31 |
|
| 32 |
<div class="md:col-span-2">
|
| 33 |
-
<label class="block text-gray-700 mb-2" for="description">
|
| 34 |
<textarea id="description" name="description" required
|
| 35 |
-
class="w-full px-3 py-2 border border-gray-300 rounded-md
|
| 36 |
-
placeholder="Describe your car's condition, features, mileage, etc."
|
| 37 |
-
rows="4"></textarea>
|
| 38 |
</div>
|
| 39 |
|
| 40 |
<div class="md:col-span-2">
|
| 41 |
<button type="submit"
|
| 42 |
-
class="bg-blue-600 text-white px-6 py-
|
| 43 |
-
|
| 44 |
</button>
|
| 45 |
</div>
|
| 46 |
</form>
|
|
@@ -48,38 +43,34 @@
|
|
| 48 |
|
| 49 |
<!-- My Cars -->
|
| 50 |
<section>
|
| 51 |
-
<h3 class="text-2xl font-bold mb-4"
|
| 52 |
|
| 53 |
{% if cars %}
|
| 54 |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 55 |
{% for car in cars %}
|
| 56 |
-
<div class="border
|
| 57 |
-
<h4 class="text-xl font-bold
|
| 58 |
-
<p class="text-gray-600
|
| 59 |
-
<p class="text-
|
| 60 |
-
<p class="text-gray-700
|
| 61 |
-
<div class="
|
| 62 |
<span class="px-3 py-1 rounded-full text-sm
|
| 63 |
{% if car.status == 'approved' %}bg-green-100 text-green-800
|
| 64 |
{% else %}bg-yellow-100 text-yellow-800{% endif %}">
|
| 65 |
{{ car.status|title }}
|
| 66 |
</span>
|
| 67 |
</div>
|
| 68 |
-
<div class="
|
| 69 |
<a href="{{ url_for('seller_appointments', car_id=car._id) }}"
|
| 70 |
-
class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700
|
| 71 |
-
|
| 72 |
</a>
|
| 73 |
</div>
|
| 74 |
</div>
|
| 75 |
{% endfor %}
|
| 76 |
</div>
|
| 77 |
{% else %}
|
| 78 |
-
<
|
| 79 |
-
<i class="fas fa-car text-6xl text-gray-300 mb-4"></i>
|
| 80 |
-
<p class="text-gray-600 text-xl">You haven't added any cars yet.</p>
|
| 81 |
-
<p class="text-gray-500">Add your first car using the form above!</p>
|
| 82 |
-
</div>
|
| 83 |
{% endif %}
|
| 84 |
</section>
|
| 85 |
</div>
|
|
|
|
| 5 |
<h2 class="text-3xl font-bold text-center mb-8">Seller Dashboard</h2>
|
| 6 |
|
| 7 |
<!-- Add Car Form -->
|
| 8 |
+
<section class="mb-12">
|
| 9 |
+
<h3 class="text-2xl font-bold mb-4">Add New Car</h3>
|
| 10 |
<form method="POST" action="{{ url_for('add_car') }}" class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 11 |
<div>
|
| 12 |
+
<label class="block text-gray-700 mb-2" for="name">Car Name</label>
|
| 13 |
<input type="text" id="name" name="name" required
|
| 14 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md">
|
|
|
|
| 15 |
</div>
|
| 16 |
|
| 17 |
<div>
|
| 18 |
<label class="block text-gray-700 mb-2" for="year">Year of Registration</label>
|
| 19 |
+
<input type="number" id="year" name="year" required
|
| 20 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md">
|
|
|
|
| 21 |
</div>
|
| 22 |
|
| 23 |
<div>
|
| 24 |
+
<label class="block text-gray-700 mb-2" for="price">Price ($)</label>
|
| 25 |
<input type="number" id="price" name="price" required
|
| 26 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md">
|
|
|
|
| 27 |
</div>
|
| 28 |
|
| 29 |
<div class="md:col-span-2">
|
| 30 |
+
<label class="block text-gray-700 mb-2" for="description">Description</label>
|
| 31 |
<textarea id="description" name="description" required
|
| 32 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md"></textarea>
|
|
|
|
|
|
|
| 33 |
</div>
|
| 34 |
|
| 35 |
<div class="md:col-span-2">
|
| 36 |
<button type="submit"
|
| 37 |
+
class="bg-blue-600 text-white px-6 py-2 rounded hover:bg-blue-700">
|
| 38 |
+
Add Car
|
| 39 |
</button>
|
| 40 |
</div>
|
| 41 |
</form>
|
|
|
|
| 43 |
|
| 44 |
<!-- My Cars -->
|
| 45 |
<section>
|
| 46 |
+
<h3 class="text-2xl font-bold mb-4">My Cars</h3>
|
| 47 |
|
| 48 |
{% if cars %}
|
| 49 |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 50 |
{% for car in 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 |
<span class="px-3 py-1 rounded-full text-sm
|
| 58 |
{% if car.status == 'approved' %}bg-green-100 text-green-800
|
| 59 |
{% else %}bg-yellow-100 text-yellow-800{% endif %}">
|
| 60 |
{{ car.status|title }}
|
| 61 |
</span>
|
| 62 |
</div>
|
| 63 |
+
<div class="mt-4">
|
| 64 |
<a href="{{ url_for('seller_appointments', car_id=car._id) }}"
|
| 65 |
+
class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">
|
| 66 |
+
View Appointments
|
| 67 |
</a>
|
| 68 |
</div>
|
| 69 |
</div>
|
| 70 |
{% endfor %}
|
| 71 |
</div>
|
| 72 |
{% else %}
|
| 73 |
+
<p class="text-gray-600">You haven't added any cars yet.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
{% endif %}
|
| 75 |
</section>
|
| 76 |
</div>
|