diff --git a/src/pages/process/process.ts b/src/pages/process/process.ts index 8ccbbfe..8a951e7 100755 --- a/src/pages/process/process.ts +++ b/src/pages/process/process.ts @@ -36,44 +36,6 @@ export async function init() { search_div.appendChild(autocomplete_list); search_div.appendChild(dropdown_icon); - const processes = await getProcesses(); - let hasMessaging = false; - - for (const {key, value} of processes) { - const processName = await getDescription(key, value); - if (processName) { - console.log('adding process name to list:', processName); - if (processName === "messaging") { - hasMessaging = true; - } - const opt = new Option(processName); - opt.value = processName; - opt.setAttribute('data-process-id', key); - element.add(opt); - } - } - - if (!hasMessaging) { - console.log('No existing processes - creating new messaging process'); - setTimeout(async () => { - await createMessagingProcess(); - }, 0); - - const updatedProcesses = await getProcesses(); - for (const {key, value} of updatedProcesses) { - const processName = await getDescription(key, value); - if (processName) { - console.log('adding new process to list:', processName); - const opt = new Option(processName); - opt.value = processName; - opt.setAttribute('data-process-id', key); - element.add(opt); - } - } - } else { - console.log('Existing processes found - skipping messaging creation'); - } - // set the wrapper as child (instead of the element) element.parentNode?.replaceChild(wrapper, element); // set element as child of wrapper