Skip to content

Commit

Permalink
fix: dashboard upcoming issues list (#1904)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 committed Aug 18, 2023
1 parent 125e909 commit 1f8117c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions apps/app/components/workspace/issues-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ export const IssuesList: React.FC<Props> = ({ issues, type }) => {
>
<h4 className="capitalize">{type}</h4>
<h4 className="col-span-2">Issue</h4>
<h4>Due Date</h4>
<h4>{type === "overdue" ? "Due" : "Start"} Date</h4>
</div>
<div className="max-h-72 overflow-y-scroll">
{issues.length > 0 ? (
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 (
<Link
Expand All @@ -75,7 +77,7 @@ export const IssuesList: React.FC<Props> = ({ issues, type }) => {
</h5>
<h5 className="col-span-2">{truncateText(issue.name, 30)}</h5>
<h5 className="cursor-default">
{renderShortDateWithYearFormat(new Date(issue.target_date as string))}
{renderShortDateWithYearFormat(new Date(date?.toString() ?? ""))}
</h5>
</div>
</a>
Expand Down
3 changes: 2 additions & 1 deletion apps/app/types/issues.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ export interface IIssueLite {
id: string;
name: string;
project_id: string;
target_date: string;
start_date?: string | null;
target_date?: string | null;
workspace__slug: string;
}

Expand Down

1 comment on commit 1f8117c

@vercel
Copy link

@vercel vercel bot commented on 1f8117c Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane-dev – ./apps/app

plane-dev-git-develop-plane.vercel.app
plane-dev-plane.vercel.app
plane-dev.vercel.app

Please sign in to comment.