@burdenoff/microfe-adaptercloud 2026.624.1 → 2026.625.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adaptercloud/components/EmptyState.js +17 -21
- package/dist/adaptercloud/components/EmptyState.js.map +1 -1
- package/dist/adaptercloud/components/InvestmentCard.js +25 -23
- package/dist/adaptercloud/components/InvestmentCard.js.map +1 -1
- package/dist/adaptercloud/components/MetricsCard.js +18 -12
- package/dist/adaptercloud/components/MetricsCard.js.map +1 -1
- package/dist/adaptercloud/components/PageLayout.js +38 -19
- package/dist/adaptercloud/components/PageLayout.js.map +1 -1
- package/dist/adaptercloud/components/RatingDisplay.js +3 -3
- package/dist/adaptercloud/components/RatingDisplay.js.map +1 -1
- package/dist/adaptercloud/components/StatusBadge.js +36 -16
- package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
- package/dist/adaptercloud/pages/HomePage.js +242 -231
- package/dist/adaptercloud/pages/HomePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +33 -33
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminDashboard.js +32 -32
- package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +11 -11
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +11 -11
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js +3 -3
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +1 -1
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/CartManagementPage.js +28 -28
- package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/UserManagementPage.js +25 -25
- package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +19 -19
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +7 -7
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +40 -37
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +21 -21
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +24 -24
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +20 -20
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +36 -36
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +25 -25
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/HelpSupportPage.js +43 -43
- package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js +32 -31
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/SettingsPage.js +8 -8
- package/dist/adaptercloud/pages/common/SettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +22 -21
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDetailPage.js +18 -17
- package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +12 -11
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CheckoutPage.js +9 -9
- package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js +30 -30
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +19 -19
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +24 -23
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/FavoritesPage.js +9 -8
- package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +4 -3
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +15 -14
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +10 -9
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/ReviewsPage.js +18 -17
- package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +14 -13
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +32 -32
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +14 -13
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +27 -27
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js +16 -16
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +9 -8
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +12 -12
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +19 -19
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +26 -25
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js +43 -43
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +37 -36
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +34 -34
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +27 -25
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkerOrdersPage.js","names":[],"sources":["../../../../src/adaptercloud/pages/worker/WorkerOrdersPage.tsx"],"sourcesContent":["/**\n * Worker Orders Page\n *\n * Full-featured worker orders page with:\n * - Loading state\n * - 6 stat cards (Today's Tasks, Completed, Pending, Avg Time, Earnings, Rating)\n * - Current Task section with timer, items, customer info, special instructions\n * - Filters bar with 4 dropdowns (Status, Type, Priority, Sort By)\n * - Real-time countdown timer\n * - Payment info per task (amount, COD/Paid status)\n * - Task type badges with icons\n * - Distance info per task\n * - Call Customer and Navigate buttons per task\n *\n * @module adaptercloud/pages/worker\n */\n\nimport { useState, useEffect, useCallback } from 'react';\nimport {\n ClipboardList,\n Package,\n MapPin,\n CheckCircle2,\n PlayCircle,\n ArrowRight,\n Phone,\n Navigation,\n Loader2,\n Truck,\n ChefHat,\n ShoppingBag,\n Star,\n AlertTriangle,\n CreditCard,\n} from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { EmptyState } from '../../components/EmptyState';\nimport { useAdapterCloud } from '../../context/AdapterCloudContext';\nimport { cn } from '../../utils/cn';\nimport { formatCurrency } from '../../utils/formatters';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ninterface TaskItem {\n name: string;\n quantity: number;\n}\n\ninterface TaskAddress {\n addressLine1: string;\n addressLine2?: string;\n landmark?: string;\n city: string;\n pincode: string;\n}\n\ninterface TaskPayment {\n method: string;\n amount: number;\n status: 'pending' | 'completed';\n}\n\ninterface WorkerTask {\n id: string;\n orderId: string;\n cartId: string;\n cartName: string;\n type: 'pickup' | 'delivery' | 'preparation';\n status: 'pending' | 'in_progress' | 'completed';\n priority: 'low' | 'medium' | 'high' | 'urgent';\n customerName: string;\n customerPhone: string;\n items: TaskItem[];\n address?: TaskAddress;\n estimatedTime: string;\n assignedTime: string;\n distance?: number;\n specialInstructions?: string;\n payment: TaskPayment;\n}\n\ninterface TaskFilters {\n status: string;\n type: string;\n priority: string;\n sortBy: string;\n}\n\n// ============================================================================\n// Mock Data\n// ============================================================================\n\nconst mockTasksData: WorkerTask[] = [\n {\n id: 'task-001',\n orderId: 'ORD-2024-001',\n cartId: 'cart-001',\n cartName: 'South Indian Express',\n type: 'delivery',\n status: 'pending',\n priority: 'high',\n customerName: 'Rahul Sharma',\n customerPhone: '+91-98765-43210',\n items: [\n { name: 'Masala Dosa', quantity: 2 },\n { name: 'Filter Coffee', quantity: 2 },\n ],\n address: {\n addressLine1: '123, MG Road',\n addressLine2: 'Near Central Mall',\n landmark: 'Opposite SBI Bank',\n city: 'Bangalore',\n pincode: '560001',\n },\n estimatedTime: new Date(Date.now() + 30 * 60 * 1000).toISOString(),\n assignedTime: new Date(Date.now() - 5 * 60 * 1000).toISOString(),\n distance: 3.5,\n specialInstructions: 'Please call before delivery',\n payment: { method: 'Cash', amount: 295, status: 'pending' },\n },\n {\n id: 'task-002',\n orderId: 'ORD-2024-002',\n cartId: 'cart-001',\n cartName: 'South Indian Express',\n type: 'pickup',\n status: 'in_progress',\n priority: 'medium',\n customerName: 'Priya Patel',\n customerPhone: '+91-98765-43211',\n items: [{ name: 'Idli Sambar', quantity: 3 }],\n estimatedTime: new Date(Date.now() + 15 * 60 * 1000).toISOString(),\n assignedTime: new Date(Date.now() - 10 * 60 * 1000).toISOString(),\n specialInstructions: '',\n payment: { method: 'Online', amount: 198, status: 'completed' },\n },\n {\n id: 'task-003',\n orderId: 'ORD-2024-003',\n cartId: 'cart-002',\n cartName: 'Chaat Corner',\n type: 'preparation',\n status: 'pending',\n priority: 'urgent',\n customerName: 'Amit Kumar',\n customerPhone: '+91-98765-43212',\n items: [\n { name: 'Pani Puri', quantity: 2 },\n { name: 'Bhel Puri', quantity: 1 },\n ],\n estimatedTime: new Date(Date.now() + 20 * 60 * 1000).toISOString(),\n assignedTime: new Date(Date.now() - 2 * 60 * 1000).toISOString(),\n specialInstructions: 'Extra spicy',\n payment: { method: 'UPI', amount: 150, status: 'completed' },\n },\n {\n id: 'task-004',\n orderId: 'ORD-2024-004',\n cartId: 'cart-003',\n cartName: 'Biryani Pot',\n type: 'delivery',\n status: 'completed',\n priority: 'medium',\n customerName: 'Deepa Nair',\n customerPhone: '+91-98765-43213',\n items: [\n { name: 'Chicken Biryani', quantity: 1 },\n { name: 'Raita', quantity: 1 },\n ],\n address: {\n addressLine1: '456, Brigade Road',\n city: 'Bangalore',\n pincode: '560025',\n },\n estimatedTime: new Date(Date.now() - 30 * 60 * 1000).toISOString(),\n assignedTime: new Date(Date.now() - 90 * 60 * 1000).toISOString(),\n distance: 2.1,\n payment: { method: 'Online', amount: 340, status: 'completed' },\n },\n];\n\n// ============================================================================\n// Helpers\n// ============================================================================\n\nfunction formatTimeRemaining(estimatedTime: string): string {\n const now = new Date();\n const target = new Date(estimatedTime);\n const diffInMinutes = Math.floor((target.getTime() - now.getTime()) / (1000 * 60));\n if (diffInMinutes < 0) return 'Overdue';\n if (diffInMinutes < 60) return `${diffInMinutes} min`;\n return `${Math.floor(diffInMinutes / 60)}h ${diffInMinutes % 60}m`;\n}\n\nfunction getTaskTypeConfig(type: WorkerTask['type']) {\n switch (type) {\n case 'delivery':\n return {\n icon: Truck,\n label: 'Delivery',\n style: 'bg-purple-500/20 text-purple-600 dark:text-purple-400',\n };\n case 'pickup':\n return {\n icon: ShoppingBag,\n label: 'Pickup',\n style: 'bg-blue-500/20 text-blue-600 dark:text-blue-400',\n };\n case 'preparation':\n return {\n icon: ChefHat,\n label: 'Preparation',\n style: 'bg-green-500/20 text-green-600 dark:text-green-400',\n };\n default:\n return { icon: Package, label: type, style: 'bg-secondary text-secondary-foreground' };\n }\n}\n\nfunction getPriorityStyle(priority: WorkerTask['priority']): string {\n switch (priority) {\n case 'urgent':\n return 'bg-red-500/20 text-red-600 dark:text-red-400';\n case 'high':\n return 'bg-orange-500/20 text-orange-600 dark:text-orange-400';\n case 'medium':\n return 'bg-yellow-500/20 text-yellow-600 dark:text-yellow-400';\n case 'low':\n return 'bg-green-500/20 text-green-600 dark:text-green-400';\n default:\n return 'bg-secondary text-secondary-foreground';\n }\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport const WorkerOrdersPage = () => {\n const { navigateTo } = useAdapterCloud();\n const [loading, setLoading] = useState(true);\n const [tasks, setTasks] = useState<WorkerTask[]>([]);\n const [currentTask, setCurrentTask] = useState<WorkerTask | null>(null);\n const [filters, setFilters] = useState<TaskFilters>({\n status: '',\n type: '',\n priority: '',\n sortBy: 'priority',\n });\n const [stats, setStats] = useState({\n totalTasks: 0,\n completedToday: 0,\n pendingTasks: 0,\n averageTime: 0,\n earnings: 0,\n rating: 4.8,\n });\n const [, setTick] = useState(0);\n\n // Refresh timer display\n useEffect(() => {\n const interval = setInterval(() => setTick((t) => t + 1), 60000);\n return () => clearInterval(interval);\n }, []);\n\n const loadTasks = useCallback(() => {\n setLoading(true);\n setTimeout(() => {\n let filtered = [...mockTasksData];\n\n if (filters.status) {\n filtered = filtered.filter((t) => t.status === filters.status);\n }\n if (filters.type) {\n filtered = filtered.filter((t) => t.type === filters.type);\n }\n if (filters.priority) {\n filtered = filtered.filter((t) => t.priority === filters.priority);\n }\n\n const priorityWeight: Record<string, number> = { urgent: 0, high: 1, medium: 2, low: 3 };\n switch (filters.sortBy) {\n case 'priority':\n filtered.sort(\n (a, b) => (priorityWeight[a.priority] ?? 4) - (priorityWeight[b.priority] ?? 4)\n );\n break;\n case 'time':\n filtered.sort(\n (a, b) => new Date(a.estimatedTime).getTime() - new Date(b.estimatedTime).getTime()\n );\n break;\n case 'distance':\n filtered.sort((a, b) => (a.distance ?? 999) - (b.distance ?? 999));\n break;\n }\n\n setTasks(filtered);\n const inProgress = mockTasksData.find((t) => t.status === 'in_progress');\n setCurrentTask(inProgress ?? null);\n\n setStats({\n totalTasks: 45,\n completedToday: 12,\n pendingTasks: 3,\n averageTime: 22,\n earnings: 2450,\n rating: 4.8,\n });\n\n setLoading(false);\n }, 600);\n }, [filters]);\n\n useEffect(() => {\n loadTasks();\n }, [loadTasks]);\n\n const handleFilterChange = (key: keyof TaskFilters, value: string) => {\n setFilters((prev) => ({ ...prev, [key]: value }));\n };\n\n const handleStartTask = (taskId: string) => {\n const task = mockTasksData.find((t) => t.id === taskId);\n if (!task) return;\n task.status = 'in_progress';\n setCurrentTask(task);\n loadTasks();\n };\n\n const handleCompleteTask = (taskId: string) => {\n const task = mockTasksData.find((t) => t.id === taskId);\n if (task) task.status = 'completed';\n setCurrentTask(null);\n loadTasks();\n alert('Task completed successfully');\n };\n\n const handleCallCustomer = (phone: string) => {\n window.location.href = `tel:${phone.replace(/\\s/g, '')}`;\n };\n\n const handleNavigateToCustomer = (task: WorkerTask) => {\n if (task.address) {\n const addr = encodeURIComponent(`${task.address.addressLine1}, ${task.address.city}`);\n window.open(`https://maps.google.com?q=${addr}`, '_blank');\n }\n };\n\n if (loading) {\n return (\n <PageLayout title=\"My Orders\" description=\"Manage your assigned orders\">\n <div className=\"flex items-center justify-center py-24\">\n <div className=\"text-center\">\n <Loader2 className=\"h-10 w-10 animate-spin text-text-secondary mx-auto mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading tasks...</p>\n </div>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout title=\"My Orders\" description=\"Manage your assigned orders\">\n <div className=\"space-y-6\">\n {/* Stats Overview */}\n <div className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3\">\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm\">\n <p className=\"text-xs text-text-secondary\">Today's Tasks</p>\n <p className=\"text-2xl font-bold text-text-primary\">{stats.totalTasks}</p>\n </div>\n <div className=\"rounded-lg border border-green-500/20 bg-green-500/5 p-4 shadow-sm\">\n <p className=\"text-xs text-green-600 dark:text-green-400\">Completed</p>\n <p className=\"text-2xl font-bold text-green-600 dark:text-green-400\">\n {stats.completedToday}\n </p>\n </div>\n <div className=\"rounded-lg border border-yellow-500/20 bg-yellow-500/5 p-4 shadow-sm\">\n <p className=\"text-xs text-yellow-600 dark:text-yellow-400\">Pending</p>\n <p className=\"text-2xl font-bold text-yellow-600 dark:text-yellow-400\">\n {stats.pendingTasks}\n </p>\n </div>\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm\">\n <p className=\"text-xs text-text-secondary\">Avg Time</p>\n <p className=\"text-2xl font-bold text-text-primary\">{stats.averageTime} min</p>\n </div>\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm\">\n <p className=\"text-xs text-text-secondary\">Today's Earnings</p>\n <p className=\"text-2xl font-bold text-text-primary\">\n {formatCurrency(stats.earnings, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm\">\n <p className=\"text-xs text-text-secondary\">Rating</p>\n <p className=\"text-2xl font-bold text-text-primary flex items-center gap-1\">\n <Star className=\"h-4 w-4 fill-yellow-400 text-yellow-400\" />\n {stats.rating}\n </p>\n </div>\n </div>\n\n {/* Current Task */}\n {currentTask && (\n <div className=\"rounded-lg border-2 border-blue-500/30 bg-blue-500/5 p-5\">\n <h2 className=\"text-base font-semibold text-blue-600 dark:text-blue-400 mb-4\">\n Current Task\n </h2>\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-4\">\n <div>\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n Order #{currentTask.orderId}\n </h3>\n {(() => {\n const cfg = getTaskTypeConfig(currentTask.type);\n const TypeIcon = cfg.icon;\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium',\n cfg.style\n )}\n >\n <TypeIcon className=\"h-3 w-3\" />\n {cfg.label}\n </span>\n );\n })()}\n <span\n className={cn(\n 'inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize',\n getPriorityStyle(currentTask.priority)\n )}\n >\n {currentTask.priority}\n </span>\n </div>\n <p className=\"text-xs text-text-secondary mt-1\">{currentTask.cartName}</p>\n </div>\n <div className=\"text-right\">\n <p className=\"text-xl font-bold text-blue-600 dark:text-blue-400\">\n {formatTimeRemaining(currentTask.estimatedTime)}\n </p>\n <p className=\"text-xs text-text-secondary\">Time remaining</p>\n </div>\n </div>\n\n {/* Details */}\n <div className=\"border-t border-border-subtle pt-4\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">Customer</p>\n <p className=\"text-sm font-medium text-text-primary\">\n {currentTask.customerName}\n </p>\n {currentTask.address && (\n <p className=\"text-xs text-text-secondary mt-1\">\n {currentTask.address.addressLine1}, {currentTask.address.city}\n </p>\n )}\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">Items</p>\n <div className=\"space-y-0.5\">\n {currentTask.items.map((item, i) => (\n <p key={i} className=\"text-xs text-text-primary\">\n {item.quantity}x {item.name}\n </p>\n ))}\n </div>\n </div>\n </div>\n\n {currentTask.specialInstructions && (\n <div className=\"mt-3 p-3 rounded-md bg-yellow-500/10 border border-yellow-500/20\">\n <p className=\"text-xs font-medium text-yellow-600 dark:text-yellow-400 flex items-center gap-1\">\n <AlertTriangle className=\"h-3 w-3\" />\n Special Instructions:\n </p>\n <p className=\"text-xs text-yellow-700 dark:text-yellow-300 mt-0.5\">\n {currentTask.specialInstructions}\n </p>\n </div>\n )}\n\n <div className=\"flex flex-wrap gap-2 mt-4\">\n <button\n type=\"button\"\n onClick={() => handleCallCustomer(currentTask.customerPhone)}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors\"\n >\n <Phone className=\"h-3.5 w-3.5\" />\n Call Customer\n </button>\n {currentTask.type === 'delivery' && currentTask.address && (\n <button\n type=\"button\"\n onClick={() => handleNavigateToCustomer(currentTask)}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors\"\n >\n <Navigation className=\"h-3.5 w-3.5\" />\n Navigate\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => handleCompleteTask(currentTask.id)}\n className=\"ml-auto inline-flex items-center gap-1.5 rounded-md bg-green-500/10 px-3 py-2 text-xs font-medium text-green-600 dark:text-green-400 hover:bg-green-500/20 transition-colors\"\n >\n <CheckCircle2 className=\"h-3.5 w-3.5\" />\n Complete Task\n </button>\n </div>\n </div>\n </div>\n </div>\n )}\n\n {/* Filters */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm\">\n <div className=\"grid grid-cols-1 md:grid-cols-4 gap-3\">\n <select\n value={filters.status}\n onChange={(e) => handleFilterChange('status', e.target.value)}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-blue-500/40\"\n >\n <option value=\"\">All Tasks</option>\n <option value=\"pending\">Pending Tasks</option>\n <option value=\"in_progress\">In Progress</option>\n <option value=\"completed\">Completed</option>\n </select>\n <select\n value={filters.type}\n onChange={(e) => handleFilterChange('type', e.target.value)}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-blue-500/40\"\n >\n <option value=\"\">All Types</option>\n <option value=\"delivery\">Delivery</option>\n <option value=\"pickup\">Pickup</option>\n <option value=\"preparation\">Preparation</option>\n </select>\n <select\n value={filters.priority}\n onChange={(e) => handleFilterChange('priority', e.target.value)}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-blue-500/40\"\n >\n <option value=\"\">All Priorities</option>\n <option value=\"urgent\">Urgent</option>\n <option value=\"high\">High</option>\n <option value=\"medium\">Medium</option>\n <option value=\"low\">Low</option>\n </select>\n <select\n value={filters.sortBy}\n onChange={(e) => handleFilterChange('sortBy', e.target.value)}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-blue-500/40\"\n >\n <option value=\"priority\">Sort by Priority</option>\n <option value=\"time\">Sort by Time</option>\n <option value=\"distance\">Sort by Distance</option>\n </select>\n </div>\n </div>\n\n {/* Task List */}\n {tasks.length === 0 ? (\n <EmptyState\n icon={<ClipboardList className=\"h-12 w-12\" />}\n title=\"No tasks available\"\n description=\"Check back later for new tasks\"\n />\n ) : (\n <div className=\"space-y-3\">\n {tasks.map((task) => {\n const typeConfig = getTaskTypeConfig(task.type);\n const TypeIcon = typeConfig.icon;\n return (\n <div\n key={task.id}\n className=\"rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm hover:shadow-md transition-shadow\"\n >\n {/* Task Header */}\n <div className=\"flex items-center justify-between mb-3\">\n <div>\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n Order #{task.orderId}\n </h3>\n <span\n className={cn(\n 'inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium',\n typeConfig.style\n )}\n >\n <TypeIcon className=\"h-3 w-3\" />\n {typeConfig.label}\n </span>\n <span\n className={cn(\n 'inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize',\n getPriorityStyle(task.priority)\n )}\n >\n {task.priority}\n </span>\n </div>\n <p className=\"text-xs text-text-secondary mt-1\">\n {task.cartName} · {task.customerName}\n </p>\n </div>\n <div className=\"text-right\">\n <p className=\"text-lg font-bold text-text-primary\">\n {formatCurrency(task.payment.amount, { minimumFractionDigits: 0 })}\n </p>\n <p\n className={cn(\n 'text-xs',\n task.payment.status === 'completed'\n ? 'text-green-600 dark:text-green-400'\n : 'text-yellow-600 dark:text-yellow-400'\n )}\n >\n <span className=\"flex items-center gap-1 justify-end\">\n <CreditCard className=\"h-3 w-3\" />\n {task.payment.status === 'completed' ? 'Paid' : 'COD'}\n </span>\n </p>\n </div>\n </div>\n\n {/* Task Body */}\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-3 mb-3 text-sm\">\n <div>\n <p className=\"text-xs text-text-secondary\">Items</p>\n <div className=\"text-xs text-text-primary\">\n {task.items.map((item, i) => (\n <span key={i}>\n {item.quantity}x {item.name}\n {i < task.items.length - 1 && ', '}\n </span>\n ))}\n </div>\n </div>\n {task.address && (\n <div>\n <p className=\"text-xs text-text-secondary\">Delivery Address</p>\n <p className=\"text-xs text-text-primary\">{task.address.addressLine1}</p>\n </div>\n )}\n <div>\n <p className=\"text-xs text-text-secondary\">Time</p>\n <p\n className={cn(\n 'text-xs font-medium',\n formatTimeRemaining(task.estimatedTime) === 'Overdue'\n ? 'text-red-600 dark:text-red-400'\n : 'text-text-primary'\n )}\n >\n {formatTimeRemaining(task.estimatedTime)}\n </p>\n </div>\n </div>\n\n {/* Task Footer */}\n {task.status === 'pending' && (\n <div className=\"flex items-center flex-wrap gap-2 border-t border-border-subtle pt-3\">\n <button\n type=\"button\"\n onClick={() => handleStartTask(task.id)}\n disabled={currentTask !== null}\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors',\n currentTask !== null\n ? 'bg-bg-sunken text-text-secondary cursor-not-allowed'\n : 'bg-blue-500/10 text-blue-600 dark:text-blue-400 hover:bg-blue-500/20'\n )}\n >\n <PlayCircle className=\"h-3.5 w-3.5\" />\n {currentTask ? 'Complete current first' : 'Start Task'}\n </button>\n <button\n type=\"button\"\n onClick={() => handleCallCustomer(task.customerPhone)}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors\"\n >\n <Phone className=\"h-3.5 w-3.5\" />\n Call\n </button>\n {task.type === 'delivery' && task.distance != null && (\n <span className=\"ml-auto text-xs text-text-secondary flex items-center gap-1\">\n <MapPin className=\"h-3 w-3\" />\n {task.distance} km away\n </span>\n )}\n </div>\n )}\n {task.status === 'in_progress' && task.id !== currentTask?.id && (\n <div className=\"flex items-center gap-2 border-t border-border-subtle pt-3\">\n <button\n type=\"button\"\n onClick={() => handleCompleteTask(task.id)}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-green-500/10 px-3 py-1.5 text-xs font-medium text-green-600 dark:text-green-400 hover:bg-green-500/20 transition-colors\"\n >\n <CheckCircle2 className=\"h-3.5 w-3.5\" />\n Complete\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/worker/task/${task.id}`)}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors\"\n >\n Details\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n )}\n {task.status === 'completed' && (\n <div className=\"flex items-center gap-2 border-t border-border-subtle pt-3\">\n <StatusBadge status=\"completed\" />\n <button\n type=\"button\"\n onClick={() => navigateTo(`/worker/task/${task.id}`)}\n className=\"ml-auto inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors\"\n >\n Details\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n )}\n </div>\n );\n })}\n </div>\n )}\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;AA+FA,IAAM,IAA8B;CAClC;EACE,IAAI;EACJ,SAAS;EACT,QAAQ;EACR,UAAU;EACV,MAAM;EACN,QAAQ;EACR,UAAU;EACV,cAAc;EACd,eAAe;EACf,OAAO,CACL;GAAE,MAAM;GAAe,UAAU;GAAG,EACpC;GAAE,MAAM;GAAiB,UAAU;GAAG,CACvC;EACD,SAAS;GACP,cAAc;GACd,cAAc;GACd,UAAU;GACV,MAAM;GACN,SAAS;GACV;EACD,eAAe,IAAI,KAAK,KAAK,KAAK,GAAG,OAAU,IAAK,CAAC,aAAa;EAClE,+BAAc,IAAI,KAAK,KAAK,KAAK,GAAG,MAAS,IAAK,EAAC,aAAa;EAChE,UAAU;EACV,qBAAqB;EACrB,SAAS;GAAE,QAAQ;GAAQ,QAAQ;GAAK,QAAQ;GAAW;EAC5D;CACD;EACE,IAAI;EACJ,SAAS;EACT,QAAQ;EACR,UAAU;EACV,MAAM;EACN,QAAQ;EACR,UAAU;EACV,cAAc;EACd,eAAe;EACf,OAAO,CAAC;GAAE,MAAM;GAAe,UAAU;GAAG,CAAC;EAC7C,eAAe,IAAI,KAA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S,cAAc,EAAK,YAAY,QAC5C,kBAAC,QAAD;WAAM,WAAU;qBAAhB;YACE,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA;YAC7B,EAAK;YAAS;YACV;;UAEL;;QAEP,EAAK,WAAW,iBAAiB,EAAK,OAAO,GAAa,MACzD,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,UAAD;UACE,MAAK;UACL,eAAe,EAAmB,EAAK,GAAG;UAC1C,WAAU;oBAHZ,CAKE,kBAAC,GAAD,EAAc,WAAU,eAAgB,CAAA,EAAA,WAEjC;aACT,kBAAC,UAAD;UACE,MAAK;UACL,eAAe,EAAW,gBAAgB,EAAK,KAAK;UACpD,WAAU;oBAHZ,CAIC,WAEC,kBAAC,GAAD,EAAY,WAAU,eAAgB,CAAA,CAC/B;YACL;;QAEP,EAAK,WAAW,eACf,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,GAAD,EAAa,QAAO,aAAc,CAAA,EAClC,kBAAC,UAAD;UACE,MAAK;UACL,eAAe,EAAW,gBAAgB,EAAK,KAAK;UACpD,WAAU;oBAHZ,CAIC,WAEC,kBAAC,GAAD,EAAY,WAAU,eAAgB,CAAA,CAC/B;YACL;;QAEJ;SAxJC,EAAK,GAwJN;OAER;KACE,CAAA;IAEJ;;EACK,CAAA"}
|
|
1
|
+
{"version":3,"file":"WorkerOrdersPage.js","names":[],"sources":["../../../../src/adaptercloud/pages/worker/WorkerOrdersPage.tsx"],"sourcesContent":["/**\n * Worker Orders Page\n *\n * Full-featured worker orders page with:\n * - Loading state\n * - 6 stat cards (Today's Tasks, Completed, Pending, Avg Time, Earnings, Rating)\n * - Current Task section with timer, items, customer info, special instructions\n * - Filters bar with 4 dropdowns (Status, Type, Priority, Sort By)\n * - Real-time countdown timer\n * - Payment info per task (amount, COD/Paid status)\n * - Task type badges with icons\n * - Distance info per task\n * - Call Customer and Navigate buttons per task\n *\n * @module adaptercloud/pages/worker\n */\n\nimport { useState, useEffect, useCallback } from'react';\nimport {\n ClipboardList,\n Package,\n MapPin,\n CheckCircle2,\n PlayCircle,\n ArrowRight,\n Phone,\n Navigation,\n Loader2,\n Truck,\n ChefHat,\n ShoppingBag,\n Star,\n AlertTriangle,\n CreditCard,\n} from'lucide-react';\nimport { PageLayout } from'../../components/PageLayout';\nimport { StatusBadge } from'../../components/StatusBadge';\nimport { EmptyState } from'../../components/EmptyState';\nimport { useAdapterCloud } from'../../context/AdapterCloudContext';\nimport { cn } from'../../utils/cn';\nimport { formatCurrency } from'../../utils/formatters';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ninterface TaskItem {\n name: string;\n quantity: number;\n}\n\ninterface TaskAddress {\n addressLine1: string;\n addressLine2?: string;\n landmark?: string;\n city: string;\n pincode: string;\n}\n\ninterface TaskPayment {\n method: string;\n amount: number;\n status: 'pending' | 'completed';\n}\n\ninterface WorkerTask {\n id: string;\n orderId: string;\n cartId: string;\n cartName: string;\n type: 'pickup' | 'delivery' | 'preparation';\n status: 'pending' | 'in_progress' | 'completed';\n priority: 'low' | 'medium' | 'high' | 'urgent';\n customerName: string;\n customerPhone: string;\n items: TaskItem[];\n address?: TaskAddress;\n estimatedTime: string;\n assignedTime: string;\n distance?: number;\n specialInstructions?: string;\n payment: TaskPayment;\n}\n\ninterface TaskFilters {\n status: string;\n type: string;\n priority: string;\n sortBy: string;\n}\n\n// ============================================================================\n// Mock Data\n// ============================================================================\n\nconst mockTasksData: WorkerTask[] = [\n {\n id: 'task-001',\n orderId: 'ORD-2024-001',\n cartId: 'cart-001',\n cartName: 'South Indian Express',\n type: 'delivery',\n status: 'pending',\n priority: 'high',\n customerName: 'Rahul Sharma',\n customerPhone: '+91-98765-43210',\n items: [\n { name: 'Masala Dosa', quantity: 2 },\n { name: 'Filter Coffee', quantity: 2 },\n ],\n address: {\n addressLine1: '123, MG Road',\n addressLine2: 'Near Central Mall',\n landmark: 'Opposite SBI Bank',\n city: 'Bangalore',\n pincode: '560001',\n },\n estimatedTime: new Date(Date.now() + 30 * 60 * 1000).toISOString(),\n assignedTime: new Date(Date.now() - 5 * 60 * 1000).toISOString(),\n distance: 3.5,\n specialInstructions: 'Please call before delivery',\n payment: { method: 'Cash', amount: 295, status: 'pending' },\n },\n {\n id: 'task-002',\n orderId: 'ORD-2024-002',\n cartId: 'cart-001',\n cartName: 'South Indian Express',\n type: 'pickup',\n status: 'in_progress',\n priority: 'medium',\n customerName: 'Priya Patel',\n customerPhone: '+91-98765-43211',\n items: [{ name: 'Idli Sambar', quantity: 3 }],\n estimatedTime: new Date(Date.now() + 15 * 60 * 1000).toISOString(),\n assignedTime: new Date(Date.now() - 10 * 60 * 1000).toISOString(),\n specialInstructions: '',\n payment: { method: 'Online', amount: 198, status: 'completed' },\n },\n {\n id: 'task-003',\n orderId: 'ORD-2024-003',\n cartId: 'cart-002',\n cartName: 'Chaat Corner',\n type: 'preparation',\n status: 'pending',\n priority: 'urgent',\n customerName: 'Amit Kumar',\n customerPhone: '+91-98765-43212',\n items: [\n { name: 'Pani Puri', quantity: 2 },\n { name: 'Bhel Puri', quantity: 1 },\n ],\n estimatedTime: new Date(Date.now() + 20 * 60 * 1000).toISOString(),\n assignedTime: new Date(Date.now() - 2 * 60 * 1000).toISOString(),\n specialInstructions: 'Extra spicy',\n payment: { method: 'UPI', amount: 150, status: 'completed' },\n },\n {\n id: 'task-004',\n orderId: 'ORD-2024-004',\n cartId: 'cart-003',\n cartName: 'Biryani Pot',\n type: 'delivery',\n status: 'completed',\n priority: 'medium',\n customerName: 'Deepa Nair',\n customerPhone: '+91-98765-43213',\n items: [\n { name: 'Chicken Biryani', quantity: 1 },\n { name: 'Raita', quantity: 1 },\n ],\n address: {\n addressLine1: '456, Brigade Road',\n city: 'Bangalore',\n pincode: '560025',\n },\n estimatedTime: new Date(Date.now() - 30 * 60 * 1000).toISOString(),\n assignedTime: new Date(Date.now() - 90 * 60 * 1000).toISOString(),\n distance: 2.1,\n payment: { method: 'Online', amount: 340, status: 'completed' },\n },\n];\n\n// ============================================================================\n// Helpers\n// ============================================================================\n\nfunction formatTimeRemaining(estimatedTime: string): string {\n const now = new Date();\n const target = new Date(estimatedTime);\n const diffInMinutes = Math.floor((target.getTime() - now.getTime()) / (1000 * 60));\n if (diffInMinutes < 0) return'Overdue';\n if (diffInMinutes < 60) return`${diffInMinutes} min`;\n return`${Math.floor(diffInMinutes / 60)}h ${diffInMinutes % 60}m`;\n}\n\nfunction getTaskTypeConfig(type: WorkerTask['type']) {\n switch (type) {\n case'delivery':\n return {\n icon: Truck,\n label: 'Delivery',\n style: 'bg-accent-purple-subtle/20 text-accent-purple',\n };\n case'pickup':\n return {\n icon: ShoppingBag,\n label: 'Pickup',\n style: 'bg-accent-blue-subtle/20 text-accent-blue',\n };\n case'preparation':\n return {\n icon: ChefHat,\n label: 'Preparation',\n style: 'bg-status-success-bg-subtle/20 text-status-success-text',\n };\n default:\n return { icon: Package, label: type, style: 'bg-secondary text-secondary-foreground' };\n }\n}\n\nfunction getPriorityStyle(priority: WorkerTask['priority']): string {\n switch (priority) {\n case'urgent':\n return'bg-status-error-bg-subtle/20 text-status-error-text';\n case'high':\n return'bg-accent-orange-subtle/20 text-accent-orange';\n case'medium':\n return'bg-status-warning-bg-subtle/20 text-status-warning-text';\n case'low':\n return'bg-status-success-bg-subtle/20 text-status-success-text';\n default:\n return'bg-secondary text-secondary-foreground';\n }\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport const WorkerOrdersPage = () => {\n const { navigateTo } = useAdapterCloud();\n const [loading, setLoading] = useState(true);\n const [tasks, setTasks] = useState<WorkerTask[]>([]);\n const [currentTask, setCurrentTask] = useState<WorkerTask | null>(null);\n const [filters, setFilters] = useState<TaskFilters>({\n status: '',\n type: '',\n priority: '',\n sortBy: 'priority',\n });\n const [stats, setStats] = useState({\n totalTasks: 0,\n completedToday: 0,\n pendingTasks: 0,\n averageTime: 0,\n earnings: 0,\n rating: 4.8,\n });\n const [, setTick] = useState(0);\n\n // Refresh timer display\n useEffect(() => {\n const interval = setInterval(() => setTick((t) => t + 1), 60000);\n return () => clearInterval(interval);\n }, []);\n\n const loadTasks = useCallback(() => {\n setLoading(true);\n setTimeout(() => {\n let filtered = [...mockTasksData];\n\n if (filters.status) {\n filtered = filtered.filter((t) => t.status === filters.status);\n }\n if (filters.type) {\n filtered = filtered.filter((t) => t.type === filters.type);\n }\n if (filters.priority) {\n filtered = filtered.filter((t) => t.priority === filters.priority);\n }\n\n const priorityWeight: Record<string, number> = { urgent: 0, high: 1, medium: 2, low: 3 };\n switch (filters.sortBy) {\n case'priority':\n filtered.sort(\n (a, b) => (priorityWeight[a.priority] ?? 4) - (priorityWeight[b.priority] ?? 4)\n );\n break;\n case'time':\n filtered.sort(\n (a, b) => new Date(a.estimatedTime).getTime() - new Date(b.estimatedTime).getTime()\n );\n break;\n case'distance':\n filtered.sort((a, b) => (a.distance ?? 999) - (b.distance ?? 999));\n break;\n }\n\n setTasks(filtered);\n const inProgress = mockTasksData.find((t) => t.status === 'in_progress');\n setCurrentTask(inProgress ?? null);\n\n setStats({\n totalTasks: 45,\n completedToday: 12,\n pendingTasks: 3,\n averageTime: 22,\n earnings: 2450,\n rating: 4.8,\n });\n\n setLoading(false);\n }, 600);\n }, [filters]);\n\n useEffect(() => {\n loadTasks();\n }, [loadTasks]);\n\n const handleFilterChange = (key: keyof TaskFilters, value: string) => {\n setFilters((prev) => ({ ...prev, [key]: value }));\n };\n\n const handleStartTask = (taskId: string) => {\n const task = mockTasksData.find((t) => t.id === taskId);\n if (!task) return;\n task.status = 'in_progress';\n setCurrentTask(task);\n loadTasks();\n };\n\n const handleCompleteTask = (taskId: string) => {\n const task = mockTasksData.find((t) => t.id === taskId);\n if (task) task.status = 'completed';\n setCurrentTask(null);\n loadTasks();\n alert('Task completed successfully');\n };\n\n const handleCallCustomer = (phone: string) => {\n window.location.href = `tel:${phone.replace(/\\s/g, '')}`;\n };\n\n const handleNavigateToCustomer = (task: WorkerTask) => {\n if (task.address) {\n const addr = encodeURIComponent(`${task.address.addressLine1}, ${task.address.city}`);\n window.open(`https://maps.google.com?q=${addr}`, '_blank');\n }\n };\n\n if (loading) {\n return (\n <PageLayout title=\"My Orders\" description=\"Manage your assigned orders\">\n <div className=\"flex items-center justify-center py-24\">\n <div className=\"text-center\">\n <Loader2 className=\"h-10 w-10 animate-spin text-text-secondary mx-auto mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading tasks...</p>\n </div>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout title=\"My Orders\" description=\"Manage your assigned orders\">\n <div className=\"space-y-6\">\n {/* Stats Overview */}\n <div className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3\">\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\">\n <p className=\"text-xs text-text-secondary\">Today's Tasks</p>\n <p className=\"text-2xl font-bold text-text-primary\">{stats.totalTasks}</p>\n </div>\n <div className=\"rounded-lg border border-status-success-border/20 bg-status-success-bg-subtle/5 p-4 shadow-sm\">\n <p className=\"text-xs text-status-success-text\">Completed</p>\n <p className=\"text-2xl font-bold text-status-success-text\">\n {stats.completedToday}\n </p>\n </div>\n <div className=\"rounded-lg border border-status-warning-border/20 bg-status-warning-bg-subtle/5 p-4 shadow-sm\">\n <p className=\"text-xs text-status-warning-text\">Pending</p>\n <p className=\"text-2xl font-bold text-status-warning-text\">\n {stats.pendingTasks}\n </p>\n </div>\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\">\n <p className=\"text-xs text-text-secondary\">Avg Time</p>\n <p className=\"text-2xl font-bold text-text-primary\">{stats.averageTime} min</p>\n </div>\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\">\n <p className=\"text-xs text-text-secondary\">Today's Earnings</p>\n <p className=\"text-2xl font-bold text-text-primary\">\n {formatCurrency(stats.earnings, { minimumFractionDigits: 0 })}\n </p>\n </div>\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\">\n <p className=\"text-xs text-text-secondary\">Rating</p>\n <p className=\"text-2xl font-bold text-text-primary flex items-center gap-1\">\n <Star className=\"h-4 w-4 fill-status-warning-text text-status-warning-text\" />\n {stats.rating}\n </p>\n </div>\n </div>\n\n {/* Current Task */}\n {currentTask && (\n <div className=\"rounded-lg border-2 border-accent-blue-subtle/30 bg-accent-blue-subtle/5 p-5\">\n <h2 className=\"text-base font-semibold text-accent-blue mb-4\">\n Current Task\n </h2>\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-4\">\n <div>\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n Order #{currentTask.orderId}\n </h3>\n {(() => {\n const cfg = getTaskTypeConfig(currentTask.type);\n const TypeIcon = cfg.icon;\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium',\n cfg.style\n )}\n >\n <TypeIcon className=\"h-3 w-3\" />\n {cfg.label}\n </span>\n );\n })()}\n <span\n className={cn(\n 'inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize',\n getPriorityStyle(currentTask.priority)\n )}\n >\n {currentTask.priority}\n </span>\n </div>\n <p className=\"text-xs text-text-secondary mt-1\">{currentTask.cartName}</p>\n </div>\n <div className=\"text-right\">\n <p className=\"text-xl font-bold text-accent-blue\">\n {formatTimeRemaining(currentTask.estimatedTime)}\n </p>\n <p className=\"text-xs text-text-secondary\">Time remaining</p>\n </div>\n </div>\n\n {/* Details */}\n <div className=\"border-t border-border-subtle pt-4\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">Customer</p>\n <p className=\"text-sm font-medium text-text-primary\">\n {currentTask.customerName}\n </p>\n {currentTask.address && (\n <p className=\"text-xs text-text-secondary mt-1\">\n {currentTask.address.addressLine1}, {currentTask.address.city}\n </p>\n )}\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">Items</p>\n <div className=\"space-y-0.5\">\n {currentTask.items.map((item, i) => (\n <p key={i} className=\"text-xs text-text-primary\">\n {item.quantity}x {item.name}\n </p>\n ))}\n </div>\n </div>\n </div>\n\n {currentTask.specialInstructions && (\n <div className=\"mt-3 p-3 rounded-md bg-status-warning-bg-subtle/10 border border-status-warning-border/20\">\n <p className=\"text-xs font-medium text-status-warning-text flex items-center gap-1\">\n <AlertTriangle className=\"h-3 w-3\" />\n Special Instructions:\n </p>\n <p className=\"text-xs text-status-warning-text mt-0.5\">\n {currentTask.specialInstructions}\n </p>\n </div>\n )}\n\n <div className=\"flex flex-wrap gap-2 mt-4\">\n <button\n type=\"button\"\n onClick={() => handleCallCustomer(currentTask.customerPhone)}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors\"\n >\n <Phone className=\"h-3.5 w-3.5\" />\n Call Customer\n </button>\n {currentTask.type === 'delivery' && currentTask.address && (\n <button\n type=\"button\"\n onClick={() => handleNavigateToCustomer(currentTask)}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors\"\n >\n <Navigation className=\"h-3.5 w-3.5\" />\n Navigate\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => handleCompleteTask(currentTask.id)}\n className=\"ml-auto inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle/10 px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors\"\n >\n <CheckCircle2 className=\"h-3.5 w-3.5\" />\n Complete Task\n </button>\n </div>\n </div>\n </div>\n </div>\n )}\n\n {/* Filters */}\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop\">\n <div className=\"grid grid-cols-1 md:grid-cols-4 gap-3\">\n <select\n value={filters.status}\n onChange={(e) => handleFilterChange('status', e.target.value)}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40\"\n >\n <option value=\"\">All Tasks</option>\n <option value=\"pending\">Pending Tasks</option>\n <option value=\"in_progress\">In Progress</option>\n <option value=\"completed\">Completed</option>\n </select>\n <select\n value={filters.type}\n onChange={(e) => handleFilterChange('type', e.target.value)}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40\"\n >\n <option value=\"\">All Types</option>\n <option value=\"delivery\">Delivery</option>\n <option value=\"pickup\">Pickup</option>\n <option value=\"preparation\">Preparation</option>\n </select>\n <select\n value={filters.priority}\n onChange={(e) => handleFilterChange('priority', e.target.value)}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40\"\n >\n <option value=\"\">All Priorities</option>\n <option value=\"urgent\">Urgent</option>\n <option value=\"high\">High</option>\n <option value=\"medium\">Medium</option>\n <option value=\"low\">Low</option>\n </select>\n <select\n value={filters.sortBy}\n onChange={(e) => handleFilterChange('sortBy', e.target.value)}\n className=\"w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40\"\n >\n <option value=\"priority\">Sort by Priority</option>\n <option value=\"time\">Sort by Time</option>\n <option value=\"distance\">Sort by Distance</option>\n </select>\n </div>\n </div>\n\n {/* Task List */}\n {tasks.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n icon={<ClipboardList className=\"h-12 w-12\" />}\n title=\"No tasks available\"\n description=\"Check back later for new tasks\"\n />\n ) : (\n <div className=\"space-y-3\">\n {tasks.map((task) => {\n const typeConfig = getTaskTypeConfig(task.type);\n const TypeIcon = typeConfig.icon;\n return (\n <div\n key={task.id}\n className=\"rounded-lg border border-border-seam bg-bg-surface p-5 hover:shadow-md transition-shadow bg-gloss-card shadow-pop\"\n >\n {/* Task Header */}\n <div className=\"flex items-center justify-between mb-3\">\n <div>\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n Order #{task.orderId}\n </h3>\n <span\n className={cn(\n 'inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium',\n typeConfig.style\n )}\n >\n <TypeIcon className=\"h-3 w-3\" />\n {typeConfig.label}\n </span>\n <span\n className={cn(\n 'inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize',\n getPriorityStyle(task.priority)\n )}\n >\n {task.priority}\n </span>\n </div>\n <p className=\"text-xs text-text-secondary mt-1\">\n {task.cartName} · {task.customerName}\n </p>\n </div>\n <div className=\"text-right\">\n <p className=\"text-lg font-bold text-text-primary\">\n {formatCurrency(task.payment.amount, { minimumFractionDigits: 0 })}\n </p>\n <p\n className={cn(\n 'text-xs',\n task.payment.status === 'completed'\n ? 'text-status-success-text'\n : 'text-status-warning-text'\n )}\n >\n <span className=\"flex items-center gap-1 justify-end\">\n <CreditCard className=\"h-3 w-3\" />\n {task.payment.status === 'completed' ? 'Paid' : 'COD'}\n </span>\n </p>\n </div>\n </div>\n\n {/* Task Body */}\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-3 mb-3 text-sm\">\n <div>\n <p className=\"text-xs text-text-secondary\">Items</p>\n <div className=\"text-xs text-text-primary\">\n {task.items.map((item, i) => (\n <span key={i}>\n {item.quantity}x {item.name}\n {i < task.items.length - 1 && ', '}\n </span>\n ))}\n </div>\n </div>\n {task.address && (\n <div>\n <p className=\"text-xs text-text-secondary\">Delivery Address</p>\n <p className=\"text-xs text-text-primary\">{task.address.addressLine1}</p>\n </div>\n )}\n <div>\n <p className=\"text-xs text-text-secondary\">Time</p>\n <p\n className={cn(\n 'text-xs font-medium',\n formatTimeRemaining(task.estimatedTime) === 'Overdue'\n ? 'text-status-error-text'\n : 'text-text-primary'\n )}\n >\n {formatTimeRemaining(task.estimatedTime)}\n </p>\n </div>\n </div>\n\n {/* Task Footer */}\n {task.status === 'pending' && (\n <div className=\"flex items-center flex-wrap gap-2 border-t border-border-subtle pt-3\">\n <button\n type=\"button\"\n onClick={() => handleStartTask(task.id)}\n disabled={currentTask !== null}\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors',\n currentTask !== null\n ? 'bg-bg-sunken text-text-secondary cursor-not-allowed'\n : 'bg-accent-blue-subtle/10 text-accent-blue hover:bg-accent-blue-subtle/20'\n )}\n >\n <PlayCircle className=\"h-3.5 w-3.5\" />\n {currentTask ? 'Complete current first' : 'Start Task'}\n </button>\n <button\n type=\"button\"\n onClick={() => handleCallCustomer(task.customerPhone)}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors\"\n >\n <Phone className=\"h-3.5 w-3.5\" />\n Call\n </button>\n {task.type === 'delivery' && task.distance != null && (\n <span className=\"ml-auto text-xs text-text-secondary flex items-center gap-1\">\n <MapPin className=\"h-3 w-3\" />\n {task.distance} km away\n </span>\n )}\n </div>\n )}\n {task.status === 'in_progress' && task.id !== currentTask?.id && (\n <div className=\"flex items-center gap-2 border-t border-border-subtle pt-3\">\n <button\n type=\"button\"\n onClick={() => handleCompleteTask(task.id)}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle/10 px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors\"\n >\n <CheckCircle2 className=\"h-3.5 w-3.5\" />\n Complete\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo(`/worker/task/${task.id}`)}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors\"\n >\n Details\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n )}\n {task.status === 'completed' && (\n <div className=\"flex items-center gap-2 border-t border-border-subtle pt-3\">\n <StatusBadge status=\"completed\" />\n <button\n type=\"button\"\n onClick={() => navigateTo(`/worker/task/${task.id}`)}\n className=\"ml-auto inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors\"\n >\n Details\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n )}\n </div>\n );\n })}\n </div>\n )}\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;AA+FA,IAAM,IAA8B;CAClC;EACE,IAAI;EACJ,SAAS;EACT,QAAQ;EACR,UAAU;EACV,MAAM;EACN,QAAQ;EACR,UAAU;EACV,cAAc;EACd,eAAe;EACf,OAAO,CACL;GAAE,MAAM;GAAe,UAAU;GAAG,EACpC;GAAE,MAAM;GAAiB,UAAU;GAAG,CACvC;EACD,SAAS;GACP,cAAc;GACd,cAAc;GACd,UAAU;GACV,MAAM;GACN,SAAS;GACV;EACD,eAAe,IAAI,KAAK,KAAK,KAAK,GAAG,OAAU,IAAK,CAAC,aAAa;EAClE,+BAAc,IAAI,KAAK,KAAK,KAAK,GAAG,MAAS,IAAK,EAAC,aAAa;EAChE,UAAU;EACV,qBAAqB;EACrB,SAAS;GAAE,QAAQ;GAAQ,QAAQ;GAAK,QAAQ;GAAW;EAC5D;CACD;EACE,IAAI;EACJ,SAAS;EACT,QAAQ;EACR,UAAU;EACV,MAAM;EACN,QAAQ;EACR,UAAU;EACV,cAAc;EACd,eAAe;EACf,OAAO,CAAC;GAAE,MAAM;GAAe,UAAU;GAAG,CAAC;EAC7C,eAAe,IAAI,KAAK,KAAK,KAAK,GAAG,MAAU,IAAK,CAAC,aAAa;EAClE,+BAAc,IAAI,KAAK,KAAK,KAAK,GAAG,MAAU,IAAK,EAAC,aAAa;EACjE,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YAC7B,EAAK;YAAS;YACV;;UAEL;;QAEP,EAAK,WAAW,iBAAiB,EAAK,OAAO,GAAa,MACzD,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,UAAD;UACE,MAAK;UACL,eAAe,EAAmB,EAAK,GAAG;UAC1C,WAAU;oBAHZ,CAKE,kBAAC,GAAD,EAAc,WAAU,eAAgB,CAAA,EAAA,WAEjC;aACT,kBAAC,UAAD;UACE,MAAK;UACL,eAAe,EAAW,gBAAgB,EAAK,KAAK;UACpD,WAAU;oBAHZ,CAIC,WAEC,kBAAC,GAAD,EAAY,WAAU,eAAgB,CAAA,CAC/B;YACL;;QAEP,EAAK,WAAW,eACf,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,GAAD,EAAa,QAAO,aAAc,CAAA,EAClC,kBAAC,UAAD;UACE,MAAK;UACL,eAAe,EAAW,gBAAgB,EAAK,KAAK;UACpD,WAAU;oBAHZ,CAIC,WAEC,kBAAC,GAAD,EAAY,WAAU,eAAgB,CAAA,CAC/B;YACL;;QAEJ;SAxJC,EAAK,GAwJN;OAER;KACE,CAAA;IAEJ;;EACK,CAAA"}
|
|
@@ -137,7 +137,7 @@ var S = [
|
|
|
137
137
|
type: "button",
|
|
138
138
|
onClick: j,
|
|
139
139
|
disabled: w,
|
|
140
|
-
className: "inline-flex items-center gap-2 rounded-md bg-blue-
|
|
140
|
+
className: "inline-flex items-center gap-2 rounded-md bg-accent-blue-subtle/10 px-3 py-2 text-sm font-medium text-accent-blue hover:bg-accent-blue-subtle/20 transition-colors disabled:opacity-50",
|
|
141
141
|
children: w ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(f, { className: "h-4 w-4 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(h, { className: "h-4 w-4" }), "Save Changes"] })
|
|
142
142
|
})] }) : /* @__PURE__ */ x("button", {
|
|
143
143
|
type: "button",
|
|
@@ -151,7 +151,7 @@ var S = [
|
|
|
151
151
|
children: [/* @__PURE__ */ x("div", {
|
|
152
152
|
className: "lg:col-span-1 space-y-4",
|
|
153
153
|
children: [/* @__PURE__ */ x("div", {
|
|
154
|
-
className: "rounded-lg border border-border-
|
|
154
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-5 text-center bg-gloss-card shadow-pop",
|
|
155
155
|
children: [
|
|
156
156
|
/* @__PURE__ */ x("div", {
|
|
157
157
|
className: "relative inline-block",
|
|
@@ -166,7 +166,7 @@ var S = [
|
|
|
166
166
|
children: /* @__PURE__ */ b(_, { className: "h-10 w-10" })
|
|
167
167
|
})
|
|
168
168
|
}), p && /* @__PURE__ */ x("label", {
|
|
169
|
-
className: "absolute bottom-0 right-0 flex h-7 w-7 items-center justify-center rounded-full bg-blue-
|
|
169
|
+
className: "absolute bottom-0 right-0 flex h-7 w-7 items-center justify-center rounded-full bg-accent-blue-subtle/20 text-accent-blue cursor-pointer hover:bg-accent-blue-subtle/30 transition-colors",
|
|
170
170
|
children: [/* @__PURE__ */ b(l, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ b("input", {
|
|
171
171
|
type: "file",
|
|
172
172
|
accept: "image/*",
|
|
@@ -199,7 +199,7 @@ var S = [
|
|
|
199
199
|
return /* @__PURE__ */ x("button", {
|
|
200
200
|
type: "button",
|
|
201
201
|
onClick: () => d(e.id),
|
|
202
|
-
className: t("w-full flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors", c === e.id ? "bg-blue-
|
|
202
|
+
className: t("w-full flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors", c === e.id ? "bg-accent-blue-subtle/10 text-accent-blue" : "bg-bg-surface text-text-primary hover:bg-bg-sunken"),
|
|
203
203
|
children: [/* @__PURE__ */ b(n, { className: "h-4 w-4" }), e.label]
|
|
204
204
|
}, e.id);
|
|
205
205
|
})
|
|
@@ -207,7 +207,7 @@ var S = [
|
|
|
207
207
|
}), /* @__PURE__ */ b("div", {
|
|
208
208
|
className: "lg:col-span-3",
|
|
209
209
|
children: /* @__PURE__ */ x("div", {
|
|
210
|
-
className: "rounded-lg border border-border-
|
|
210
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
|
|
211
211
|
children: [
|
|
212
212
|
c === "personal" && /* @__PURE__ */ x("div", { children: [
|
|
213
213
|
/* @__PURE__ */ b("h2", {
|
|
@@ -225,7 +225,7 @@ var S = [
|
|
|
225
225
|
value: E.firstName,
|
|
226
226
|
onChange: (e) => A("firstName", e.target.value),
|
|
227
227
|
disabled: !p,
|
|
228
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
228
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
229
229
|
})] }),
|
|
230
230
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
231
231
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
@@ -235,7 +235,7 @@ var S = [
|
|
|
235
235
|
value: E.lastName,
|
|
236
236
|
onChange: (e) => A("lastName", e.target.value),
|
|
237
237
|
disabled: !p,
|
|
238
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
238
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
239
239
|
})] }),
|
|
240
240
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
241
241
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
@@ -245,7 +245,7 @@ var S = [
|
|
|
245
245
|
value: E.email,
|
|
246
246
|
onChange: (e) => A("email", e.target.value),
|
|
247
247
|
disabled: !p,
|
|
248
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
248
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
249
249
|
})] }),
|
|
250
250
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
251
251
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
@@ -255,7 +255,7 @@ var S = [
|
|
|
255
255
|
value: E.phone,
|
|
256
256
|
onChange: (e) => A("phone", e.target.value),
|
|
257
257
|
disabled: !p,
|
|
258
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
258
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
259
259
|
})] }),
|
|
260
260
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
261
261
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
@@ -265,7 +265,7 @@ var S = [
|
|
|
265
265
|
value: E.dateOfBirth,
|
|
266
266
|
onChange: (e) => A("dateOfBirth", e.target.value),
|
|
267
267
|
disabled: !p,
|
|
268
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
268
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
269
269
|
})] })
|
|
270
270
|
]
|
|
271
271
|
}),
|
|
@@ -285,7 +285,7 @@ var S = [
|
|
|
285
285
|
value: E.emergencyContactName,
|
|
286
286
|
onChange: (e) => A("emergencyContactName", e.target.value),
|
|
287
287
|
disabled: !p,
|
|
288
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
288
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
289
289
|
})] }),
|
|
290
290
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
291
291
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
@@ -295,7 +295,7 @@ var S = [
|
|
|
295
295
|
value: E.emergencyContactPhone,
|
|
296
296
|
onChange: (e) => A("emergencyContactPhone", e.target.value),
|
|
297
297
|
disabled: !p,
|
|
298
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
298
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
299
299
|
})] }),
|
|
300
300
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
301
301
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
@@ -305,7 +305,7 @@ var S = [
|
|
|
305
305
|
value: E.emergencyContactRelation,
|
|
306
306
|
onChange: (e) => A("emergencyContactRelation", e.target.value),
|
|
307
307
|
disabled: !p,
|
|
308
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
308
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
309
309
|
})] })
|
|
310
310
|
]
|
|
311
311
|
})]
|
|
@@ -381,7 +381,7 @@ var S = [
|
|
|
381
381
|
/* @__PURE__ */ x("div", {
|
|
382
382
|
className: "rounded-lg bg-bg-sunken/50 p-4 text-center",
|
|
383
383
|
children: [/* @__PURE__ */ b("p", {
|
|
384
|
-
className: "text-2xl font-bold text-
|
|
384
|
+
className: "text-2xl font-bold text-accent-blue",
|
|
385
385
|
children: r.totalDeliveries
|
|
386
386
|
}), /* @__PURE__ */ b("p", {
|
|
387
387
|
className: "text-xs text-text-secondary",
|
|
@@ -391,7 +391,7 @@ var S = [
|
|
|
391
391
|
/* @__PURE__ */ x("div", {
|
|
392
392
|
className: "rounded-lg bg-bg-sunken/50 p-4 text-center",
|
|
393
393
|
children: [/* @__PURE__ */ b("p", {
|
|
394
|
-
className: "text-2xl font-bold text-
|
|
394
|
+
className: "text-2xl font-bold text-status-success-text",
|
|
395
395
|
children: r.averageRating
|
|
396
396
|
}), /* @__PURE__ */ b("p", {
|
|
397
397
|
className: "text-xs text-text-secondary",
|
|
@@ -401,7 +401,7 @@ var S = [
|
|
|
401
401
|
/* @__PURE__ */ x("div", {
|
|
402
402
|
className: "rounded-lg bg-bg-sunken/50 p-4 text-center",
|
|
403
403
|
children: [/* @__PURE__ */ x("p", {
|
|
404
|
-
className: "text-2xl font-bold text-
|
|
404
|
+
className: "text-2xl font-bold text-accent-blue",
|
|
405
405
|
children: [r.completionRate, "%"]
|
|
406
406
|
}), /* @__PURE__ */ b("p", {
|
|
407
407
|
className: "text-xs text-text-secondary",
|
|
@@ -432,7 +432,7 @@ var S = [
|
|
|
432
432
|
value: E.currentAddress,
|
|
433
433
|
onChange: (e) => A("currentAddress", e.target.value),
|
|
434
434
|
disabled: !p,
|
|
435
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
435
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40 resize-none"
|
|
436
436
|
})]
|
|
437
437
|
}),
|
|
438
438
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
@@ -443,7 +443,7 @@ var S = [
|
|
|
443
443
|
value: E.city,
|
|
444
444
|
onChange: (e) => A("city", e.target.value),
|
|
445
445
|
disabled: !p,
|
|
446
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
446
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
447
447
|
})] }),
|
|
448
448
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
449
449
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
@@ -453,7 +453,7 @@ var S = [
|
|
|
453
453
|
value: E.state,
|
|
454
454
|
onChange: (e) => A("state", e.target.value),
|
|
455
455
|
disabled: !p,
|
|
456
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
456
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
457
457
|
})] }),
|
|
458
458
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
459
459
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
@@ -463,7 +463,7 @@ var S = [
|
|
|
463
463
|
value: E.pincode,
|
|
464
464
|
onChange: (e) => A("pincode", e.target.value),
|
|
465
465
|
disabled: !p,
|
|
466
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
466
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
467
467
|
})] })
|
|
468
468
|
]
|
|
469
469
|
})] }), /* @__PURE__ */ x("div", { children: [
|
|
@@ -478,7 +478,7 @@ var S = [
|
|
|
478
478
|
checked: E.sameAsCurrent,
|
|
479
479
|
onChange: (e) => A("sameAsCurrent", e.target.checked),
|
|
480
480
|
disabled: !p,
|
|
481
|
-
className: "h-4 w-4 rounded border-border-subtle text-blue
|
|
481
|
+
className: "h-4 w-4 rounded border-border-subtle text-accent-blue focus:ring-accent-blue-subtle/40"
|
|
482
482
|
}), /* @__PURE__ */ b("span", {
|
|
483
483
|
className: "text-xs text-text-primary",
|
|
484
484
|
children: "Same as current address"
|
|
@@ -492,7 +492,7 @@ var S = [
|
|
|
492
492
|
value: E.permanentAddress,
|
|
493
493
|
onChange: (e) => A("permanentAddress", e.target.value),
|
|
494
494
|
disabled: !p,
|
|
495
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
495
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40 resize-none"
|
|
496
496
|
})] })
|
|
497
497
|
] })]
|
|
498
498
|
})] }),
|
|
@@ -502,9 +502,9 @@ var S = [
|
|
|
502
502
|
children: "Documents & Banking"
|
|
503
503
|
}),
|
|
504
504
|
/* @__PURE__ */ b("div", {
|
|
505
|
-
className: "rounded-lg bg-
|
|
505
|
+
className: "rounded-lg bg-status-warning-bg-subtle/10 border border-status-warning-border/20 p-3 mb-5",
|
|
506
506
|
children: /* @__PURE__ */ x("p", {
|
|
507
|
-
className: "text-xs text-
|
|
507
|
+
className: "text-xs text-status-warning-text flex items-center gap-2",
|
|
508
508
|
children: [/* @__PURE__ */ b(g, { className: "h-4 w-4 shrink-0" }), "Your documents and banking information are encrypted and secure."]
|
|
509
509
|
})
|
|
510
510
|
}),
|
|
@@ -537,7 +537,7 @@ var S = [
|
|
|
537
537
|
value: E.bankName,
|
|
538
538
|
onChange: (e) => A("bankName", e.target.value),
|
|
539
539
|
disabled: !p,
|
|
540
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
540
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
541
541
|
})] }),
|
|
542
542
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
543
543
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
@@ -556,7 +556,7 @@ var S = [
|
|
|
556
556
|
value: E.ifscCode,
|
|
557
557
|
onChange: (e) => A("ifscCode", e.target.value),
|
|
558
558
|
disabled: !p,
|
|
559
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-blue-
|
|
559
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40"
|
|
560
560
|
})] })
|
|
561
561
|
]
|
|
562
562
|
})
|
|
@@ -569,9 +569,9 @@ var S = [
|
|
|
569
569
|
/* @__PURE__ */ x("div", {
|
|
570
570
|
className: "grid sm:grid-cols-2 gap-4 mb-7",
|
|
571
571
|
children: [/* @__PURE__ */ x("div", {
|
|
572
|
-
className: "rounded-lg bg-
|
|
572
|
+
className: "rounded-lg bg-status-warning-bg-subtle/5 border border-status-warning-border/20 p-5 text-center",
|
|
573
573
|
children: [
|
|
574
|
-
/* @__PURE__ */ b(o, { className: "h-10 w-10 text-
|
|
574
|
+
/* @__PURE__ */ b(o, { className: "h-10 w-10 text-status-warning-text mx-auto mb-2" }),
|
|
575
575
|
/* @__PURE__ */ b("h3", {
|
|
576
576
|
className: "text-sm font-semibold text-text-primary",
|
|
577
577
|
children: "Employee of the Month"
|
|
@@ -582,9 +582,9 @@ var S = [
|
|
|
582
582
|
})
|
|
583
583
|
]
|
|
584
584
|
}), /* @__PURE__ */ x("div", {
|
|
585
|
-
className: "rounded-lg bg-blue-
|
|
585
|
+
className: "rounded-lg bg-accent-blue-subtle/5 border border-accent-blue-subtle/20 p-5 text-center",
|
|
586
586
|
children: [
|
|
587
|
-
/* @__PURE__ */ b(u, { className: "h-10 w-10 text-
|
|
587
|
+
/* @__PURE__ */ b(u, { className: "h-10 w-10 text-accent-blue mx-auto mb-2" }),
|
|
588
588
|
/* @__PURE__ */ b("h3", {
|
|
589
589
|
className: "text-sm font-semibold text-text-primary",
|
|
590
590
|
children: "Perfect Attendance"
|
|
@@ -614,7 +614,7 @@ var S = [
|
|
|
614
614
|
}), /* @__PURE__ */ b("div", {
|
|
615
615
|
className: "w-full h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
616
616
|
children: /* @__PURE__ */ b("div", {
|
|
617
|
-
className: "h-full rounded-full bg-
|
|
617
|
+
className: "h-full rounded-full bg-status-success-bg-subtle transition-all",
|
|
618
618
|
style: { width: "98%" }
|
|
619
619
|
})
|
|
620
620
|
})] }),
|
|
@@ -630,7 +630,7 @@ var S = [
|
|
|
630
630
|
}), /* @__PURE__ */ b("div", {
|
|
631
631
|
className: "w-full h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
632
632
|
children: /* @__PURE__ */ b("div", {
|
|
633
|
-
className: "h-full rounded-full bg-blue-
|
|
633
|
+
className: "h-full rounded-full bg-accent-blue-subtle transition-all",
|
|
634
634
|
style: { width: "95%" }
|
|
635
635
|
})
|
|
636
636
|
})] }),
|
|
@@ -646,7 +646,7 @@ var S = [
|
|
|
646
646
|
}), /* @__PURE__ */ b("div", {
|
|
647
647
|
className: "w-full h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
648
648
|
children: /* @__PURE__ */ b("div", {
|
|
649
|
-
className: "h-full rounded-full bg-purple-
|
|
649
|
+
className: "h-full rounded-full bg-accent-purple-subtle transition-all",
|
|
650
650
|
style: { width: "92%" }
|
|
651
651
|
})
|
|
652
652
|
})] })
|
|
@@ -670,7 +670,7 @@ var S = [
|
|
|
670
670
|
type: "button",
|
|
671
671
|
onClick: () => N(e.id),
|
|
672
672
|
disabled: !p,
|
|
673
|
-
className: t("relative inline-flex h-6 w-11 items-center rounded-full transition-colors", e.enabled ? "bg-blue-
|
|
673
|
+
className: t("relative inline-flex h-6 w-11 items-center rounded-full transition-colors", e.enabled ? "bg-accent-blue-subtle" : "bg-muted-foreground/30", !p && "opacity-60 cursor-not-allowed"),
|
|
674
674
|
children: /* @__PURE__ */ b("span", { className: t("inline-block h-4 w-4 rounded-full bg-white transition-transform", e.enabled ? "translate-x-6" : "translate-x-1") })
|
|
675
675
|
})]
|
|
676
676
|
}, e.id))
|