|
1 | 1 | <template> |
2 | 2 | <div> |
3 | | - <publish-form :title="''" :action="action" :blueprint="blueprint" :meta="meta" :values="values" |
4 | | - @saved="addItem($event)"></publish-form> |
5 | | - |
| 3 | + <publish-form :title="''" :action="action" :blueprint="blueprint" :meta="meta" :values="values" @saved="addItem($event)"></publish-form> |
6 | 4 | <table class="min-w-full border border-gray-200"> |
7 | 5 | <thead class="bg-gray-50"> |
8 | | - <tr> |
9 | | - <th class="px-4 py-3 text-left text-sm font-semibold text-gray-700">{{ __('From') }}</th> |
10 | | - <th class="px-4 py-3 text-left text-sm font-semibold text-gray-700">{{ __('To') }}</th> |
11 | | - <th class="px-4 py-3 text-left text-sm font-semibold text-gray-700">{{ __('Type') }}</th> |
12 | | - <th class="px-4 py-3 text-left text-sm font-semibold text-gray-700">{{ __('Code') }}</th> |
13 | | - <th class="px-4 py-3 text-left text-sm font-semibold text-gray-700">{{ __('Sites') }}</th> |
14 | | - <th class="px-4 py-3 text-right text-sm font-semibold text-gray-700">{{ __('Delete') }}</th> |
15 | | - </tr> |
| 6 | + <tr> |
| 7 | + <th class="px-4 py-3 text-left text-sm font-semibold text-gray-700">{{ __('From') }}</th> |
| 8 | + <th class="px-4 py-3 text-left text-sm font-semibold text-gray-700">{{ __('To') }}</th> |
| 9 | + <th class="px-4 py-3 text-left text-sm font-semibold text-gray-700">{{ __('Type') }}</th> |
| 10 | + <th class="px-4 py-3 text-left text-sm font-semibold text-gray-700">{{ __('Code') }}</th> |
| 11 | + <th class="px-4 py-3 text-left text-sm font-semibold text-gray-700">{{ __('Sites') }}</th> |
| 12 | + <th class="px-4 py-3 text-right text-sm font-semibold text-gray-700">{{ __('Delete') }}</th> |
| 13 | + </tr> |
16 | 14 | </thead> |
17 | 15 | <tbody class="divide-y divide-gray-200"> |
18 | | - <tr class="hover:bg-gray-50 text-gray-900" v-for="(item, id) in detours" :key="id"> |
19 | | - <td class="px-4 py-3 text-sm">{{ item.from }}</td> |
20 | | - <td class="px-4 py-3 text-sm">{{ item.to }}</td> |
21 | | - <td class="px-4 py-3 text-sm">{{ item.type }}</td> |
22 | | - <td class="px-4 py-3 text-sm font-medium">{{ item.code }}</td> |
23 | | - <td class="px-4 py-3 text-sm space-x-2"> |
| 16 | + <tr class="hover:bg-gray-50 text-gray-900" v-for="(item, id) in detours" :key="id"> |
| 17 | + <td class="px-4 py-3 text-sm">{{ item.from }}</td> |
| 18 | + <td class="px-4 py-3 text-sm">{{ item.to }}</td> |
| 19 | + <td class="px-4 py-3 text-sm">{{ item.type }}</td> |
| 20 | + <td class="px-4 py-3 text-sm font-medium">{{ item.code }}</td> |
| 21 | + <td class="px-4 py-3 text-sm space-x-2"> |
24 | 22 |
|
25 | | - <span class="rounded-full bg-green-500 text-white p-2" v-if="item.sites?.length === 0">{{ __('All') }}</span> |
26 | | - <span class="rounded-full bg-green-500 text-white p-2" v-for="site in item.sites" v-else :key="site">{{ site }}</span> |
27 | | - </td> |
28 | | - <td class="px-4 py-3 text-right"> |
29 | | - <button |
30 | | - @click="deleteDetour(id)" |
31 | | - class="inline-flex items-center px-3 py-1.5 text-sm font-medium text-white bg-red-500 rounded hover:bg-red-400 focus:outline-none focus:ring-2 focus:ring-red-500"> |
32 | | - {{ __('Delete') }} |
33 | | - </button> |
34 | | - </td> |
35 | | - </tr> |
| 23 | + <span class="rounded-full bg-green-500 text-white p-2" v-if="item.sites?.length === 0">{{ __('All') }}</span> |
| 24 | + <span class="rounded-full bg-green-500 text-white p-2" v-for="site in item.sites" v-else :key="site">{{ site }}</span> |
| 25 | + </td> |
| 26 | + <td class="px-4 py-3 text-right"> |
| 27 | + <button |
| 28 | + @click="deleteDetour(id)" |
| 29 | + class="inline-flex items-center px-3 py-1.5 text-sm font-medium text-white bg-red-500 rounded hover:bg-red-400 focus:outline-none focus:ring-2 focus:ring-red-500"> |
| 30 | + {{ __('Delete') }} |
| 31 | + </button> |
| 32 | + </td> |
| 33 | + </tr> |
36 | 34 | </tbody> |
37 | 35 | </table> |
38 | 36 | </div> |
|
0 commit comments