From 237984c04073efa133ee2fd5ba18ee90a9e16a0e Mon Sep 17 00:00:00 2001 From: Tykayn Date: Fri, 5 Feb 2021 17:02:52 +0100 Subject: [PATCH] add choices for the future --- src/app/core/models/poll.model.ts | 32 +-- .../advanced-config.component.html | 90 +++++- .../base-config/base-config.component.html | 81 +++--- .../form/base-config/base-config.component.ts | 39 ++- .../date-select/date-select.component.html | 264 +++++++++--------- .../form/date-select/date-select.component.ts | 9 +- .../administration/form/form.component.html | 25 +- .../administration/form/form.component.ts | 31 +- .../form/text-select/text-select.component.ts | 6 +- 9 files changed, 324 insertions(+), 253 deletions(-) diff --git a/src/app/core/models/poll.model.ts b/src/app/core/models/poll.model.ts index 62cfacb1..f7afe108 100644 --- a/src/app/core/models/poll.model.ts +++ b/src/app/core/models/poll.model.ts @@ -36,22 +36,22 @@ export class Poll { new User(item.owner.pseudo, item.owner.email, undefined), item.slug, item.title, - item.description, - item.configuration, - item.comments - .map( - (c: Pick) => - 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)); - choice.participants.forEach((value, key) => { - choice.participants.set(key, new Set(value)); - }); - choice.updateCounts(); - return choice; - }) + item.description + // item.configuration, + // item.comments + // .map( + // (c: Pick) => + // 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)); + // choice.participants.forEach((value, key) => { + // choice.participants.set(key, new Set(value)); + // }); + // choice.updateCounts(); + // return choice; + // }) ); } } diff --git a/src/app/features/administration/form/advanced-config/advanced-config.component.html b/src/app/features/administration/form/advanced-config/advanced-config.component.html index 0862e8c7..35a44b7b 100644 --- a/src/app/features/administration/form/advanced-config/advanced-config.component.html +++ b/src/app/features/administration/form/advanced-config/advanced-config.component.html @@ -23,9 +23,8 @@
-