From 67963bfb02e1ac3739e9c397c5597b1a2617f8ea Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Tue, 20 May 2025 17:45:28 +0200 Subject: [PATCH] Add process creation tab --- src/pages/account/account.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/pages/account/account.ts b/src/pages/account/account.ts index ca58d43..89d4ebd 100755 --- a/src/pages/account/account.ts +++ b/src/pages/account/account.ts @@ -26,6 +26,7 @@ declare global { handleLogout: () => void; initializeEventListeners: () => void; showProcess: () => void; + showProcessCreation: () => void; updateNavbarName: (name: string) => void; updateNavbarLastName: (lastName: string) => void; showAlert: (title: string, text?: string, icon?: string) => void; @@ -47,6 +48,7 @@ import { addressToEmoji } from '../../utils/sp-address.utils'; import { getCorrectDOM } from '../../utils/document.utils'; import accountStyle from '../../../public/style/account.css?inline'; import Services from '../../services/service'; +import { getProcessCreation } from './process-creation'; let isAddingRow = false; let currentRow: HTMLTableRowElement | null = null; @@ -173,6 +175,7 @@ class AccountElement extends HTMLElement { + @@ -182,6 +185,7 @@ class AccountElement extends HTMLElement {
+
@@ -192,6 +196,7 @@ class AccountElement extends HTMLElement { window.showPairing = () => this.showPairing(); window.showWallet = () => this.showWallet(); window.showProcess = () => this.showProcess(); + window.showProcessCreation = () => this.showProcessCreation(); window.showData = () => this.showData(); window.addWalletRow = () => this.addWalletRow(); window.confirmWalletRow = () => this.confirmWalletRow(); @@ -822,6 +827,13 @@ private handleAvatarUpload(event: Event): void { } } +private async showProcessCreation(): Promise { + this.hideAllContent(); + const container = this.shadowRoot?.getElementById('process-creation-content'); + if (container) { + getProcessCreation(container); + } +} private async showProcess(): Promise { currentMode = 'process'; @@ -1020,7 +1032,7 @@ private showContractPopup(contractId: string, event?: Event) { // Fonction utilitaire pour cacher tous les contenus private hideAllContent(): void { - const contents = ['pairing-content', 'wallet-content', 'process-content', 'data-content']; + const contents = ['pairing-content', 'wallet-content', 'process-content', 'process-creation-content', 'data-content', 'document-validation-content']; contents.forEach(id => { const element = this.shadowRoot?.getElementById(id); if (element) {