Skip to content

Commit

Permalink
Fix ordering of tasks on multiple history list
Browse files Browse the repository at this point in the history
  • Loading branch information
willemarcel committed Jun 8, 2021
1 parent 72d7c63 commit d931498
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions frontend/src/components/taskSelection/multipleTaskHistories.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@ import { TaskHistory } from './taskActivity';
export const MultipleTaskHistoriesAccordion = ({ handleChange, tasks, projectId }) => {
return (
<Accordion className="bn" allowMultipleExpanded allowZeroExpanded onChange={handleChange}>
{tasks.map((t) => (
<AccordionItem className="bb b--light-gray" key={t.taskId} uuid={t.taskId}>
<AccordionItemHeading className="b ttu tracked">
<AccordionItemButton className="bg-white blue-grey pointer pa3 w-100 tl bn accordion_button">
<FormattedMessage {...messages.taskActivity} values={{ n: t.taskId }} />
</AccordionItemButton>
</AccordionItemHeading>
<AccordionItemPanel className="pa2 accordion_panel">
<TaskHistory projectId={projectId} taskId={t.taskId} commentPayload={undefined} />
</AccordionItemPanel>
</AccordionItem>
))}
{tasks
.sort((n1, n2) => n1.taskId - n2.taskId)
.map((t) => (
<AccordionItem className="bb b--light-gray" key={t.taskId} uuid={t.taskId}>
<AccordionItemHeading className="b ttu tracked">
<AccordionItemButton className="bg-white blue-grey pointer pa3 w-100 tl bn accordion_button">
<FormattedMessage {...messages.taskActivity} values={{ n: t.taskId }} />
</AccordionItemButton>
</AccordionItemHeading>
<AccordionItemPanel className="pa2 accordion_panel">
<TaskHistory projectId={projectId} taskId={t.taskId} commentPayload={undefined} />
</AccordionItemPanel>
</AccordionItem>
))}
</Accordion>
);
};

0 comments on commit d931498

Please sign in to comment.