From 4f3a892eeb3b198b81eac763edf64d5913d5778c Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 2 Feb 2024 17:45:04 +0100 Subject: [PATCH] added support for initializing from execution --- ccp/js/executionformcontroller.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ccp/js/executionformcontroller.js b/ccp/js/executionformcontroller.js index 41ff9fd..c8f6273 100644 --- a/ccp/js/executionformcontroller.js +++ b/ccp/js/executionformcontroller.js @@ -16,14 +16,18 @@ class CCPExecutionForm extends HTMLElement{ this.connectNewExecutionRequest() + this.render() + const params = new URLSearchParams(window.location.search) - if(params.get('method')){ + if(params.get('execution')){ + const execution = { id : params.get('execution') } + this.prepareFromExecution(execution) + } else if(params.get('method')){ this.#method = params.get('method') this.loadMethod() + } else { + this.showMethod() } - - this.render() - this.showMethod() } static get observedAttributes() {