|
119 | 119 | <template x-if="!filters.find(f => f.field === filter.field)"> |
120 | 120 | <option :value="filter.field" x-text="filter.label ?? language[filter.field]"></option> |
121 | 121 | </template> |
122 | | - </template>r |
| 122 | + </template> |
123 | 123 | </select> |
124 | 124 | <button class="btn-primary" @click="applyFilters()" type="button"><?= l('apply') ?></button> |
125 | 125 | </div> |
126 | 126 | </div> |
127 | 127 | </div> |
128 | 128 | </fieldset> |
129 | 129 |
|
130 | | - <fieldset class="ticket-columns-container" :class=" { 'open' : showColumnSettings }"> |
131 | | - <legend @click="showColumnSettings = !showColumnSettings"><?= l('columns') ?></legend> |
| 130 | + <div class="ticket-listing-filter-bar"> |
132 | 131 | <div> |
133 | | - <ul> |
134 | | - <li> |
135 | | - <label> |
136 | | - <input type="checkbox" x-model="columns.id"> |
137 | | - <?= l('id') ?> |
138 | | - </label> |
139 | | - </li> |
140 | | - <li> |
141 | | - <label> |
142 | | - <input type="checkbox" x-model="columns.summary"> |
143 | | - <?= l('summary') ?> |
144 | | - </label> |
145 | | - </li> |
146 | | - <li> |
147 | | - <label> |
148 | | - <input type="checkbox" x-model="columns.status"> |
149 | | - <?= l('status') ?> |
150 | | - </label> |
151 | | - </li> |
152 | | - <li> |
153 | | - <label> |
154 | | - <input type="checkbox" x-model="columns.owner"> |
155 | | - <?= l('owner') ?> |
156 | | - </label> |
157 | | - </li> |
158 | | - <li> |
159 | | - <label> |
160 | | - <input type="checkbox" x-model="columns.type"> |
161 | | - <?= l('type') ?> |
162 | | - </label> |
163 | | - </li> |
164 | | - <li> |
165 | | - <label> |
166 | | - <input type="checkbox" x-model="columns.component"> |
167 | | - <?= l('component') ?> |
168 | | - </label> |
169 | | - </li> |
170 | | - <li> |
171 | | - <label> |
172 | | - <input type="checkbox" x-model="columns.milestone"> |
173 | | - <?= l('milestone') ?> |
174 | | - </label> |
175 | | - </li> |
176 | | - <li> |
177 | | - <label> |
178 | | - <input type="checkbox" x-model="columns.assignee"> |
179 | | - <?= l('assignee') ?> |
180 | | - </label> |
181 | | - </li> |
182 | | - <li> |
183 | | - <label> |
184 | | - <input type="checkbox" x-model="columns.priority"> |
185 | | - <?= l('priority') ?> |
186 | | - </label> |
187 | | - </li> |
188 | | - <li> |
189 | | - <label> |
190 | | - <input type="checkbox" x-model="columns.severity"> |
191 | | - <?= l('severity') ?> |
192 | | - </label> |
193 | | - </li> |
194 | | - <li> |
195 | | - <label> |
196 | | - <input type="checkbox" x-model="columns.reported"> |
197 | | - <?= l('reported') ?> |
198 | | - </label> |
199 | | - </li> |
200 | | - <li> |
201 | | - <label> |
202 | | - <input type="checkbox" x-model="columns.updated"> |
203 | | - <?= l('updated') ?> |
204 | | - </label> |
205 | | - </li> |
206 | | - <li> |
207 | | - <label> |
208 | | - <input type="checkbox" x-model="columns.votes"> |
209 | | - <?= l('votes') ?> |
210 | | - </label> |
211 | | - </li> |
212 | | - <?php foreach ($customFields as $field): ?> |
213 | | - <li> |
214 | | - <label> |
215 | | - <input type="checkbox" x-model="columns.<?= $field->slug ?>"> |
216 | | - <?= $field->name ?> |
217 | | - </label> |
218 | | - </li> |
219 | | - <?php endforeach; ?> |
220 | | - </ul> |
| 132 | + <label for="search-filter" class="sr-only"><?= l('search') ?></label> |
| 133 | + <input type="text" placeholder="<?= l('search') ?>" x-model.trim.debounce.300ms="search" class="search-filter" /> |
221 | 134 | </div> |
222 | | - </fieldset> |
| 135 | + |
| 136 | + <div> |
| 137 | + <div x-data="dropdown()"> |
| 138 | + <button @click="toggle()" class="dropdown-toggle dropdown-toggle-white" :class="{ open: open }" x-ref="dropdownToggle"> |
| 139 | + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5"> |
| 140 | + <path stroke-linecap="round" stroke-linejoin="round" d="M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z" /> |
| 141 | + </svg> |
| 142 | + <span><?= l('columns'); ?></span> |
| 143 | + <i class="fa-solid fa-chevron-down text-gray-400" x-show="!open"></i> |
| 144 | + <i class="fa-solid fa-chevron-up text-gray-400" x-show="open"></i> |
| 145 | + </button> |
| 146 | + <div x-show="open" class="dropdown" @click.outside="open = false" x-ref="dropdownMenu"> |
| 147 | + <ul> |
| 148 | + <li> |
| 149 | + <label> |
| 150 | + <input type="checkbox" x-model="columns.id"> |
| 151 | + <?= l('id') ?> |
| 152 | + </label> |
| 153 | + </li> |
| 154 | + <li> |
| 155 | + <label> |
| 156 | + <input type="checkbox" x-model="columns.summary"> |
| 157 | + <?= l('summary') ?> |
| 158 | + </label> |
| 159 | + </li> |
| 160 | + <li> |
| 161 | + <label> |
| 162 | + <input type="checkbox" x-model="columns.status"> |
| 163 | + <?= l('status') ?> |
| 164 | + </label> |
| 165 | + </li> |
| 166 | + <li> |
| 167 | + <label> |
| 168 | + <input type="checkbox" x-model="columns.owner"> |
| 169 | + <?= l('owner') ?> |
| 170 | + </label> |
| 171 | + </li> |
| 172 | + <li> |
| 173 | + <label> |
| 174 | + <input type="checkbox" x-model="columns.type"> |
| 175 | + <?= l('type') ?> |
| 176 | + </label> |
| 177 | + </li> |
| 178 | + <li> |
| 179 | + <label> |
| 180 | + <input type="checkbox" x-model="columns.component"> |
| 181 | + <?= l('component') ?> |
| 182 | + </label> |
| 183 | + </li> |
| 184 | + <li> |
| 185 | + <label> |
| 186 | + <input type="checkbox" x-model="columns.milestone"> |
| 187 | + <?= l('milestone') ?> |
| 188 | + </label> |
| 189 | + </li> |
| 190 | + <li> |
| 191 | + <label> |
| 192 | + <input type="checkbox" x-model="columns.assignee"> |
| 193 | + <?= l('assignee') ?> |
| 194 | + </label> |
| 195 | + </li> |
| 196 | + <li> |
| 197 | + <label> |
| 198 | + <input type="checkbox" x-model="columns.priority"> |
| 199 | + <?= l('priority') ?> |
| 200 | + </label> |
| 201 | + </li> |
| 202 | + <li> |
| 203 | + <label> |
| 204 | + <input type="checkbox" x-model="columns.severity"> |
| 205 | + <?= l('severity') ?> |
| 206 | + </label> |
| 207 | + </li> |
| 208 | + <li> |
| 209 | + <label> |
| 210 | + <input type="checkbox" x-model="columns.reported"> |
| 211 | + <?= l('reported') ?> |
| 212 | + </label> |
| 213 | + </li> |
| 214 | + <li> |
| 215 | + <label> |
| 216 | + <input type="checkbox" x-model="columns.updated"> |
| 217 | + <?= l('updated') ?> |
| 218 | + </label> |
| 219 | + </li> |
| 220 | + <li> |
| 221 | + <label> |
| 222 | + <input type="checkbox" x-model="columns.votes"> |
| 223 | + <?= l('votes') ?> |
| 224 | + </label> |
| 225 | + </li> |
| 226 | + <?php foreach ($customFields as $field): ?> |
| 227 | + <li> |
| 228 | + <label> |
| 229 | + <input type="checkbox" x-model="columns.<?= $field->slug ?>"> |
| 230 | + <?= $field->name ?> |
| 231 | + </label> |
| 232 | + </li> |
| 233 | + <?php endforeach; ?> |
| 234 | + </ul> |
| 235 | + </div> |
| 236 | + </div> |
| 237 | + </div> |
| 238 | + </div> |
223 | 239 |
|
224 | 240 | <table class="ticket-listing" id="ticket-listing"> |
225 | 241 | <thead> |
|
275 | 291 | <td x-text="ticket.status.name" x-show="columns.status"></td> |
276 | 292 | <td x-text="ticket.owner.name" x-show="columns.owner"></td> |
277 | 293 | <td x-text="ticket.type.name" x-show="columns.type"></td> |
278 | | - <td x-text="ticket.component.name" x-show="columns.component"></td> |
279 | | - <td x-text="ticket.milestone.name" x-show="columns.milestone"></td> |
280 | | - <td x-text="ticket.assignee.name" x-show="columns.assignee"></td> |
| 294 | + <td x-text="ticket.component ? ticket.component.name : ''" x-show="columns.component"></td> |
| 295 | + <td x-text="ticket.milestone ? ticket.milestone.name : ''" x-show="columns.milestone"></td> |
| 296 | + <td x-text="ticket.assignee ? ticket.assignee.name : ''" x-show="columns.assignee"></td> |
281 | 297 | <td x-text="ticket.priority.name" x-show="columns.priority"></td> |
282 | 298 | <td x-text="ticket.severity.name" x-show="columns.severity"></td> |
283 | 299 | <td x-text="ticket.created_at" x-show="columns.reported"></td> |
|
0 commit comments