fix(ui): sort evaluations by SKM €/year descending
Repository.list() now hands the UI a list sorted by the harm proxy (Studie §6 SKM-€/Jahr). Most-harmful first, deterministic across launches and across mock-vs-hub repositories. Removes the perceived non-determinism in the Norms list and gives the heatmap chip-wrap a politically meaningful first row. Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
parent
cf0ee4fd7a
commit
852f9da703
1 changed files with 10 additions and 1 deletions
|
|
@ -19,8 +19,17 @@ abstract class EvaluationRepository {
|
||||||
class MockRepository implements EvaluationRepository {
|
class MockRepository implements EvaluationRepository {
|
||||||
const MockRepository();
|
const MockRepository();
|
||||||
|
|
||||||
|
/// Sorted copy of [Fixtures.evaluations], most-harmful first
|
||||||
|
/// (Studie §6 SKM-€/Jahr as harm proxy). The sort is in
|
||||||
|
/// repository.list() rather than the fixture declaration so
|
||||||
|
/// future Hub-fed lists stay consistent without re-tuning the
|
||||||
|
/// UI.
|
||||||
@override
|
@override
|
||||||
Future<List<Evaluation>> list() async => Fixtures.evaluations;
|
Future<List<Evaluation>> list() async {
|
||||||
|
final sorted = [...Fixtures.evaluations];
|
||||||
|
sorted.sort((a, b) => b.skmEurPerYear.compareTo(a.skmEurPerYear));
|
||||||
|
return sorted;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<Evaluation?> byEli(String eli) async {
|
Future<Evaluation?> byEli(String eli) async {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue