|
1 | 1 | <template>
|
2 |
| - <div class="mt-8 flow-root"> |
| 2 | + <div class="mt-6 flow-root"> |
3 | 3 | <div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
4 | 4 | <div class="inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8">
|
5 |
| - <table class="min-w-full divide-y divide-gray-300 dark:divide-gray-700"> |
6 |
| - <thead> |
7 |
| - <tr> |
8 |
| - <th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 dark:text-white sm:pl-6">Route ID</th> |
9 |
| - <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white">Driver</th> |
10 |
| - <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white">Vehicle</th> |
11 |
| - <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white">Start Location</th> |
12 |
| - <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white">Stops</th> |
13 |
| - <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white">Avg. Delivery Time</th> |
14 |
| - <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white">Total Distance</th> |
15 |
| - <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white">Last Active</th> |
16 |
| - <th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6"> |
17 |
| - <span class="sr-only">Actions</span> |
18 |
| - </th> |
19 |
| - </tr> |
20 |
| - </thead> |
21 |
| - <tbody class="divide-y divide-gray-200 dark:divide-gray-700 bg-white dark:bg-blue-gray-800"> |
22 |
| - <tr v-for="route in routes" :key="route.id"> |
23 |
| - <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 dark:text-white sm:pl-6"> |
24 |
| - {{ route.id }} |
25 |
| - </td> |
26 |
| - <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-300"> |
27 |
| - {{ route.driver }} |
28 |
| - </td> |
29 |
| - <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-300"> |
30 |
| - {{ route.vehicle }} |
31 |
| - </td> |
32 |
| - <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-300"> |
33 |
| - {{ route.startLocation }} |
34 |
| - </td> |
35 |
| - <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-300"> |
36 |
| - {{ route.stops }} |
37 |
| - </td> |
38 |
| - <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-300"> |
39 |
| - {{ route.avgDeliveryTime }} hours |
40 |
| - </td> |
41 |
| - <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-300"> |
42 |
| - {{ route.totalDistance }} km |
43 |
| - </td> |
44 |
| - <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 dark:text-gray-300"> |
45 |
| - {{ formatDate(route.lastActive) }} |
46 |
| - </td> |
47 |
| - <td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6"> |
48 |
| - <button type="button" class="text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 p-2 rounded-md border border-transparent hover:border-blue-200 dark:hover:border-blue-800 mr-2" @click="$emit('view-map', route)" title="View Map"> |
49 |
| - <div class="i-hugeicons-map-01 h-5 w-5" /> |
50 |
| - </button> |
51 |
| - <button type="button" class="text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 p-2 rounded-md border border-transparent hover:border-blue-200 dark:hover:border-blue-800 mr-2" title="Edit" @click="$emit('edit', route)"> |
52 |
| - <div class="i-hugeicons-edit-01 h-5 w-5" /> |
53 |
| - </button> |
54 |
| - <button type="button" class="text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 p-2 rounded-md border border-transparent hover:border-red-200 dark:hover:border-red-800" title="Delete" @click="$emit('delete', route)"> |
55 |
| - <div class="i-hugeicons-waste h-5 w-5" /> |
56 |
| - </button> |
57 |
| - </td> |
58 |
| - </tr> |
59 |
| - </tbody> |
60 |
| - </table> |
| 5 | + <div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg"> |
| 6 | + <table class="min-w-full divide-y divide-gray-300 dark:divide-gray-700"> |
| 7 | + <thead class="bg-gray-50 dark:bg-blue-gray-700"> |
| 8 | + <tr> |
| 9 | + <th scope="col" class="py-4 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 dark:text-white sm:pl-6">Route ID</th> |
| 10 | + <th scope="col" class="px-4 py-4 text-left text-sm font-semibold text-gray-900 dark:text-white">Driver</th> |
| 11 | + <th scope="col" class="px-4 py-4 text-left text-sm font-semibold text-gray-900 dark:text-white">Vehicle</th> |
| 12 | + <th scope="col" class="px-4 py-4 text-left text-sm font-semibold text-gray-900 dark:text-white">Start Location</th> |
| 13 | + <th scope="col" class="px-4 py-4 text-left text-sm font-semibold text-gray-900 dark:text-white">Stops</th> |
| 14 | + <th scope="col" class="px-4 py-4 text-left text-sm font-semibold text-gray-900 dark:text-white">Avg. Delivery Time</th> |
| 15 | + <th scope="col" class="px-4 py-4 text-left text-sm font-semibold text-gray-900 dark:text-white">Total Distance</th> |
| 16 | + <th scope="col" class="px-4 py-4 text-left text-sm font-semibold text-gray-900 dark:text-white">Last Active</th> |
| 17 | + <th scope="col" class="relative py-4 pl-3 pr-4 sm:pr-6"> |
| 18 | + <span class="sr-only">Actions</span> |
| 19 | + </th> |
| 20 | + </tr> |
| 21 | + </thead> |
| 22 | + <tbody class="divide-y divide-gray-200 dark:divide-gray-700 bg-white dark:bg-blue-gray-800"> |
| 23 | + <tr v-for="route in routes" :key="route.id"> |
| 24 | + <td class="whitespace-nowrap py-4.5 pl-4 pr-3 text-sm font-medium text-gray-900 dark:text-white sm:pl-6"> |
| 25 | + {{ route.id }} |
| 26 | + </td> |
| 27 | + <td class="whitespace-nowrap px-4 py-4.5 text-sm text-gray-500 dark:text-gray-300"> |
| 28 | + {{ route.driver }} |
| 29 | + </td> |
| 30 | + <td class="whitespace-nowrap px-4 py-4.5 text-sm text-gray-500 dark:text-gray-300"> |
| 31 | + {{ route.vehicle }} |
| 32 | + </td> |
| 33 | + <td class="whitespace-nowrap px-4 py-4.5 text-sm text-gray-500 dark:text-gray-300"> |
| 34 | + {{ route.startLocation }} |
| 35 | + </td> |
| 36 | + <td class="whitespace-nowrap px-4 py-4.5 text-sm text-gray-500 dark:text-gray-300"> |
| 37 | + {{ route.stops }} |
| 38 | + </td> |
| 39 | + <td class="whitespace-nowrap px-4 py-4.5 text-sm text-gray-500 dark:text-gray-300"> |
| 40 | + {{ route.avgDeliveryTime }} hours |
| 41 | + </td> |
| 42 | + <td class="whitespace-nowrap px-4 py-4.5 text-sm text-gray-500 dark:text-gray-300"> |
| 43 | + {{ route.totalDistance }} km |
| 44 | + </td> |
| 45 | + <td class="whitespace-nowrap px-4 py-4.5 text-sm text-gray-500 dark:text-gray-300"> |
| 46 | + {{ formatDate(route.lastActive) }} |
| 47 | + </td> |
| 48 | + <td class="relative whitespace-nowrap py-4.5 pl-3 pr-4 text-right text-sm font-medium sm:pr-6"> |
| 49 | + <button type="button" class="text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 p-2 rounded-md border border-transparent hover:border-blue-200 dark:hover:border-blue-800 mr-2" @click="$emit('view-map', route)" title="View Map"> |
| 50 | + <div class="i-hugeicons-map-01 h-5 w-5" /> |
| 51 | + </button> |
| 52 | + <button type="button" class="text-blue-600 hover:text-blue-900 dark:text-blue-400 dark:hover:text-blue-300 p-2 rounded-md border border-transparent hover:border-blue-200 dark:hover:border-blue-800 mr-2" title="Edit" @click="$emit('edit', route)"> |
| 53 | + <div class="i-hugeicons-edit-01 h-5 w-5" /> |
| 54 | + </button> |
| 55 | + <button type="button" class="text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300 p-2 rounded-md border border-transparent hover:border-red-200 dark:hover:border-red-800" title="Delete" @click="$emit('delete', route)"> |
| 56 | + <div class="i-hugeicons-waste h-5 w-5" /> |
| 57 | + </button> |
| 58 | + </td> |
| 59 | + </tr> |
| 60 | + </tbody> |
| 61 | + </table> |
| 62 | + </div> |
61 | 63 | </div>
|
62 | 64 | </div>
|
63 | 65 | </div>
|
|
0 commit comments