2022-02-03 09:32:52 +01:00
|
|
|
import { Component, Input } from '@angular/core';
|
2021-04-30 14:15:21 +02:00
|
|
|
import { PollService } from '../../../core/services/poll.service';
|
|
|
|
import { Poll } from '../../../core/models/poll.model';
|
2021-04-30 16:12:02 +02:00
|
|
|
import { environment } from 'src/environments/environment';
|
2021-05-03 12:36:03 +02:00
|
|
|
import { Title } from '@angular/platform-browser';
|
2021-05-18 22:51:06 +02:00
|
|
|
import { DateUtilitiesService } from '../../../core/services/date.utilities.service';
|
2022-02-03 09:32:52 +01:00
|
|
|
import { ClipboardService } from 'ngx-clipboard';
|
|
|
|
import { ToastService } from '../../../core/services/toast.service';
|
|
|
|
import { TranslateService } from '@ngx-translate/core';
|
2020-12-16 17:21:01 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-success',
|
|
|
|
templateUrl: './success.component.html',
|
|
|
|
styleUrls: ['./success.component.scss'],
|
|
|
|
})
|
2021-04-30 23:33:56 +02:00
|
|
|
export class SuccessComponent {
|
2021-04-30 14:15:21 +02:00
|
|
|
@Input() poll: Poll;
|
|
|
|
mailToRecieve: string;
|
2021-04-30 16:00:22 +02:00
|
|
|
window: any = window;
|
2021-04-30 16:12:02 +02:00
|
|
|
environment = environment;
|
2021-11-14 17:43:18 +01:00
|
|
|
today: Date = new Date();
|
2022-02-03 09:32:52 +01:00
|
|
|
|
|
|
|
constructor(
|
|
|
|
public pollService: PollService,
|
|
|
|
private dateUtils: DateUtilitiesService,
|
2022-02-10 11:15:48 +01:00
|
|
|
|
2022-02-03 09:32:52 +01:00
|
|
|
private toastService: ToastService,
|
|
|
|
private titleService: Title
|
|
|
|
) {
|
2021-11-08 12:09:35 +01:00
|
|
|
this.titleService.setTitle(
|
|
|
|
environment.appTitle + ' - 🎉 succès de création de sondage - ' + this.pollService.form.value.title
|
|
|
|
);
|
2021-05-03 12:36:03 +02:00
|
|
|
}
|
2021-04-30 14:15:21 +02:00
|
|
|
|
|
|
|
sendToEmail() {
|
|
|
|
alert('todo');
|
|
|
|
}
|
2020-12-16 17:21:01 +01:00
|
|
|
}
|