Skip to content

Commit

Permalink
fix(utils): fix bug that did not display relations if no start date
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Dec 28, 2023
1 parent 6005ff0 commit 91dcbbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/blocs/relations/utils/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 91dcbbc

Please sign in to comment.