From 7c64f1f8f08b75fb34ddd7459d8e9580202e5298 Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Thu, 16 Jan 2020 11:46:31 +0100 Subject: [PATCH] :zap: add email to creation --- src/app/config/PollConfig.ts | 3 +- .../end-confirmation.component.html | 26 +-- .../end-confirmation.component.ts | 5 +- src/app/pages/home/home.component.html | 151 ++++++++++-------- src/app/services/config.service.ts | 2 +- 5 files changed, 103 insertions(+), 84 deletions(-) diff --git a/src/app/config/PollConfig.ts b/src/app/config/PollConfig.ts index 102a55e5..b74d9473 100644 --- a/src/app/config/PollConfig.ts +++ b/src/app/config/PollConfig.ts @@ -47,13 +47,14 @@ export const defaultAnswers = [{ */ export class PollConfig { expiracyDateDefaultInDays = 60; + deletionDateAfterLastModification = 180; step = 0; stepMax = 3; pollType = 'classic';// classic or date title = 'titre'; description = 'ma description'; myName = 'mon pseudo'; - + myEmail: string = ""; // date specific poll, we have the choice to setup different hours (timeList) for all possible dates (dateList), or use the same hours for all dates allowSeveralHours = 'false'; // access diff --git a/src/app/pages/end-confirmation/end-confirmation.component.html b/src/app/pages/end-confirmation/end-confirmation.component.html index 1d29f484..988fbe9e 100644 --- a/src/app/pages/end-confirmation/end-confirmation.component.html +++ b/src/app/pages/end-confirmation/end-confirmation.component.html @@ -7,27 +7,31 @@ Votre sondage «  - {{config.title}} + {{config.title}} +  » a bien été créé !

Voici les liens d’accès au sondage, conservez-les soigneusement ! + (Si vous les perdez vous pourrez toujours les recevoir par email)

- Pour accéder au sondage et à tous ses paramètres : https://framadate.org/urladmindusondage + Pour accéder au sondage et à tous ses paramètres : {{config.urlAdmin}}

- + Voir le sondage coté administrateur·ice

- Note : Le sondage sera supprimé 180 jours après la date de sa dernière modification. + Note : Le sondage sera supprimé {{config.deletionDateAfterLastModification}} jours après la date de sa dernière + modification.

@@ -36,15 +40,16 @@

{{"resume.users"|translate}}

- Pour accéder au sondage : https://framadate.org/urladmindusondage + Pour accéder au sondage : {{config.urlPublic}}

- + Voir le sondage @@ -60,15 +65,16 @@ [(ngModel)]="mailToRecieve" paceholder="email" > +

- + Voir le sondage diff --git a/src/app/pages/end-confirmation/end-confirmation.component.ts b/src/app/pages/end-confirmation/end-confirmation.component.ts index 600067f2..c51c5cdd 100644 --- a/src/app/pages/end-confirmation/end-confirmation.component.ts +++ b/src/app/pages/end-confirmation/end-confirmation.component.ts @@ -9,18 +9,17 @@ import {ConfigService} from "../../services/config.service"; styleUrls: ['./end-confirmation.component.scss'] }) export class EndConfirmationComponent extends BaseComponent implements OnInit { - public adminLink = ''; - public publicLink = ''; mailToRecieve = ''; constructor(public config: ConfigService, public http: HttpClient) { super(config); + this.mailToRecieve = this.config.myEmail; } ngOnInit() { } - copyLink(adminLink: any) { + copyLink(str: any) { } diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index 4613bbb0..8f66401c 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -1,79 +1,92 @@
- -

- {{"creation.title"|translate}} -

- + +

+ {{"creation.title"|translate}} +

+ {{"creation.want"|translate}} - + - + -
+
- - -
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
+
+ + +
diff --git a/src/app/services/config.service.ts b/src/app/services/config.service.ts index 9a008f05..c7958a49 100644 --- a/src/app/services/config.service.ts +++ b/src/app/services/config.service.ts @@ -11,7 +11,7 @@ import {MessageService} from 'primeng/api'; providedIn: 'root' }) export class ConfigService extends PollConfig { - myEmail: string; + loading: boolean = false; baseHref: any = environment.baseApiHref; myPolls: any;// list of retrieved polls from the backend api