|
1 | 1 | <template> |
2 | 2 | <div class="flex flex-col h-full bg-white"> |
3 | | - <!-- Header with Customer --> |
4 | | - <div class="px-3 py-2.5 border-b border-gray-200"> |
5 | | - <div class="mb-2"> |
6 | | - <h2 class="text-sm font-semibold text-gray-900">Item Cart</h2> |
7 | | - </div> |
8 | | - |
9 | | - <!-- Inline Customer Search/Selection --> |
10 | | - <div class="relative"> |
11 | | - <div v-if="customer" class="flex items-center justify-between bg-blue-50 rounded-lg p-2"> |
12 | | - <div class="flex items-center space-x-2"> |
13 | | - <div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center flex-shrink-0"> |
14 | | - <svg class="w-4 h-4 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 3 | + <!-- Header with Customer --> |
| 4 | + <div class="px-3 py-2.5 border-b border-gray-200"> |
| 5 | + <!-- Inline Customer Search/Selection --> |
| 6 | + <div class="relative mb-3"> |
| 7 | + <div v-if="customer" class="flex items-center justify-between bg-blue-50 rounded-lg p-2"> |
| 8 | + <div class="flex items-center space-x-2"> |
| 9 | + <div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center flex-shrink-0"> |
| 10 | + <svg class="w-4 h-4 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
15 | 11 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/> |
16 | 12 | </svg> |
17 | 13 | </div> |
|
105 | 101 | <p class="text-[10px] text-green-600">"{{ customerSearch }}"</p> |
106 | 102 | </div> |
107 | 103 | </button> |
108 | | - </div> |
109 | | - </div> |
110 | | - </div> |
111 | | - |
112 | | - <!-- Clear Cart Button --> |
113 | | - <div v-if="items.length > 0" class="mt-3 flex justify-end"> |
114 | | - <button |
115 | | - @click="$emit('clear-cart')" |
116 | | - class="inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-semibold text-red-600 transition-colors hover:text-red-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-red-200" |
117 | | - type="button" |
118 | | - title="Clear all items from the cart" |
119 | | - aria-label="Clear all items from the cart" |
120 | | - > |
121 | | - <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
122 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V5a2 2 0 00-2-2h-2a2 2 0 00-2 2v2M4 7h16"/> |
123 | | - </svg> |
124 | | - <span>Clear Cart</span> |
125 | | - </button> |
126 | | - </div> |
127 | | - </div> |
| 104 | + </div> |
| 105 | + </div> |
| 106 | + </div> |
| 107 | + <div class="flex items-center justify-between"> |
| 108 | + <h2 class="text-sm font-semibold text-gray-900">Item Cart</h2> |
| 109 | + <button |
| 110 | + v-if="items.length > 0" |
| 111 | + @click="$emit('clear-cart')" |
| 112 | + class="inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs font-semibold text-red-600 transition-colors hover:text-red-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-red-200" |
| 113 | + type="button" |
| 114 | + title="Clear all items from the cart" |
| 115 | + aria-label="Clear all items from the cart" |
| 116 | + > |
| 117 | + <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 118 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V5a2 2 0 00-2-2h-2a2 2 0 00-2 2v2M4 7h16"/> |
| 119 | + </svg> |
| 120 | + <span>Clear Cart</span> |
| 121 | + </button> |
| 122 | + </div> |
| 123 | + </div> |
128 | 124 |
|
129 | 125 | <!-- Cart Items --> |
130 | 126 | <div class="flex-1 overflow-y-auto p-2.5 bg-gray-50"> |
|
0 commit comments