/** * une option de date dans les sondages spéciaux */ export interface DateOption { text: string; start?: string; end?: string; } /** * configuration of the poll, add new fields at will */ export class PollConfig { step = 0; stepMax = 3; pollType = 'classic'; title = ''; description = ''; visibility = 'link_only'; // date specific poll allowSeveralHours = false; dateList: DateOption[] = []; answers: string[] = []; addAnswer() { this.answers.push(''); } removeAnswer(answer: string) { const indexFound = this.answers.indexOf(answer); if (indexFound !== -1) { this.answers.splice(indexFound); } } }