Add document validation interface (mocked for now)

This commit is contained in:
NicolasCantu 2025-05-20 17:49:14 +02:00
parent b66ee42ddd
commit abfe581f29

View File

@ -27,6 +27,7 @@ declare global {
initializeEventListeners: () => void;
showProcess: () => void;
showProcessCreation: () => void;
showDocumentValidation: () => void;
updateNavbarName: (name: string) => void;
updateNavbarLastName: (lastName: string) => void;
showAlert: (title: string, text?: string, icon?: string) => void;
@ -49,6 +50,7 @@ import { getCorrectDOM } from '../../utils/document.utils';
import accountStyle from '../../../public/style/account.css?inline';
import Services from '../../services/service';
import { getProcessCreation } from './process-creation';
import { getDocumentValidation } from './document-validation';
let isAddingRow = false;
let currentRow: HTMLTableRowElement | null = null;
@ -176,6 +178,7 @@ class AccountElement extends HTMLElement {
<!-- <ul class="parameter-list-ul" onclick="window.showWallet()">Wallet 👛</ul> -->
<ul class="parameter-list-ul" onclick="window.showProcess()">Process </ul>
<ul class="parameter-list-ul" onclick="window.showProcessCreation()">Process Creation</ul>
<ul class="parameter-list-ul" onclick="window.showDocumentValidation()">Document Validation</ul>
<!-- <ul class="parameter-list-ul" onclick="window.showData()">Data 💾</ul> -->
</div>
@ -186,6 +189,7 @@ class AccountElement extends HTMLElement {
<!-- <div id="wallet-content"></div> -->
<div id="process-content"></div>
<div id="process-creation-content"></div>
<div id="document-validation-content"></div>
<!-- <div id="data-content"></div> -->
</div>
</div>
@ -197,6 +201,7 @@ class AccountElement extends HTMLElement {
window.showWallet = () => this.showWallet();
window.showProcess = () => this.showProcess();
window.showProcessCreation = () => this.showProcessCreation();
window.showDocumentValidation = () => this.showDocumentValidation();
window.showData = () => this.showData();
window.addWalletRow = () => this.addWalletRow();
window.confirmWalletRow = () => this.confirmWalletRow();
@ -835,6 +840,14 @@ private async showProcessCreation(): Promise<void> {
}
}
private async showDocumentValidation(): Promise<void> {
this.hideAllContent();
const container = this.shadowRoot?.getElementById('document-validation-content');
if (container) {
getDocumentValidation(container);
}
}
private async showProcess(): Promise<void> {
currentMode = 'process';
this.hideAllContent();