feat: add live rental tracking map view with GPS coordinates and real-time refresh
This commit is contained in:
@@ -4,7 +4,7 @@ import { useState, useEffect } from 'react';
|
||||
import {
|
||||
FileText, Search, Filter, Bike, User, Calendar, DollarSign, Clock, MoreVertical,
|
||||
Eye, Plus, Phone, MessageCircle, X, CreditCard, Wallet, Building, Download,
|
||||
Printer, ChevronLeft, ChevronRight, CheckCircle, AlertTriangle
|
||||
Printer, ChevronLeft, ChevronRight, CheckCircle, AlertTriangle, MapPin
|
||||
} from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import {
|
||||
@@ -60,6 +60,11 @@ interface Rental {
|
||||
lockedReason?: string;
|
||||
hubId: string;
|
||||
hubName: string;
|
||||
location?: {
|
||||
lat: number;
|
||||
lng: number;
|
||||
address?: string;
|
||||
};
|
||||
initialImages?: BikeImage[];
|
||||
imagesApproved: boolean;
|
||||
bikerNote?: string;
|
||||
@@ -182,6 +187,7 @@ const mockRentals: Rental[] = [
|
||||
penaltyAmount: 0,
|
||||
hubId: 'HUB-001',
|
||||
hubName: 'Gulshan Hub',
|
||||
location: { lat: 23.7925, lng: 90.4074, address: 'Gulshan 1, Dhaka' },
|
||||
imagesApproved: true,
|
||||
createdAt: '2024-01-15',
|
||||
acceptedAt: '2024-01-15',
|
||||
@@ -216,6 +222,7 @@ const mockRentals: Rental[] = [
|
||||
penaltyAmount: 0,
|
||||
hubId: 'HUB-002',
|
||||
hubName: 'Banani Hub',
|
||||
location: { lat: 23.8041, lng: 90.4152, address: 'Banani, Dhaka' },
|
||||
imagesApproved: false,
|
||||
createdAt: '2024-02-10',
|
||||
},
|
||||
@@ -568,6 +575,12 @@ export default function RentalsPage() {
|
||||
<button className="py-2 px-4 border border-slate-200 rounded-lg text-sm font-medium text-slate-600 hover:bg-slate-50 flex items-center justify-center gap-2">
|
||||
<Download className="w-4 h-4" /> Export
|
||||
</button>
|
||||
<Link
|
||||
href="/admin/rentals/map"
|
||||
className="py-2 px-4 border border-slate-200 rounded-lg text-sm font-medium text-slate-600 hover:bg-slate-50 flex items-center justify-center gap-2"
|
||||
>
|
||||
<MapPin className="w-4 h-4" /> Map View
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user