class JobList extends ResourceList { static autoInit() { for (let jobListElement of document.querySelectorAll('.job-list:not(.no-autoinit)')) { new JobList(jobListElement); } } constructor(listContainerElement, options = {}) { super(listContainerElement, options); this.listjs.list.addEventListener('click', (event) => {this.onClick(event)}); this.isInitialized = false; this.selectedItemIds = new Set(); this.userId = listContainerElement.dataset.userId; if (this.userId === undefined) {return;} app.subscribeUser(this.userId).then((response) => { app.socket.on('PATCH', (patch) => { if (this.isInitialized) {this.onPatch(patch);} }); }); app.getUser(this.userId).then((user) => { this.add(Object.values(user.jobs)); this.isInitialized = true; }); } get item() { return `
Service | Title and Description | Status |
---|