mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: dashboard upcoming issues list (#1904)
This commit is contained in:
parent
125e9090ea
commit
1f8117c987
@ -45,12 +45,14 @@ export const IssuesList: React.FC<Props> = ({ issues, type }) => {
|
|||||||
>
|
>
|
||||||
<h4 className="capitalize">{type}</h4>
|
<h4 className="capitalize">{type}</h4>
|
||||||
<h4 className="col-span-2">Issue</h4>
|
<h4 className="col-span-2">Issue</h4>
|
||||||
<h4>Due Date</h4>
|
<h4>{type === "overdue" ? "Due" : "Start"} Date</h4>
|
||||||
</div>
|
</div>
|
||||||
<div className="max-h-72 overflow-y-scroll">
|
<div className="max-h-72 overflow-y-scroll">
|
||||||
{issues.length > 0 ? (
|
{issues.length > 0 ? (
|
||||||
issues.map((issue) => {
|
issues.map((issue) => {
|
||||||
const dateDifference = getDateDifference(new Date(issue.target_date as string));
|
const date = type === "overdue" ? issue.target_date : issue.start_date;
|
||||||
|
|
||||||
|
const dateDifference = getDateDifference(new Date(date as string));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
@ -75,7 +77,7 @@ export const IssuesList: React.FC<Props> = ({ issues, type }) => {
|
|||||||
</h5>
|
</h5>
|
||||||
<h5 className="col-span-2">{truncateText(issue.name, 30)}</h5>
|
<h5 className="col-span-2">{truncateText(issue.name, 30)}</h5>
|
||||||
<h5 className="cursor-default">
|
<h5 className="cursor-default">
|
||||||
{renderShortDateWithYearFormat(new Date(issue.target_date as string))}
|
{renderShortDateWithYearFormat(new Date(date?.toString() ?? ""))}
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
3
apps/app/types/issues.d.ts
vendored
3
apps/app/types/issues.d.ts
vendored
@ -207,7 +207,8 @@ export interface IIssueLite {
|
|||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
project_id: string;
|
project_id: string;
|
||||||
target_date: string;
|
start_date?: string | null;
|
||||||
|
target_date?: string | null;
|
||||||
workspace__slug: string;
|
workspace__slug: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user