forked from tykayn/funky-framadate-front
🐛 fix some config keys
This commit is contained in:
parent
f9d1cfff3a
commit
1005695153
@ -2,7 +2,7 @@
|
||||
* une option de date dans les sondages spéciaux
|
||||
*/
|
||||
import {environment} from "../../environments/environment";
|
||||
import {defaultAnswers} from "./defaultConfigs";
|
||||
import {defaultAnswers, defaultDates, defaultTimeOfDay} from "./defaultConfigs";
|
||||
|
||||
export interface DateOption {
|
||||
timeList: any;
|
||||
@ -55,8 +55,8 @@ export class PollConfig {
|
||||
canModifyAnswers = 1;// everybody, self, nobody (= just admin)
|
||||
whoModifiesAnswers = "self";// everybody, self, nobody (= just admin)
|
||||
whoCanChangeAnswers = 'everybody';// everybody, self, nobody (= just admin)
|
||||
dateList: DateOption[]; // sets of days as strings, config to set identical time for days in a special days poll
|
||||
timeList: DateOption[]; // ranges of time expressed as strings
|
||||
dateList: any = defaultDates; // sets of days as strings, config to set identical time for days in a special days poll
|
||||
timeList: any = defaultTimeOfDay; // ranges of time expressed as strings
|
||||
|
||||
answers: any = defaultAnswers;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
export const timeOfDay = [{
|
||||
export const defaultTimeOfDay = [{
|
||||
timeList: [],
|
||||
literal: 'matin'
|
||||
},
|
||||
|
@ -3,7 +3,7 @@ import {ConfigService} from '../../services/config.service';
|
||||
import {BaseComponent} from '../base-page/base.component';
|
||||
import {DOCUMENT} from '@angular/common';
|
||||
import {MessageService} from "primeng/api";
|
||||
import {timeOfDay} from "../../config/defaultConfigs";
|
||||
import {defaultTimeOfDay} from "../../config/defaultConfigs";
|
||||
|
||||
@Component({
|
||||
selector: 'framadate-dates',
|
||||
@ -67,7 +67,7 @@ export class DatesComponent extends BaseComponent implements OnInit {
|
||||
}
|
||||
|
||||
resetTimes() {
|
||||
this.config.timeList = timeOfDay;
|
||||
this.config.timeList = defaultTimeOfDay;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,7 +5,7 @@ import {environment} from "../../environments/environment";
|
||||
import {ConfirmationService, MessageService} from 'primeng/api';
|
||||
import {Router} from "@angular/router";
|
||||
import {mockMyPolls} from "../config/mocks/mockmypolls";
|
||||
import {defaultAnswers, defaultDates, timeOfDay} from "../config/defaultConfigs";
|
||||
import {defaultAnswers, defaultDates, defaultTimeOfDay} from "../config/defaultConfigs";
|
||||
import {mockPoll1} from "../config/mocks/mock1";
|
||||
|
||||
/**
|
||||
@ -32,7 +32,7 @@ export class ConfigService extends PollConfig {
|
||||
this.currentPoll = mockPoll1;
|
||||
this.myPolls = mockMyPolls;
|
||||
this.dateList = defaultDates;
|
||||
this.timeList = timeOfDay;
|
||||
this.timeList = defaultTimeOfDay;
|
||||
this.answers = defaultAnswers;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user