From 172b1a82d1d061b1b44e2a561391d6742a3d3820 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 14 Mar 2024 14:35:22 +0200 Subject: [PATCH] Sort series by title in task name --- frontend/src/System/Tasks/Queued/QueuedTaskRowNameCell.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/System/Tasks/Queued/QueuedTaskRowNameCell.tsx b/frontend/src/System/Tasks/Queued/QueuedTaskRowNameCell.tsx index 193c78afc..a3e327e01 100644 --- a/frontend/src/System/Tasks/Queued/QueuedTaskRowNameCell.tsx +++ b/frontend/src/System/Tasks/Queued/QueuedTaskRowNameCell.tsx @@ -23,13 +23,16 @@ export default function QueuedTaskRowNameCell( } const series = useSelector(createMultiSeriesSelector(seriesIds)); + const sortedSeries = series.sort((a, b) => + a.sortTitle.localeCompare(b.sortTitle) + ); return ( {commandName} - {series.length ? ( - - {series.map((s) => s.title).join(', ')} + {sortedSeries.length ? ( + - {sortedSeries.map((s) => s.title).join(', ')} ) : null} {body.seasonNumber ? (