From 4f4ce245c67a17bbbb7792559ae1bce4adfa18cd Mon Sep 17 00:00:00 2001 From: Yorick de Wid Date: Mon, 27 Jul 2026 10:09:59 +0000 Subject: [PATCH] feat(explorer): sort from the filter panel, and say which way The table headers could already sort, but only on the six columns that happen to be on screen and only by cycling asc -> desc -> off. "Op opsteller, Z naar A" was three clicks and an invisible column. Sorting now sits in the filter popover under a rule of its own: single-choice, because the API sorts one column. Each column carries its own words for the two directions -- "nieuwste eerst" rather than "aflopend", since translating a control is how you end up clicking it twice to find out what it does. The active sort becomes a chip beside the filter chips. Same reason the filters have one: a sort that lives only inside a dropdown is a sort people forget they set. It matters more here, because Opsteller has no column in the table to hang an arrow on. Two things said out loud rather than dressed up: with no sort chosen the API keeps its own order (coalesce(update_date, create_date) DESC), and Type/Status sort on the PostgreSQL enum's declaration order -- which groups the rows but does not rank them (in report.audit_status, 'rejected' precedes 'pending_review'). Saved views now carry sort + order, so "te controleren, oudste eerst" is one saved question instead of a filter plus a setting to reapply. And the column headers start at desc like the panel does; two controls writing one piece of state should not disagree about which way the first click points. Co-Authored-By: Claude Opus 5 (1M context) --- src/components/Common/FilterBuilder.vue | 100 +++++++++++++++++++++++- src/components/Common/FilterChip.vue | 9 ++- src/services/explorer.ts | 79 ++++++++++++++++--- src/views/InquiryListView.vue | 9 ++- 4 files changed, 177 insertions(+), 20 deletions(-) diff --git a/src/components/Common/FilterBuilder.vue b/src/components/Common/FilterBuilder.vue index fd36040..15e1484 100644 --- a/src/components/Common/FilterBuilder.vue +++ b/src/components/Common/FilterBuilder.vue @@ -1,9 +1,9 @@ diff --git a/src/components/Common/FilterChip.vue b/src/components/Common/FilterChip.vue index 9e3d164..f9839ae 100644 --- a/src/components/Common/FilterChip.vue +++ b/src/components/Common/FilterChip.vue @@ -1,10 +1,11 @@