Further js refactoring

This commit is contained in:
Patrick Jentsch
2024-12-05 14:26:05 +01:00
parent df2bffe0fd
commit c97b2a886e
18 changed files with 110 additions and 68 deletions

View File

@ -12,10 +12,10 @@ nopaque.resource_lists.JobList = class JobList extends nopaque.resource_lists.Re
this.selectedItemIds = new Set();
this.userId = listContainerElement.dataset.userId;
if (this.userId === undefined) {return;}
app.liveUserRegistry.addEventListener('patch', (event) => {
app.userHub.addEventListener('patch', (event) => {
if (this.isInitialized) {this.onPatch(event.detail);}
});
app.liveUserRegistry.get(this.userId).then((user) => {
app.userHub.get(this.userId).then((user) => {
this.add(Object.values(user.jobs));
this.isInitialized = true;
});