Skip to content

Commit

Permalink
feat: ajout le tri sur les exploitations hors-ligne
Browse files Browse the repository at this point in the history
Signed-off-by: Maud Royer <hello@maudroyer.fr>
  • Loading branch information
jillro committed Jun 20, 2024
1 parent cdaa56e commit 61bda43
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/certification/exploitations/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ meta:
</td>
</tr>
</tbody>
<tfoot v-if="!isSearching && hasResults">
<tfoot v-if="!isSearching && hasResults && isOnline">
<tr>
<td colspan="3" class="results-total">{{ operators.length }} sur {{ pagination.total }} résultats</td>
<td>
Expand Down Expand Up @@ -198,7 +198,8 @@ const isSearching = ref(false)
const searchResults = ref([])
const operators = computed(() => isOnline.value ? searchResults.value : Object.entries(storage.operators).map(
([, { records, operator }]) => ({ ...operator, ...records[0] })
))
).sort((a, b) => ((a[sortOrder.value.sort] < b[sortOrder.value.sort]) ^ (sortOrder.value.order === 'desc'))
? -1 : 1))
// controlled by the form
const userInput = ref(props.search)
Expand Down

0 comments on commit 61bda43

Please sign in to comment.