funky-framadate-front/src/app/config.service.ts

40 lines
745 B
TypeScript
Raw Normal View History

2019-08-10 16:20:59 +02:00
import {Injectable} from '@angular/core';
/**
* une option de date dans les sondages spéciaux
*/
export interface DateOption {
text: string;
start?: string;
end?: string;
}
/**
* le service transverse à chaque page qui permet de syncroniser la configuration de sondage souhaitée
*/
@Injectable({
providedIn: 'root'
})
export class ConfigService {
step = 0;
stepMax = 3;
pollType = 'classic';
title = '';
description = '';
2019-08-10 16:57:36 +02:00
allowSeveralHours = false;
2019-08-10 16:20:59 +02:00
dateList: DateOption[] = [];
constructor() {
}
set(key, val) {
this[key] = val;
}
sendForm() {
// todo
console.log('sends the form');
alert('envoi de formulaire en XHR à faire');
}
}