From dc1db276c209b188b25b0c0ff85542a1047d8ef3 Mon Sep 17 00:00:00 2001
From: Guilhem CARRON <gcarron@grandlyon.com>
Date: Wed, 2 Feb 2022 09:34:16 +0000
Subject: [PATCH] fix(modal): Sort prices by fluid so it displays in the right
 order

---
 src/services/fluidsPrices.service.ts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/services/fluidsPrices.service.ts b/src/services/fluidsPrices.service.ts
index 2304a2f51..70845b91e 100644
--- a/src/services/fluidsPrices.service.ts
+++ b/src/services/fluidsPrices.service.ts
@@ -52,6 +52,7 @@ export default class FluidPricesService {
   public async getAllLastPrices(): Promise<FluidPrice[]> {
     const query: QueryDefinition = Q(FLUIDPRICES_DOCTYPE)
       .where({ endDate: { $eq: null } })
+      .sortBy([{ fluidType: 'asc' }])
       .limitBy(3)
 
     const {
-- 
GitLab