From 241674fe62175131d610876e24ca804113cdf7b3 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 5 Apr 2024 20:06:27 +0200 Subject: [PATCH] fix: remove information in approval page of a flow --- .../[job]/[resume]/[hmac]/+page.svelte | 51 ++++++++++--------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/frontend/src/routes/approve/[workspace]/[job]/[resume]/[hmac]/+page.svelte b/frontend/src/routes/approve/[workspace]/[job]/[resume]/[hmac]/+page.svelte index 84eb382ab8..06de1698f5 100644 --- a/frontend/src/routes/approve/[workspace]/[job]/[resume]/[hmac]/+page.svelte +++ b/frontend/src/routes/approve/[workspace]/[job]/[resume]/[hmac]/+page.svelte @@ -43,8 +43,6 @@ setLicense() onMount(() => { - getJob() - timeout = setInterval(getJob, 1000) window.onunhandledrejection = (event: PromiseRejectionEvent) => { event.preventDefault() timeout && clearInterval(timeout) @@ -62,6 +60,8 @@ console.log('Caught unhandled promise rejection without message', event) } } + getJob() + timeout = setInterval(getJob, 1000) }) onDestroy(() => { @@ -190,9 +190,12 @@ {/if} -

Flow arguments

+ {#if !completed} +

Flow arguments

+ + + {/if} -
{#if approver}

Approving as: {approver}

@@ -210,7 +213,7 @@ {/if} - {#if schema} + {#if schema && !completed} {#if emptyString($enterpriseLicense)} {:else} @@ -223,27 +226,29 @@ {/if} {/if} -
- {#if !job?.raw_flow?.modules?.[approvalStep]?.suspend?.hide_cancel} + {#if !completed} +
+ {#if !job?.raw_flow?.modules?.[approvalStep]?.suspend?.hide_cancel} + + {:else} +
+ {/if} + Approve - {:else} -
- {/if} - - -
+
+ {/if} {#if !completed && !alreadyResumed && job?.raw_flow?.modules?.[approvalStep]?.suspend?.user_auth_required && job?.raw_flow?.modules?.[approvalStep]?.suspend?.self_approval_disabled && $userStore && $userStore.email === job.email && $userStore.is_admin}
@@ -258,7 +263,7 @@ >Flow run details (require auth)
- {#if job && job.raw_flow} + {#if job && job.raw_flow && !completed}

Flow details