2020-04-14 11:28:33 +02:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
2020-04-20 18:11:00 +02:00
|
|
|
import { BaseComponent } from '../example/base-page/base.component';
|
2020-04-14 11:28:33 +02:00
|
|
|
import { ConfigService } from '../../services/config.service';
|
2019-08-11 16:49:58 +02:00
|
|
|
|
|
|
|
@Component({
|
2020-04-22 12:56:18 +02:00
|
|
|
selector: 'app-create-or-retrieve',
|
2020-04-21 10:50:26 +02:00
|
|
|
templateUrl: './create-or-retrieve.component.html',
|
|
|
|
styleUrls: ['./create-or-retrieve.component.scss'],
|
2019-08-11 16:49:58 +02:00
|
|
|
})
|
2019-09-09 10:57:08 +02:00
|
|
|
export class CreateOrRetrieveComponent extends BaseComponent implements OnInit {
|
2020-04-21 10:50:26 +02:00
|
|
|
loadedMyPolls = false;
|
2020-01-15 11:40:39 +01:00
|
|
|
|
2020-04-21 10:50:26 +02:00
|
|
|
constructor(public config: ConfigService) {
|
|
|
|
super(config);
|
|
|
|
}
|
2019-08-11 16:49:58 +02:00
|
|
|
|
2020-04-21 10:50:26 +02:00
|
|
|
ngOnInit() {
|
|
|
|
// if (!environment.production) {
|
|
|
|
// this.findMyPollsByEmail('tktest@tktest.com')
|
|
|
|
// }
|
|
|
|
}
|
2019-11-19 11:19:21 +01:00
|
|
|
|
2020-04-21 10:50:26 +02:00
|
|
|
findMyPollsByEmail(email: string) {
|
|
|
|
if (!email) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.config.findPollsByEmail(email);
|
|
|
|
this.loadedMyPolls = true;
|
|
|
|
}
|
2019-08-11 16:49:58 +02:00
|
|
|
|
2020-04-21 10:50:26 +02:00
|
|
|
trackFunction(index: number, item: any): number {
|
|
|
|
return item.id;
|
|
|
|
}
|
2019-08-11 16:49:58 +02:00
|
|
|
}
|