2019-11-19 11:19:21 +01:00
|
|
|
import {Component, OnInit} from '@angular/core';
|
2019-09-09 10:57:08 +02:00
|
|
|
import {BaseComponent} from "../base-page/base.component";
|
2019-12-03 17:20:57 +01:00
|
|
|
import {ConfigService} from "../../services/config.service";
|
2019-08-11 16:49:58 +02:00
|
|
|
|
|
|
|
@Component({
|
2019-11-19 11:19:21 +01:00
|
|
|
selector: 'framadate-create-or-retrieve',
|
|
|
|
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 {
|
2019-08-11 16:49:58 +02:00
|
|
|
|
2020-01-15 11:40:39 +01:00
|
|
|
loadedMyPolls: boolean = false;
|
|
|
|
|
2020-01-20 14:36:26 +01:00
|
|
|
|
2020-01-15 17:55:22 +01:00
|
|
|
constructor(public config: ConfigService) {
|
2019-09-09 10:57:08 +02:00
|
|
|
super(config);
|
|
|
|
}
|
2019-08-11 16:49:58 +02:00
|
|
|
|
2019-09-09 10:57:08 +02:00
|
|
|
ngOnInit() {
|
2020-01-16 11:13:34 +01:00
|
|
|
// if (!environment.production) {
|
|
|
|
// this.findMyPollsByEmail('tktest@tktest.com')
|
|
|
|
// }
|
|
|
|
|
2019-11-19 11:19:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
findMyPollsByEmail(email: string) {
|
2020-01-15 11:40:39 +01:00
|
|
|
if (!email) {
|
|
|
|
return
|
|
|
|
}
|
2019-12-03 17:20:57 +01:00
|
|
|
this.config.findPollsByEmail(email);
|
2020-01-15 11:40:39 +01:00
|
|
|
this.loadedMyPolls = true;
|
2019-11-19 11:19:21 +01:00
|
|
|
}
|
2019-08-11 16:49:58 +02:00
|
|
|
|
2020-01-20 14:36:26 +01:00
|
|
|
trackFunction(index: number, item: any): number {
|
|
|
|
return item.id;
|
|
|
|
};
|
2019-08-11 16:49:58 +02:00
|
|
|
}
|