From dd9e8950f4473dd39841ba3150bff23b8f172016 Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Tue, 4 Feb 2020 11:35:29 +0100 Subject: [PATCH] :zap: unify update config after fetching a poll config --- src/app/app.module.ts | 2 ++ src/app/config/PollConfig.ts | 1 + .../end-confirmation.component.html | 20 ++----------------- .../poll-display/poll-display.component.html | 11 ++-------- .../poll-display/poll-display.component.ts | 15 +++++--------- .../visibility/visibility.component.html | 2 +- src/app/services/config.service.ts | 1 + 7 files changed, 14 insertions(+), 38 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 07094b7b..46e5344e 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -54,6 +54,7 @@ import {ErasableInputComponent} from './ui/erasable-input/erasable-input.compone import {ConfirmDialogModule} from 'primeng/confirmdialog'; import {DialogModule} from 'primeng/dialog'; import {DateValueAccessorModule} from "angular-date-value-accessor"; +import {CopyTextComponent} from './ui/copy-text/copy-text.component'; export class MyMissingTranslationHandler implements MissingTranslationHandler { handle(params: MissingTranslationHandlerParams) { @@ -97,6 +98,7 @@ export function HttpLoaderFactory(http: HttpClient) { VotingCommentComponent, ResettableInputDirective, ErasableInputComponent, + CopyTextComponent, ], imports: [ diff --git a/src/app/config/PollConfig.ts b/src/app/config/PollConfig.ts index 12e3bfe2..10e37a34 100644 --- a/src/app/config/PollConfig.ts +++ b/src/app/config/PollConfig.ts @@ -54,6 +54,7 @@ export class PollConfig { urlSlugPublic = null; urlPublic = environment.baseHref + '/#/poll/id/3'; urlAdmin = environment.baseHref + '/#/admin/d65es45fd45sdf45sd345f312sdf31sgfd345'; + adminKey = ''; canModifyAnswers = 1;// everybody, self, nobody (= just admin) whoModifiesAnswers = "self";// everybody, self, nobody (= just admin) whoCanChangeAnswers = 'everybody';// everybody, self, nobody (= just admin) diff --git a/src/app/pages/end-confirmation/end-confirmation.component.html b/src/app/pages/end-confirmation/end-confirmation.component.html index ed76da26..a0a60d6c 100644 --- a/src/app/pages/end-confirmation/end-confirmation.component.html +++ b/src/app/pages/end-confirmation/end-confirmation.component.html @@ -21,15 +21,7 @@ {{config.urlAdmin}}

- + Voir le sondage coté administrateur·ice @@ -48,15 +40,7 @@

- + Voir le sondage diff --git a/src/app/pages/poll-display/poll-display.component.html b/src/app/pages/poll-display/poll-display.component.html index 292e9fca..00f575d9 100644 --- a/src/app/pages/poll-display/poll-display.component.html +++ b/src/app/pages/poll-display/poll-display.component.html @@ -34,7 +34,6 @@ -