Skip to content

Commit

Permalink
Fix sorting when a device type is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
JanOppolzer committed Aug 6, 2024
1 parent cb2459e commit 21dfce5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions resources/views/components/db-sort.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<span class="sm:inline-block block">
<a href="?search={{ $search }}&sort={{ $sort }}">
<a href="?search={{ $search }}&type={{ $type }}&sort={{ $sort }}">
<x-hi-chevron-up />
</a>
<a href="?search={{ $search }}&sort={{ $sort }}&order=desc">
<a href="?search={{ $search }}&type={{ $type }}&sort={{ $sort }}&order=desc">
<x-hi-chevron-down />
</a>
</span>
10 changes: 5 additions & 5 deletions resources/views/livewire/search-devices.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@

<x-slot:thead>
<x-th>{{ __('common.mac') }}
<x-db-sort :search="$search" sort="mac" />
<x-db-sort :search="$search" :type="$type" sort="mac" />
</x-th>
<x-th>{{ __('common.type') }}
</x-th>
<x-th>{{ __('common.name') }}
<x-db-sort :search="$search" sort="name" />
<x-db-sort :search="$search" :type="$type" sort="name" />
</x-th>
<x-th>{{ __('common.enabled') }}
<x-db-sort :search="$search" sort="enabled" />
<x-db-sort :search="$search" :type="$type" sort="enabled" />
</x-th>
<x-th>{{ __('common.valid_from') }}
<x-db-sort :search="$search" sort="valid_from" />
<x-db-sort :search="$search" :type="$type" sort="valid_from" />
</x-th>
<x-th>{{ __('common.valid_to') }}
<x-db-sort :search="$search" sort="valid_to" />
<x-db-sort :search="$search" :type="$type" sort="valid_to" />
</x-th>
<x-th>&nbsp;</x-th>
</x-slot:thead>
Expand Down

0 comments on commit 21dfce5

Please sign in to comment.