From 51c906866e7c8160b046b9914a4a32108b4d0da6 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Fri, 28 Mar 2025 12:51:12 +0100 Subject: [PATCH] Neutralize process page --- src/pages/account/account.ts | 39 +- src/pages/process/process-list-component.ts | 84 +- src/pages/process/process.html | 4 +- src/pages/process/process.ts | 900 ++++++++++---------- src/router.ts | 8 +- 5 files changed, 521 insertions(+), 514 deletions(-) diff --git a/src/pages/account/account.ts b/src/pages/account/account.ts index b74b503..4515168 100755 --- a/src/pages/account/account.ts +++ b/src/pages/account/account.ts @@ -866,22 +866,29 @@ private updateProcessTableContent(processes: any[]): void { return; } - tbody.innerHTML = processes.map(process => ` - - ${process.name || 'N/A'} - ${process.role || 'N/A'} - -
- - - - - ${process.notifications?.unread || 0}/${process.notifications?.total || 0} - -
- - - `).join(''); + const service = await Services.getInstance(); + + /*tbody.innerHTML = processes.map((process: Process) => { + const processName = process.states[0]?.public_data?.memberPublicName || 'N/A'; + const processId = process.states[0]?.state_id || 'N/A'; + + return ` + + ${processName} + ${service.getRoles(process) || 'N/A'} + +
+ + + + + 0/0 + +
+ + + `; + }).join('');*/ } diff --git a/src/pages/process/process-list-component.ts b/src/pages/process/process-list-component.ts index 098a1ee..3033515 100644 --- a/src/pages/process/process-list-component.ts +++ b/src/pages/process/process-list-component.ts @@ -1,49 +1,49 @@ -import processHtml from './process.html?raw'; -import processScript from './process.ts?raw'; -import processCss from '../../4nk.css?raw'; -import { init } from './process'; +// import processHtml from './process.html?raw'; +// import processScript from './process.ts?raw'; +// import processCss from '../../4nk.css?raw'; +// import { init } from './process'; -export class ProcessListComponent extends HTMLElement { - _callback: any; - constructor() { - super(); - this.attachShadow({ mode: 'open' }); - } +// export class ProcessListComponent extends HTMLElement { +// _callback: any; +// constructor() { +// super(); +// this.attachShadow({ mode: 'open' }); +// } - connectedCallback() { - console.log('CALLBACK PROCESS LIST PAGE'); - this.render(); - setTimeout(() => { - init(); - }, 500); - } +// connectedCallback() { +// console.log('CALLBACK PROCESS LIST PAGE'); +// this.render(); +// setTimeout(() => { +// init(); +// }, 500); +// } - set callback(fn) { - if (typeof fn === 'function') { - this._callback = fn; - } else { - console.error('Callback is not a function'); - } - } +// set callback(fn) { +// if (typeof fn === 'function') { +// this._callback = fn; +// } else { +// console.error('Callback is not a function'); +// } +// } - get callback() { - return this._callback; - } +// get callback() { +// return this._callback; +// } - render() { - if (this.shadowRoot) - this.shadowRoot.innerHTML = ` - ${processHtml} -