forked from github/plane
feat: created on and updated on column added in spreadsheet view (#1454)
* feat: created on and updated on column added in spreadsheet view * fix: build fix * refactor: simplify logic --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
committed by
GitHub
parent
353c85120f
commit
7868bfa2b1
@@ -270,9 +270,16 @@ export const IssuesFilterView: React.FC = () => {
|
||||
if (key === "estimate" && !isEstimateActive) return null;
|
||||
|
||||
if (
|
||||
(issueView === "spreadsheet" && key === "attachment_count") ||
|
||||
(issueView === "spreadsheet" && key === "link") ||
|
||||
(issueView === "spreadsheet" && key === "sub_issue_count")
|
||||
issueView === "spreadsheet" &&
|
||||
(key === "attachment_count" ||
|
||||
key === "link" ||
|
||||
key === "sub_issue_count")
|
||||
)
|
||||
return null;
|
||||
|
||||
if (
|
||||
issueView !== "spreadsheet" &&
|
||||
(key === "created_on" || key === "updated_on")
|
||||
)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ import {
|
||||
import { ICurrentUserResponse, IIssue, ISubIssueResponse, Properties, UserAuth } from "types";
|
||||
// helper
|
||||
import { copyTextToClipboard } from "helpers/string.helper";
|
||||
import { renderLongDetailDateFormat } from "helpers/date-time.helper";
|
||||
|
||||
type Props = {
|
||||
issue: IIssue;
|
||||
@@ -345,6 +346,16 @@ export const SingleSpreadsheetIssue: React.FC<Props> = ({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{properties.created_on && (
|
||||
<div className="flex items-center text-xs cursor-default text-brand-secondary text-center p-2 group-hover:bg-brand-surface-2 border-brand-base">
|
||||
{renderLongDetailDateFormat(issue.created_at)}
|
||||
</div>
|
||||
)}
|
||||
{properties.updated_on && (
|
||||
<div className="flex items-center text-xs cursor-default text-brand-secondary text-center p-2 group-hover:bg-brand-surface-2 border-brand-base">
|
||||
{renderLongDetailDateFormat(issue.updated_at)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -123,7 +123,9 @@ export const SpreadsheetColumns: React.FC<Props> = ({ columnData, gridTemplateCo
|
||||
<Icon iconName="east" className="text-sm" />
|
||||
<span>Z</span>
|
||||
</>
|
||||
) : col.propertyName === "due_date" ? (
|
||||
) : col.propertyName === "due_date" ||
|
||||
col.propertyName === "created_on" ||
|
||||
col.propertyName === "updated_on" ? (
|
||||
<>
|
||||
<span className="relative flex items-center h-6 w-6">
|
||||
<Icon
|
||||
|
||||
Reference in New Issue
Block a user