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.documentJobArea = document.querySelector('#jobs'); this.listjs.list.addEventListener('click', (event) => {this.onClick(event)}); document.querySelectorAll('.job-list-selection-action-trigger[data-selection-action]').forEach((element) => { element.addEventListener('click', (event) => {this.onSelectionAction(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 |
---|