From eab320fee100859aa9429a683da3807bba2edea0 Mon Sep 17 00:00:00 2001 From: Pramudi Samarawickrama Date: Wed, 5 Nov 2025 01:56:48 +0530 Subject: [PATCH 1/4] style chnaged --- .../dashboards/CustomerDashboard.tsx | 19 +++++++++++++++---- .../dashboard/vehicles/[vehicleId]/page.tsx | 5 ++++- src/app/dashboard/vehicles/page.tsx | 13 ++++++++++++- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/app/components/dashboards/CustomerDashboard.tsx b/src/app/components/dashboards/CustomerDashboard.tsx index 1ef60e1..7c107eb 100644 --- a/src/app/components/dashboards/CustomerDashboard.tsx +++ b/src/app/components/dashboards/CustomerDashboard.tsx @@ -107,28 +107,39 @@ const CustomerDashboard: React.FC = ({ profile }) => { href="/dashboard/vehicles" className="p-4 border border-gray-200 dark:border-gray-700 rounded-lg hover:border-blue-500 transition-colors text-center" > -
🚗
+

Vehicles

-
📅
+ + +

Appointments

-
📋
+ + +

History

-
👤
+ + +

Profile

diff --git a/src/app/dashboard/vehicles/[vehicleId]/page.tsx b/src/app/dashboard/vehicles/[vehicleId]/page.tsx index bf25bce..416842e 100644 --- a/src/app/dashboard/vehicles/[vehicleId]/page.tsx +++ b/src/app/dashboard/vehicles/[vehicleId]/page.tsx @@ -147,7 +147,10 @@ export default function VehicleDetailsPage() { htmlFor="photo-upload" className={`cursor-pointer block ${uploadingPhotos ? 'opacity-50' : ''}`} > -
📷
+ + + +

{uploadingPhotos ? 'Uploading...' : 'Click to upload vehicle photos'}

diff --git a/src/app/dashboard/vehicles/page.tsx b/src/app/dashboard/vehicles/page.tsx index 9885cc5..e019775 100644 --- a/src/app/dashboard/vehicles/page.tsx +++ b/src/app/dashboard/vehicles/page.tsx @@ -111,7 +111,18 @@ export default function VehiclesPage() { {/* Vehicles Grid */} {vehicles.length === 0 ? (
-
🚗
+

No vehicles yet

Get started by adding your first vehicle

+
+ +
diff --git a/src/app/dashboard/vehicles/page.tsx b/src/app/dashboard/vehicles/page.tsx index e019775..de3b4ff 100644 --- a/src/app/dashboard/vehicles/page.tsx +++ b/src/app/dashboard/vehicles/page.tsx @@ -80,7 +80,7 @@ export default function VehiclesPage() { {/* Add Vehicle Modal */} {showAddForm && ( -
+
+
Date: Wed, 5 Nov 2025 03:09:58 +0530 Subject: [PATCH 3/4] style: edit form --- src/app/components/EditVehicleForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/EditVehicleForm.tsx b/src/app/components/EditVehicleForm.tsx index 51fc9b9..3a2e249 100644 --- a/src/app/components/EditVehicleForm.tsx +++ b/src/app/components/EditVehicleForm.tsx @@ -61,7 +61,7 @@ export default function EditVehicleForm({
)} -
+
Date: Wed, 5 Nov 2025 03:10:20 +0530 Subject: [PATCH 4/4] style: VehicleDetailsPage layout and improve UI elements for better user experience --- .../dashboard/vehicles/[vehicleId]/page.tsx | 215 +++++++++--------- 1 file changed, 112 insertions(+), 103 deletions(-) diff --git a/src/app/dashboard/vehicles/[vehicleId]/page.tsx b/src/app/dashboard/vehicles/[vehicleId]/page.tsx index 416842e..e301c34 100644 --- a/src/app/dashboard/vehicles/[vehicleId]/page.tsx +++ b/src/app/dashboard/vehicles/[vehicleId]/page.tsx @@ -84,118 +84,127 @@ export default function VehicleDetailsPage() { return (
- +
+ + +
-
-
-
-

- {vehicle.year} {vehicle.make} {vehicle.model} -

-

VIN: {vehicle.vin}

-
- {vehicle.color && ( - - {vehicle.color} - - )} -
+
+ {/* Left: Images + gallery */} +
+
+
+ {vehicle.photos && vehicle.photos.length > 0 ? ( + {`${vehicle.make} + ) : ( +
+ No photo available +
+ )} +
-
-
-

License Plate

-

{vehicle.licensePlate}

-
-
-

Mileage

-

{vehicle.mileage.toLocaleString()} miles

-
-
-

Registered

-

- {new Date(vehicle.createdAt).toLocaleDateString()} -

+ {/* Thumbnail strip */} + {vehicle.photos && vehicle.photos.length > 1 && ( +
+ {vehicle.photos.map((p, i) => ( + + ))} +
+ )} + + {/* Photo upload CTA (small) */} +
+ +
-
-

Last Updated

-

- {new Date(vehicle.updatedAt).toLocaleDateString()} -

+ + {/* Service history */} +
+

Service History

+ {serviceHistory.length === 0 ? ( +
+

No service history available

+

Service records will appear here once completed

+
+ ) : ( +
    + {serviceHistory.map((s) => ( +
  • +
    +
    +
    +
    +
    +

    {s.type}

    +
    ${s.cost.toFixed(2)}
    +
    +
    {new Date(s.date).toLocaleDateString()}
    + {s.description &&

    {s.description}

    } +
    +
  • + ))} +
+ )}
-
- {/* Photo Upload Section */} -
-

Vehicle Photos

-
- - -
-
+ {/* Right: Details card */} +
);