diff --git a/src/app/core/enums/answer.enum.ts b/src/app/core/enums/answer.enum.ts index f807d8b0..2fbb0bea 100644 --- a/src/app/core/enums/answer.enum.ts +++ b/src/app/core/enums/answer.enum.ts @@ -1,5 +1,5 @@ export enum Answer { - YES = 'YES', - NO = 'NO', - MAYBE = 'MAYBE', + YES = 'yes', + NO = 'no', + MAYBE = 'maybe', } diff --git a/src/app/core/models/choice.model.ts b/src/app/core/models/choice.model.ts index 0535cb51..cad0a832 100644 --- a/src/app/core/models/choice.model.ts +++ b/src/app/core/models/choice.model.ts @@ -5,8 +5,9 @@ export class Choice { constructor( public id: number, public name: string, + public created_at: string, public enabled: boolean, - public imageUrl?: string, + public url?: string, public participants: Map> = new Map>([ [Answer.YES, new Set()], [Answer.NO, new Set()], diff --git a/src/app/core/models/poll.model.ts b/src/app/core/models/poll.model.ts index 66274463..38167d51 100644 --- a/src/app/core/models/poll.model.ts +++ b/src/app/core/models/poll.model.ts @@ -30,6 +30,7 @@ export class Poll { public allowSeveralHours?: boolean; public archiveNumberOfDays?: number; + public max_score?: number; public configuration: PollConfiguration = new PollConfiguration(); @@ -66,8 +67,8 @@ export class Poll { // new Comment(c.author, c.content, new Date(c.dateCreated)) // ) // .sort(Comment.sortChronologically), - // item.choices.map((c: Pick) => { - // const choice = new Choice(c.label, c.imageUrl, new Map(c.participants)); + // item.choices.map((c: Pick) => { + // const choice = new Choice(c.label, c.url, new Map(c.participants)); // choice.participants.forEach((value, key) => { // choice.participants.set(key, new Set(value)); // }); diff --git a/src/app/core/services/poll.service.ts b/src/app/core/services/poll.service.ts index 421fb2e1..98197f9e 100644 --- a/src/app/core/services/poll.service.ts +++ b/src/app/core/services/poll.service.ts @@ -86,6 +86,7 @@ export class PollService implements Resolve { } public updateCurrentPoll(poll: Poll): void { + console.log('poll', poll); this._poll.next(poll); } diff --git a/src/app/features/administration/form/date-select/date-select.component.ts b/src/app/features/administration/form/date-select/date-select.component.ts index 4ed63371..2208051f 100644 --- a/src/app/features/administration/form/date-select/date-select.component.ts +++ b/src/app/features/administration/form/date-select/date-select.component.ts @@ -107,7 +107,7 @@ export class DateSelectComponent implements OnInit { // this.dateList.forEach(elem=>{ // const newControlGroup = this.fb.group({ // label: this.fb.control('', [Validators.required]), - // imageUrl: ['', [Validators.required]], + // url: ['', [Validators.required]], // }); // // this.choices.push(newControlGroup); diff --git a/src/app/features/consultation/consultation.component.html b/src/app/features/consultation/consultation.component.html index 0345d140..9c5edc39 100644 --- a/src/app/features/consultation/consultation.component.html +++ b/src/app/features/consultation/consultation.component.html @@ -82,7 +82,7 @@ Detailed - + diff --git a/src/app/features/consultation/poll-results-compact/poll-results-compact.component.html b/src/app/features/consultation/poll-results-compact/poll-results-compact.component.html index 338571d6..03ae5893 100644 --- a/src/app/features/consultation/poll-results-compact/poll-results-compact.component.html +++ b/src/app/features/consultation/poll-results-compact/poll-results-compact.component.html @@ -1,32 +1,46 @@ +{{ poll.choices_stats.length }} choix
- +
+
+ + + +
+
+ +
+
+
+ + + +
+