From d98a6f21f9f6fe910c717cc85f33bc8ebd9f7976 Mon Sep 17 00:00:00 2001 From: Taran Nathan Date: Sat, 26 Sep 2026 21:21:17 -0700 Subject: [PATCH] order by defcon then date --- client/src/client.gleam | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/src/client.gleam b/client/src/client.gleam index 64184da..4b8be57 100644 --- a/client/src/client.gleam +++ b/client/src/client.gleam @@ -4,6 +4,7 @@ import gleam/int import gleam/json import gleam/list import gleam/option.{type Option, None, Some} +import gleam/order import gleam/result import gleam/string import lustre @@ -752,7 +753,12 @@ fn kanban_column(title: String, tasks: List(shared.Task)) -> Element(Message) { ]), ], tasks - |> list.sort(fn(a, b) { string.compare(a.due_date, b.due_date) }) + |> list.sort(fn(a, b) { + case int.compare(a.defcon, b.defcon) { + order.Eq -> string.compare(a.due_date, b.due_date) + a -> a + } + }) |> list.map(task_view), ), ) -- 2.47.3