accordeon_not_ok
This commit is contained in:
parent
ce25ecc237
commit
1cfaf5ab1b
@ -721,6 +721,25 @@ class ChatElement extends HTMLElement {
|
||||
|
||||
li.appendChild(roleList);
|
||||
groupList.appendChild(li);
|
||||
|
||||
container.addEventListener('click', (event) => {
|
||||
event.stopPropagation();
|
||||
container.classList.toggle('expanded');
|
||||
const roleList = container.parentElement?.querySelector('.role-list');
|
||||
const dm = container.parentElement?.querySelector('.dm');
|
||||
|
||||
if (roleList) {
|
||||
// Si le container est expanded, on montre la liste des rôles
|
||||
if (container.classList.contains('expanded')) {
|
||||
(roleList as HTMLElement).style.display = 'block';
|
||||
if (dm) (dm as HTMLElement).style.display = 'block';
|
||||
} else {
|
||||
// Sinon on cache la liste des rôles
|
||||
(roleList as HTMLElement).style.display = 'none';
|
||||
if (dm) (dm as HTMLElement).style.display = 'none';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -925,7 +944,7 @@ class ChatElement extends HTMLElement {
|
||||
if (this.processId) {
|
||||
console.log('🔍 Loading chat with process ID:', this.processId);
|
||||
this.loadGroupListFromAProcess(this.processId);
|
||||
} else {
|
||||
} else if(this.processId == null){
|
||||
console.error('❌ No process ID found in element attributes');
|
||||
this.loadAllGroupList();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user