|
11 | 11 | @endif |
12 | 12 |
|
13 | 13 | <div class="space-y-3"> |
14 | | - @forelse ($contracts as $contract) |
15 | | - <div x-data x-init="if (window.location.hash === '#contract-{{ $contract->id }}') $el.classList.add('alerts-border')" class="border p-4 rounded-xl bg-white dark:bg-gray-800" |
16 | | - id="contract-{{ $contract->id }}"> |
17 | | - <div class="flex justify-between items-start"> |
18 | | - <div> |
19 | | - <div class="text-sm text-gray-500">{{ $contract->company->name }}</div> |
20 | | - <div class="text-lg font-semibold">{{ $contract->category->name }}</div> |
21 | | - <div class="text-sm">{{ $contract->provider->name }}</div> |
22 | | - </div> |
23 | | - <div class="text-right text-sm"> |
24 | | - <div class="font-medium">€{{ number_format($contract->budget, 2) }}</div> |
25 | | - <div class="text-xs text-gray-500">End: {{ $contract->end_date ?? '—' }}</div> |
26 | | - <div class="text-xs">{{ ucfirst($contract->status) }}</div> |
27 | | - </div> |
28 | | - </div> |
29 | | - <div class="flex gap-2 mt-2 text-right"> |
30 | | - @foreach ($contract->reminders as $reminder) |
31 | | - <div class="flex items-center gap-2"> |
32 | | - <div class="text-xs text-gray-500">{{ $reminder->title }} - |
33 | | - {{ \Carbon\Carbon::parse($reminder->due_date)->format('j M, Y') }}</div> |
34 | | - <flux:button size="xs" variant="outline" |
35 | | - wire:click="editReminder({{ $reminder->id }})">{{ __('Edit Reminders') }} |
36 | | - </flux:button> |
37 | | - </div> |
38 | | - @endforeach |
39 | | - <flux:button size="sm" variant="outline" |
40 | | - wire:click="openReminderModal({{ $contract->id }})"> |
41 | | - {{ __('Add Reminder') }} |
42 | | - </flux:button> |
43 | | - <flux:button size="sm" variant="outline" wire:click="edit({{ $contract->id }})"> |
44 | | - {{ __('Edit') }} |
45 | | - </flux:button> |
46 | | - <flux:button size="sm" variant="outline" class="!text-red-600 hover:!bg-red-100" |
47 | | - wire:click="confirmDelete({{ $contract->id }})"> |
48 | | - {{ __('Delete') }} |
49 | | - </flux:button> |
50 | | - </div> |
51 | | - </div> |
52 | | - @empty |
53 | | - <p class="text-sm text-gray-500">{{ __('No contracts created yet.') }}</p> |
54 | | - @endforelse |
| 14 | + |
| 15 | + <div class="relative overflow-x-auto shadow-md sm:rounded-lg"> |
| 16 | + <table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400"> |
| 17 | + <thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400"> |
| 18 | + <tr> |
| 19 | + <th scope="col" class="px-6 py-3"> |
| 20 | + Name |
| 21 | + </th> |
| 22 | + <th scope="col" class="px-6 py-3"> |
| 23 | + <span class="sr-only">Edit</span> |
| 24 | + </th> |
| 25 | + </tr> |
| 26 | + </thead> |
| 27 | + <tbody> |
| 28 | + @forelse ($contracts as $contract) |
| 29 | + <tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700 border-gray-200 hover:bg-gray-50 dark:hover:bg-gray-600" |
| 30 | + x-data x-init="if (window.location.hash === '#contract-{{ $contract->id }}') $el.classList.add('alerts-border')" id="contract-{{ $contract->id }}"> |
| 31 | + <th scope="row" class="px-6 py-4 font-medium text-gray-900 dark:text-white"> |
| 32 | + {{ $contract->company->name }} |
| 33 | + <span class="text-xs text-gray-500"> |
| 34 | + ({{ $contract->category->name }}, {{ $contract->provider->name }}) |
| 35 | + </span> |
| 36 | + @foreach ($contract->reminders as $reminder) |
| 37 | + <div class="flex items-center gap-2"> |
| 38 | + <div class="text-xs text-gray-500">{{ $reminder->title }} - |
| 39 | + {{ \Carbon\Carbon::parse($reminder->due_date)->format('j M, Y') }}</div> |
| 40 | + <flux:button size="xs" variant="outline" |
| 41 | + wire:click="editReminder({{ $reminder->id }})"> |
| 42 | + {{ __('Edit Reminders') }} |
| 43 | + </flux:button> |
| 44 | + </div> |
| 45 | + @endforeach |
| 46 | + <flux:button size="sm" variant="outline" |
| 47 | + wire:click="openReminderModal({{ $contract->id }})"> |
| 48 | + {{ __('Add Reminder') }} |
| 49 | + </flux:button> |
| 50 | + </th> |
| 51 | + <td class="px-6 py-4 text-right flex items-center justify-end space-x-2"> |
| 52 | + <flux:button size="sm" variant="outline" |
| 53 | + wire:click="edit({{ $contract->id }})"> |
| 54 | + {{ __('Edit') }} |
| 55 | + </flux:button> |
| 56 | + <flux:button size="sm" variant="outline" |
| 57 | + class="!text-red-600 hover:!bg-red-100" |
| 58 | + wire:click="confirmDelete({{ $contract->id }})"> |
| 59 | + {{ __('Delete') }} |
| 60 | + </flux:button> |
| 61 | + </td> |
| 62 | + </tr> |
| 63 | + @empty |
| 64 | + <tr> |
| 65 | + <td colspan="4" class="px-6 py-4 text-center text-gray-500"> |
| 66 | + {{ __('No contracts added yet.') }} |
| 67 | + </td> |
| 68 | + </tr> |
| 69 | + @endforelse |
| 70 | + </tbody> |
| 71 | + </table> |
| 72 | + </div> |
55 | 73 | </div> |
56 | 74 |
|
57 | 75 | {{-- CREATE MODAL --}} |
|
179 | 197 | </x-contract.layout> |
180 | 198 | <style> |
181 | 199 | .alerts-border { |
182 | | - border: 4px #1c2ecb solid; |
| 200 | + background-color: rgba(28, 46, 203, 0.1); |
183 | 201 |
|
184 | 202 | animation: blink 0.8s ease-in-out; |
185 | 203 | animation-iteration-count: 5; |
186 | 204 | animation-fill-mode: forwards; |
187 | 205 |
|
188 | | - border-radius: 0.5rem; |
189 | 206 | box-shadow: 0 0 10px rgba(28, 46, 203, 0.5); |
190 | 207 | } |
191 | 208 |
|
192 | 209 | @keyframes blink { |
193 | 210 | 50% { |
194 | | - border-color: #fff; |
| 211 | + background-color: rgba(255, 255, 255, 0.5); |
195 | 212 | } |
196 | 213 | } |
197 | 214 | </style> |
|
0 commit comments