From 3bb6f0374ce323deff08053fd8807e3c32c7436f Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Fri, 16 Sep 2022 10:56:18 +0200 Subject: [PATCH] Can use responses page to edit the survey (as this is default admin page for survey) --- .../surveys/[sid]/responses/index.svelte | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/ui/src/routes/surveys/[sid]/responses/index.svelte b/ui/src/routes/surveys/[sid]/responses/index.svelte index f90105f..6414f38 100644 --- a/ui/src/routes/surveys/[sid]/responses/index.svelte +++ b/ui/src/routes/surveys/[sid]/responses/index.svelte @@ -13,20 +13,26 @@ {#await surveyP then survey} - goto(`surveys/${survey.id}/admin`)} - /> + {#if $user && $user.is_admin} + + goto(`surveys/${survey.id}/admin`)} + /> + {/if}

< @@ -36,6 +42,10 @@

+ {#if $user && $user.is_admin && edit} + edit = false} /> + {/if} + {#await getQuestions(survey.id)}