fix: don't render invalid dated issues
This commit is contained in:
parent
70ed3c1fdf
commit
0dd336aec8
1 changed files with 9 additions and 7 deletions
|
|
@ -4,7 +4,9 @@ import { IGanttBlock } from "components/gantt-chart";
|
||||||
|
|
||||||
export const renderIssueBlocksStructure = (blocks: IIssue[]): IGanttBlock[] =>
|
export const renderIssueBlocksStructure = (blocks: IIssue[]): IGanttBlock[] =>
|
||||||
blocks && blocks.length > 0
|
blocks && blocks.length > 0
|
||||||
? blocks.map((block) => ({
|
? blocks
|
||||||
|
.filter((b) => new Date(b?.start_date ?? "") <= new Date(b?.target_date ?? ""))
|
||||||
|
.map((block) => ({
|
||||||
data: block,
|
data: block,
|
||||||
id: block.id,
|
id: block.id,
|
||||||
sort_order: block.sort_order,
|
sort_order: block.sort_order,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue