The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
sort task groups reverse alphabetically by their status (#6886)
Avinash Bhardwaj1ff31a90f4a6
diff --git a/packages/twenty-front/src/modules/activities/tasks/components/TaskGroups.tsx b/packages/twenty-front/src/modules/activities/tasks/components/TaskGroups.tsxindex 4503fd9913b..a6e4999773b 100644--- a/packages/twenty-front/src/modules/activities/tasks/components/TaskGroups.tsx+++ b/packages/twenty-front/src/modules/activities/tasks/components/TaskGroups.tsx@@ -91,22 +91,24 @@ export const TaskGroups = ({);}+ const sortedTasksByStatus = Object.entries(+ groupBy(tasks, ({ status }) => status),+ ).toSorted(([statusA], [statusB]) => statusB.localeCompare(statusA));+return (<StyledContainer>- {Object.entries(groupBy(tasks, ({ status }) => status)).map(- ([status, tasksByStatus]: [string, Task[]]) => (- <TaskList- key={status}- title={status}- tasks={tasksByStatus}- button={- showAddButton && (- <AddTaskButton activityTargetableObjects={targetableObjects} />- )- }- />- ),- )}+ {sortedTasksByStatus.map(([status, tasksByStatus]: [string, Task[]]) => (+ <TaskList+ key={status}+ title={status}+ tasks={tasksByStatus}+ button={+ showAddButton && (+ <AddTaskButton activityTargetableObjects={targetableObjects} />+ )+ }+ />+ ))}</StyledContainer>);};diff --git a/packages/twenty-front/src/modules/activities/tasks/components/TaskRow.tsx b/packages/twenty-front/src/modules/activities/tasks/components/TaskRow.tsxindex 798bb077d79..52c1731db03 100644--- a/packages/twenty-front/src/modules/activities/tasks/components/TaskRow.tsx+++ b/packages/twenty-front/src/modules/activities/tasks/components/TaskRow.tsx@@ -36,6 +36,8 @@ const StyledTaskBody = styled.div`max-width: 100%;flex: 1;overflow: hidden;++ padding-bottom: ${({ theme }) => theme.spacing(0.25)};`;const StyledTaskTitle = styled.div<{@@ -44,10 +46,13 @@ const StyledTaskTitle = styled.div<{color: ${({ theme }) => theme.font.color.primary};font-weight: ${({ theme }) => theme.font.weight.medium};padding: 0 ${({ theme }) => theme.spacing(2)};+ padding-bottom: ${({ theme }) => theme.spacing(0.25)};text-decoration: ${({ completed }) => (completed ? 'line-through' : 'none')};white-space: nowrap;overflow: hidden;text-overflow: ellipsis;++ align-items: center;`;const StyledDueDate = styled.div<{@@ -71,8 +76,10 @@ const StyledPlaceholder = styled.div``;const StyledLeftSideContainer = styled.div`+ align-items: center;display: flex;flex: 1;+overflow: hidden;`;