From dc4c80e251fe8197d6ae8024111b98a9059a9ecb Mon Sep 17 00:00:00 2001 From: Gustav-Eikaas <89254170+Gustav-Eikaas@users.noreply.github.com> Date: Wed, 7 Aug 2024 13:07:56 +0200 Subject: [PATCH] fix: loop content sorting not working (#1061) --- .../src/lib/utils-sidesheet/useGetLoopContent.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/loopsidesheet/src/lib/utils-sidesheet/useGetLoopContent.ts b/libs/loopsidesheet/src/lib/utils-sidesheet/useGetLoopContent.ts index 5116c9a8..b246c39c 100644 --- a/libs/loopsidesheet/src/lib/utils-sidesheet/useGetLoopContent.ts +++ b/libs/loopsidesheet/src/lib/utils-sidesheet/useGetLoopContent.ts @@ -33,9 +33,7 @@ export const useGetLoopContent = (loopNo: string) => { throw new Error(); } const loopContent = await response.json() as LoopContent[] - return loopContent.sort((a, b) => { - return compareMcStatus(a.mechanicalCompletionStatus as McStatus | undefined, b.mechanicalCompletionStatus as McStatus | undefined) - }) + return loopContent.sort((a, b) => compareMcStatus(a.clStatus as McStatus | undefined, b.clStatus as McStatus | undefined)) }, });