diff --git a/src/app/core/models/poll.model.ts b/src/app/core/models/poll.model.ts index 4a797788..3324b3f5 100644 --- a/src/app/core/models/poll.model.ts +++ b/src/app/core/models/poll.model.ts @@ -64,10 +64,11 @@ export class Poll { constructor(public owner: Owner = new Owner(), public title = 'mon titre', public custom_url: string = '') {} public getAdministrationUrl(): string { - return `${environment.api.baseHref}/administration/polls/${this.custom_url}`; + return `${environment.frontDomain}/poll/admin/${this.admin_key}`; } public getParticipationUrl(): string { - return `${environment.api.baseHref}/participation/polls/${this.custom_url}`; + // TODO handle pass access + return `${environment.frontDomain}/poll/${this.custom_url}/consultation`; } } diff --git a/src/app/features/administration/form/base-config/base-config.component.html b/src/app/features/administration/form/base-config/base-config.component.html index 262ed155..d1884a65 100644 --- a/src/app/features/administration/form/base-config/base-config.component.html +++ b/src/app/features/administration/form/base-config/base-config.component.html @@ -26,8 +26,7 @@ > - -
+

Pour accéder au sondage et à tous ses paramètres : - {{ poll.custom_url }} + {{ poll.getAdministrationUrl() }}

- - + + Voir le sondage coté administrateur·ice

@@ -42,17 +42,11 @@

{{ 'resume.users' | translate }}

- Pour accéder au sondage : - {{ window.location.href + 'poll/' + poll.custom_url + 'consultation' }} - + Pour modifier le sondage : + {{ poll.getAdministrationUrl() }}

- - - Voir le sondage - + + Modifier le sondage

{{ 'resume.links_mail' | translate }}

@@ -66,7 +60,7 @@ Envoyer les liens du sondage - Voir le sondage + Voir le sondage côté public
diff --git a/src/app/features/administration/success/success.component.ts b/src/app/features/administration/success/success.component.ts index 6dcb2d5d..28da08fb 100644 --- a/src/app/features/administration/success/success.component.ts +++ b/src/app/features/administration/success/success.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { PollService } from '../../../core/services/poll.service'; import { Poll } from '../../../core/models/poll.model'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-success', @@ -11,6 +12,7 @@ export class SuccessComponent implements OnInit { @Input() poll: Poll; mailToRecieve: string; window: any = window; + environment = environment; constructor(private pollService: PollService) {} diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index b92940e1..96c7a9d3 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -11,6 +11,7 @@ const apiV1 = { }; export const environment = { + frontDomain: 'https://framadate-api.cipherbliss.com', production: true, display_routes: true, autofill: true, diff --git a/src/environments/environment.ts b/src/environments/environment.ts index c35aa216..e540479d 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -18,6 +18,7 @@ const apiV1 = { }; export const environment = { + frontDomain: 'https://framadate-api.cipherbliss.com', production: false, display_routes: true, autofill: true,