From 78d1924c2c383506549c10fb71b0570b339dc75e Mon Sep 17 00:00:00 2001 From: sazzadulalambd Date: Tue, 12 May 2026 20:39:10 +0600 Subject: [PATCH] refactor: implement responsive mobile view and hide add biker button for bikers management page --- src/app/admin/bikers/page.tsx | 259 ++++++++++++++++++++++------------ 1 file changed, 166 insertions(+), 93 deletions(-) diff --git a/src/app/admin/bikers/page.tsx b/src/app/admin/bikers/page.tsx index b78970a..068bda8 100644 --- a/src/app/admin/bikers/page.tsx +++ b/src/app/admin/bikers/page.tsx @@ -428,7 +428,7 @@ export default function BikersPage() { biker.gpsDeviceId?.toLowerCase().includes(searchQuery.toLowerCase()); const matchesStatus = statusFilter === 'all' || biker.status === statusFilter; const matchesKyc = kycFilter === 'all' || biker.kycStatus === kycFilter; - const matchesRent = (statusFilter === 'rent_pending') + const matchesRent = (statusFilter === 'rent_pending') ? (biker.pendingRent && biker.pendingRent > 0) : true; return matchesSearch && matchesStatus && matchesKyc && matchesRent; @@ -531,12 +531,12 @@ export default function BikersPage() {

Bikers Management

Manage registered biker accounts with full details

- + */}
@@ -619,7 +619,7 @@ export default function BikersPage() { -
{viewMode === 'table' ? ( -
- - - - - - - - - - - - - - - + <> +
+
BikerLicense & GPSLocationRides & DistanceFinancialMemberKYCRent StatusActions
+ + + + + + + + + + + + + + + {sortedBikers.map(biker => ( + + + + + + + + + + + + ))} + +
BikerLicense & GPSLocationRides & DistanceFinancialMemberKYCRent StatusActions
+ +
+ {biker.name.charAt(0)} +
+
+

{biker.name}

+

{biker.phone}

+
+ +
+

+ {biker.drivingLicense.number || 'No License'} +

+

+ GPS: {biker.gpsDeviceId || 'No GPS'} +

+

Class: {biker.drivingLicense.class || 'N/A'}

+
+

{biker.location}

+
+

{biker.totalRides} rides

+

{biker.totalDistance.toLocaleString()} km

+
+

৳{biker.totalSpent.toLocaleString()}

+

Wallet: ৳{biker.walletBalance}

+
+ + {biker.membershipType} + + + + {biker.kycStatus === 'verified' && } + {biker.kycStatus === 'pending' && } + {biker.kycStatus === 'rejected' && } + {biker.kycStatus} + + + {(biker.pendingRent && biker.pendingRent > 0) ? ( +
+ + Pending + +

৳{biker.pendingRent} ({biker.pendingRentDays}d)

+
+ ) : ( + + Clear + + )} +
+
+ + + + + + + + + + + + + +
+
+
+ +
+
{sortedBikers.map(biker => ( - - - -
- {biker.name.charAt(0)} + +
+
+
+ {biker.name.charAt(0)}
-

{biker.name}

-

{biker.phone}

+

{biker.name}

+

{biker.phone}

- - - -

- {biker.drivingLicense.number || 'No License'} -

-

- GPS: {biker.gpsDeviceId || 'No GPS'} -

-

Class: {biker.drivingLicense.class || 'N/A'}

- - -

{biker.location}

- - -

{biker.totalRides} rides

-

{biker.totalDistance.toLocaleString()} km

- - -

৳{biker.totalSpent.toLocaleString()}

-

Wallet: ৳{biker.walletBalance}

- - +
+
+
+ + {statusLabels[biker.status] || biker.status} + + + {biker.kycStatus} + {biker.membershipType} - - - - {biker.kycStatus === 'verified' && } - {biker.kycStatus === 'pending' && } - {biker.kycStatus === 'rejected' && } - {biker.kycStatus} - - - - {(biker.pendingRent && biker.pendingRent > 0) ? ( -
- - Pending - -

৳{biker.pendingRent} ({biker.pendingRentDays}d)

-
- ) : ( - - Clear + {biker.rating > 0 && ( + + ★ {biker.rating} )} - - -
- - - - - - - - - +
+
+
+

Total Rides

+

{biker.totalRides}

- - +
+

Distance

+

{biker.totalDistance.toLocaleString()} km

+
+
+

Active Rentals

+

-

+
+
+

Completed

+

{biker.totalRides}

+
+
+
+
+

License

+

{biker.drivingLicense.number || 'N/A'}

+
+
+

Location

+

{biker.location}

+
+
+
+
+

৳{biker.walletBalance.toLocaleString()}

+

Wallet

+
+ View Details → +
+ ))} - - -
+
+
+ ) : (
{sortedBikers.map(biker => (