|
1 | 1 | <x-layout-three-columns> |
2 | 2 | {{-- Desktop Buttons - Hidden on Mobile --}} |
3 | | - <div class="hidden md:flex justify-end mb-4 space-x-3"> |
| 3 | + <div class="hidden md:flex justify-between items-center mb-4"> |
4 | 4 | <a href="/support/tickets" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700"> |
5 | 5 | <svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
6 | 6 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/> |
7 | 7 | </svg> |
8 | 8 | Back to Tickets |
9 | 9 | </a> |
10 | | - <button type="button" class="inline-flex items-center px-4 py-2 text-sm font-medium text-violet-700 bg-violet-100 border border-violet-200 rounded-lg hover:bg-violet-200 dark:bg-violet-900/30 dark:text-violet-300 dark:border-violet-800 dark:hover:bg-violet-900/50"> |
11 | | - <svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
12 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"/> |
13 | | - </svg> |
14 | | - Reply |
15 | | - </button> |
16 | | - <button type="button" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700"> |
17 | | - <svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
18 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/> |
19 | | - </svg> |
20 | | - Close Ticket |
21 | | - </button> |
| 10 | + <div class="flex space-x-3"> |
| 11 | + @if($supportTicket->status !== \App\SupportTicket\Status::CLOSED) |
| 12 | + <button type="button" class="inline-flex items-center px-4 py-2 text-sm font-medium text-violet-700 bg-violet-100 border border-violet-200 rounded-lg hover:bg-violet-200 dark:bg-violet-900/30 dark:text-violet-300 dark:border-violet-800 dark:hover:bg-violet-900/50"> |
| 13 | + <svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 14 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"/> |
| 15 | + </svg> |
| 16 | + Reply |
| 17 | + </button> |
| 18 | + |
| 19 | + <button type="button" onclick="document.getElementById('closeTicketForm').submit()" class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700"> |
| 20 | + <svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 21 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/> |
| 22 | + </svg> |
| 23 | + Close Ticket |
| 24 | + </button> |
| 25 | + @endif |
| 26 | + </div> |
22 | 27 | </div> |
23 | 28 | <section class="mt-6"> |
24 | 29 | <div class="rounded-lg bg-white shadow dark:bg-gray-800"> |
|
63 | 68 | </p> |
64 | 69 | </div> |
65 | 70 | </section> |
66 | | - |
| 71 | + |
67 | 72 | {{-- Mobile Footer - Visible only on Mobile --}} |
68 | 73 | <div class="md:hidden fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-3 flex justify-between z-50"> |
69 | 74 | <a href="/support/tickets" class="flex-1 inline-flex items-center justify-center px-3 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700 mx-1"> |
|
85 | 90 | Close |
86 | 91 | </button> |
87 | 92 | </div> |
88 | | - |
| 93 | + |
89 | 94 | {{-- Add padding at the bottom to prevent content from being hidden behind the mobile footer --}} |
90 | 95 | <div class="md:hidden h-16"></div> |
| 96 | + |
| 97 | + {{-- Close ticket form --}} |
| 98 | + <form action="{{ route('support.tickets.close', $supportTicket) }}" method="POST" id="closeTicketForm"> |
| 99 | + @csrf |
| 100 | + </form> |
91 | 101 | </x-layout-three-columns> |
0 commit comments