sort boards alphabetically

This commit is contained in:
marlon-erler
2024-07-12 00:54:58 +02:00
parent d2f4c63a9d
commit a49724d71f
2 changed files with 10 additions and 15 deletions
+3 -8
View File
@@ -1465,14 +1465,9 @@
boards.value.get(boardTitle)?.items.push(messageObject); boards.value.get(boardTitle)?.items.push(messageObject);
}); });
}); });
const converter = (board) => KanbanBoardView(chat, board, selectedObject, isShowingObjectModal); const content = createProxyState([chat.objects], () => /* @__PURE__ */ createElement("div", { class: "flex-row large-gap width-100 height-100 scroll-v scroll-h padding" }, ...[...boards.value.values()].sort((a, b) => a.title.localeCompare(b.title)).map(
const content = createProxyState([chat.objects], () => /* @__PURE__ */ createElement( (board) => KanbanBoardView(chat, board, selectedObject, isShowingObjectModal)
"div", )));
{
class: "flex-row large-gap width-100 height-100 scroll-v scroll-h padding",
"children:append": [boards, converter]
}
));
return /* @__PURE__ */ createElement("div", { class: "width-100 height-100 scroll-no", "children:set": content }); return /* @__PURE__ */ createElement("div", { class: "width-100 height-100 scroll-no", "children:set": content });
} }
function KanbanBoardView(chat, kanbanBoard, selectedObject, isShowingObjectModal) { function KanbanBoardView(chat, kanbanBoard, selectedObject, isShowingObjectModal) {
+7 -7
View File
@@ -33,14 +33,14 @@ export function KanbanView(
}); });
}); });
const converter: React.StateItemConverter<KanbanBoard> = (board) =>
KanbanBoardView(chat, board, selectedObject, isShowingObjectModal);
const content = React.createProxyState([chat.objects], () => ( const content = React.createProxyState([chat.objects], () => (
<div <div class="flex-row large-gap width-100 height-100 scroll-v scroll-h padding">
class="flex-row large-gap width-100 height-100 scroll-v scroll-h padding" {...[...boards.value.values()]
children:append={[boards, converter]} .sort((a, b) => a.title.localeCompare(b.title))
></div> .map((board) =>
KanbanBoardView(chat, board, selectedObject, isShowingObjectModal)
)}
</div>
)); ));
return ( return (