forked from github/plane
fix: don't render invalid dated issues
This commit is contained in:
parent
70ed3c1fdf
commit
0dd336aec8
@ -4,11 +4,13 @@ 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
|
||||||
data: block,
|
.filter((b) => new Date(b?.start_date ?? "") <= new Date(b?.target_date ?? ""))
|
||||||
id: block.id,
|
.map((block) => ({
|
||||||
sort_order: block.sort_order,
|
data: block,
|
||||||
start_date: new Date(block.start_date ?? ""),
|
id: block.id,
|
||||||
target_date: new Date(block.target_date ?? ""),
|
sort_order: block.sort_order,
|
||||||
}))
|
start_date: new Date(block.start_date ?? ""),
|
||||||
|
target_date: new Date(block.target_date ?? ""),
|
||||||
|
}))
|
||||||
: [];
|
: [];
|
||||||
|
Loading…
Reference in New Issue
Block a user