From f49047865d6aec69841e39f40c409782437c3f14 Mon Sep 17 00:00:00 2001 From: Pascal Date: Wed, 22 Jan 2025 16:38:48 +0100 Subject: [PATCH] trie_ok --- src/pages/chat/chat.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pages/chat/chat.ts b/src/pages/chat/chat.ts index 3e2d2bd..e8ec4a6 100755 --- a/src/pages/chat/chat.ts +++ b/src/pages/chat/chat.ts @@ -789,6 +789,12 @@ class ChatElement extends HTMLElement { }); }); + processResult.sort((a, b) => { + const aInSet = this.userProcessSet.has(a.states[0].commited_in); + const bInSet = this.userProcessSet.has(b.states[0].commited_in); + return bInSet ? 1 : aInSet ? -1 : 0; + }); + for (const process of processResult) { const li = document.createElement('li'); li.className = 'group-list-item'; @@ -807,6 +813,7 @@ class ChatElement extends HTMLElement { li.onmouseout = () => { li.style.backgroundColor = 'var(--accent-color)'; }; + li.classList.add('my-process'); console.log("✅ Processus trouvé dans le set:", oneProcess); }