From 91dcbbcb2cf69ee5855ebd0c7e96cf69a67ea32c Mon Sep 17 00:00:00 2001 From: Mihoub Debache Date: Thu, 28 Dec 2023 10:32:44 +0100 Subject: [PATCH] fix(utils): fix bug that did not display relations if no start date --- src/components/blocs/relations/utils/status.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/blocs/relations/utils/status.js b/src/components/blocs/relations/utils/status.js index 75396ec1..b62492d2 100644 --- a/src/components/blocs/relations/utils/status.js +++ b/src/components/blocs/relations/utils/status.js @@ -6,7 +6,7 @@ export function isFinished(relation) { } export function spreadByStatus(data) { - const current = data?.filter((el) => (el.startDate <= getComparableNow() || (!el.startDate && !el.endDate)) && !isFinished(el)); + const current = data?.filter((el) => (el.startDate <= getComparableNow() || (!el.startDate) || (!el.startDate && !el.endDate)) && !isFinished(el)); const inactive = data?.filter((el) => isFinished(el)); const forthcoming = data?.filter((el) => el.startDate > getComparableNow()); const counts = {