diff --git a/apps/app/components/core/spreadsheet-view/single-issue.tsx b/apps/app/components/core/spreadsheet-view/single-issue.tsx index d3086e254..f763e706c 100644 --- a/apps/app/components/core/spreadsheet-view/single-issue.tsx +++ b/apps/app/components/core/spreadsheet-view/single-issue.tsx @@ -128,15 +128,15 @@ export const SingleSpreadsheetIssue: React.FC = ({ className="relative group grid auto-rows-[minmax(44px,1fr)] hover:rounded-sm hover:bg-brand-surface-2 border-b border-brand-base w-full min-w-max" style={{ gridTemplateColumns }} > -
+
- {properties.key && ( - <> -
+
+ {properties.key && ( + {issue.project_detail?.identifier}-{issue.sequence_id} -
- - )} + + )} +
{issue.sub_issues_count > 0 && ( @@ -237,9 +237,14 @@ export const SingleSpreadsheetIssue: React.FC = ({ />
)} -
+
{!isNotAllowed && ( - +
diff --git a/apps/app/components/core/spreadsheet-view/spreadsheet-columns.tsx b/apps/app/components/core/spreadsheet-view/spreadsheet-columns.tsx index 9f615f165..85d05a288 100644 --- a/apps/app/components/core/spreadsheet-view/spreadsheet-columns.tsx +++ b/apps/app/components/core/spreadsheet-view/spreadsheet-columns.tsx @@ -19,13 +19,17 @@ export const SpreadsheetColumns: React.FC = ({ columnData, gridTemplateCo "spreadsheetViewSorting", "" ); + const { storedValue: activeSortingProperty, setValue: setActiveSortingProperty } = + useLocalStorage("spreadsheetViewActiveSortingProperty", ""); const { orderBy, setOrderBy } = useSpreadsheetIssuesView(); const handleOrderBy = (order: TIssueOrderByOptions, itemKey: string) => { setOrderBy(order); setSelectedMenuItem(`${order}_${itemKey}`); + setActiveSortingProperty(order === "-created_at" ? "" : itemKey); }; + return (
= ({ columnData, gridTemplateCo if (col.isActive) { return (
- {col.propertyName === "title" || col.propertyName === "priority" ? ( + {col.propertyName === "title" ? (
- {col.icon ? ( -
) : ( + {activeSortingProperty === col.propertyName && ( +
+ +
+ )} + {col.icon ? ( = ({ columnData, gridTemplateCo : "text-brand-secondary hover:text-brand-base" }`} > -
+
{col.propertyName === "assignee" || col.propertyName === "labels" ? ( <> - A-Z - Ascending + + + + + A + + Z ) : col.propertyName === "due_date" ? ( <> - 1-9 - Ascending - - ) : col.propertyName === "estimate" ? ( - <> - 0 + + + + + New - 10 + Old ) : ( <> + + + + First Last @@ -146,7 +162,7 @@ export const SpreadsheetColumns: React.FC = ({ columnData, gridTemplateCo
= ({ columnData, gridTemplateCo : "text-brand-secondary hover:text-brand-base" }`} > -
+
{col.propertyName === "assignee" || col.propertyName === "labels" ? ( <> - Z-A - Descending + + + + + Z + + A ) : col.propertyName === "due_date" ? ( <> - 9-1 - Descending - - ) : col.propertyName === "estimate" ? ( - <> - 10 + + + + + Old - 0 + New ) : ( <> + + + + Last First @@ -198,38 +240,32 @@ export const SpreadsheetColumns: React.FC = ({ columnData, gridTemplateCo />
- { - handleOrderBy("-created_at", col.propertyName); - }} - > -
-
- - None -
- - -
-
+ key={col.property} + onClick={() => { + handleOrderBy("-created_at", col.propertyName); + }} + > +
+
+ + + + + Clear sorting +
+
+ + )} )}
diff --git a/apps/app/components/core/spreadsheet-view/spreadsheet-view.tsx b/apps/app/components/core/spreadsheet-view/spreadsheet-view.tsx index 6f36b2dbb..c47ddd805 100644 --- a/apps/app/components/core/spreadsheet-view/spreadsheet-view.tsx +++ b/apps/app/components/core/spreadsheet-view/spreadsheet-view.tsx @@ -56,7 +56,7 @@ export const SpreadsheetView: React.FC = ({ return (
-
+
{spreadsheetIssues ? ( diff --git a/apps/app/constants/spreadsheet.ts b/apps/app/constants/spreadsheet.ts index 5ef60f40d..8e4bdb21d 100644 --- a/apps/app/constants/spreadsheet.ts +++ b/apps/app/constants/spreadsheet.ts @@ -24,6 +24,8 @@ export const SPREADSHEET_COLUMN = [ propertyName: "priority", colName: "Priority", colSize: "128px", + ascendingOrder: "priority", + descendingOrder: "-priority", }, { propertyName: "assignee",