diff --git a/src/main/java/be/seeseepuff/pcinv/controllers/WebController.java b/src/main/java/be/seeseepuff/pcinv/controllers/WebController.java index a0573d2..c2eb028 100644 --- a/src/main/java/be/seeseepuff/pcinv/controllers/WebController.java +++ b/src/main/java/be/seeseepuff/pcinv/controllers/WebController.java @@ -1,5 +1,6 @@ package be.seeseepuff.pcinv.controllers; +import be.seeseepuff.pcinv.models.Asset; import be.seeseepuff.pcinv.models.WorkLogEntry; import be.seeseepuff.pcinv.services.AssetService; import be.seeseepuff.pcinv.services.BuildService; @@ -94,7 +95,9 @@ public class WebController { model.addAttribute(DESCRIPTOR, assetService.getAssetDescriptor(type)); model.addAttribute(DESCRIPTORS, tree); model.addAttribute(PROPERTIES, tree.stream().flatMap(d -> d.getProperties().stream()).toList()); - model.addAttribute(ASSETS, assetService.getAssetsByType(type)); + var assets = assetService.getAssetsByType(type); + assets.sort(Comparator.comparing(Asset::getQr)); + model.addAttribute(ASSETS, assets); return "browse_type"; } diff --git a/src/main/resources/templates/view.html b/src/main/resources/templates/view.html index 241fa4d..5199060 100644 --- a/src/main/resources/templates/view.html +++ b/src/main/resources/templates/view.html @@ -7,7 +7,10 @@ - +
+ + +