diff --git a/src/app/config/mocks/mock-poll3.ts b/src/app/config/mocks/mock-poll3.ts index bd17c8e1..d8edb432 100644 --- a/src/app/config/mocks/mock-poll3.ts +++ b/src/app/config/mocks/mock-poll3.ts @@ -47,22 +47,37 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { + "choice_id": 5 + }, + "6": { + "id": 3, + "vote_id": 5, + "value": "maybe", + "choice_id": 6, + "text": "Boumbo petite automobile" + }, + "7": { "id": 3, "vote_id": 4, "value": "yes", "choice_id": 7, "text": "Les mystérieuses cités d'or" }, - { - "id": 3, - "vote_id": 5, - "value": "maybe", - "choice_id": 6, - "text": "Boumbo petite automobile" + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 } - ] + } }, { "id": 4, @@ -72,29 +87,37 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { + "choice_id": 5 + }, + "6": { "id": 4, "vote_id": 6, "value": "yes", "choice_id": 6, "text": "Boumbo petite automobile" }, - { - "id": 4, - "vote_id": 7, - "value": "yes", - "choice_id": 7, - "text": "Les mystérieuses cités d'or" - }, - { + "7": { "id": 4, "vote_id": 8, "value": "no", "choice_id": 7, "text": "Les mystérieuses cités d'or" + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 } - ] + } }, { "id": 5, @@ -104,29 +127,41 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { "id": 5, "vote_id": 9, "value": "no", "choice_id": 5, "text": "Vic le viking" }, - { + "6": { "id": 5, "vote_id": 10, "value": "maybe", "choice_id": 6, "text": "Boumbo petite automobile" }, - { + "7": { "id": 5, "vote_id": 11, "value": "yes", "choice_id": 7, "text": "Les mystérieuses cités d'or" + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 } - ] + } }, { "id": 6, @@ -136,29 +171,41 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { "id": 6, "vote_id": 12, "value": "no", "choice_id": 5, "text": "Vic le viking" }, - { + "6": { "id": 6, "vote_id": 13, "value": "maybe", "choice_id": 6, "text": "Boumbo petite automobile" }, - { + "7": { "id": 6, "vote_id": 14, "value": "yes", "choice_id": 7, "text": "Les mystérieuses cités d'or" + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 } - ] + } }, { "id": 7, @@ -168,29 +215,41 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { "id": 7, "vote_id": 15, "value": "no", "choice_id": 5, "text": "Vic le viking" }, - { + "6": { "id": 7, "vote_id": 16, "value": "maybe", "choice_id": 6, "text": "Boumbo petite automobile" }, - { + "7": { "id": 7, "vote_id": 17, "value": "yes", "choice_id": 7, "text": "Les mystérieuses cités d'or" + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 } - ] + } }, { "id": 8, @@ -200,29 +259,41 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { "id": 8, "vote_id": 18, "value": "no", "choice_id": 5, "text": "Vic le viking" }, - { + "6": { "id": 8, "vote_id": 19, "value": "maybe", "choice_id": 6, "text": "Boumbo petite automobile" }, - { + "7": { "id": 8, "vote_id": 20, "value": "yes", "choice_id": 7, "text": "Les mystérieuses cités d'or" + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 } - ] + } }, { "id": 9, @@ -232,29 +303,41 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { "id": 9, "vote_id": 21, "value": "no", "choice_id": 5, "text": "Vic le viking" }, - { + "6": { "id": 9, "vote_id": 22, "value": "maybe", "choice_id": 6, "text": "Boumbo petite automobile" }, - { + "7": { "id": 9, "vote_id": 23, "value": "yes", "choice_id": 7, "text": "Les mystérieuses cités d'or" + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 } - ] + } }, { "id": 10, @@ -264,29 +347,41 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { "id": 10, "vote_id": 24, "value": "no", "choice_id": 5, "text": "Vic le viking" }, - { + "6": { "id": 10, "vote_id": 25, "value": "maybe", "choice_id": 6, "text": "Boumbo petite automobile" }, - { + "7": { "id": 10, "vote_id": 26, "value": "yes", "choice_id": 7, "text": "Les mystérieuses cités d'or" + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 } - ] + } }, { "id": 11, @@ -296,29 +391,41 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { "id": 11, "vote_id": 27, "value": "no", "choice_id": 5, "text": "Vic le viking" }, - { + "6": { "id": 11, "vote_id": 28, "value": "maybe", "choice_id": 6, "text": "Boumbo petite automobile" }, - { + "7": { "id": 11, "vote_id": 29, "value": "yes", "choice_id": 7, "text": "Les mystérieuses cités d'or" + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 } - ] + } }, { "id": 12, @@ -328,29 +435,41 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { "id": 12, "vote_id": 30, "value": "no", "choice_id": 5, "text": "Vic le viking" }, - { + "6": { "id": 12, "vote_id": 31, "value": "maybe", "choice_id": 6, "text": "Boumbo petite automobile" }, - { + "7": { "id": 12, "vote_id": 32, "value": "yes", "choice_id": 7, "text": "Les mystérieuses cités d'or" + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 } - ] + } }, { "id": 13, @@ -360,15 +479,36 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { + "choice_id": 5 + }, + "6": { + "choice_id": 6 + }, + "7": { + "choice_id": 7 + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 + }, + "2": { "id": 13, "vote_id": 33, "value": "yes", "choice_id": 2, "text": null } - ] + } }, { "id": 14, @@ -378,15 +518,36 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { + "choice_id": 5 + }, + "6": { + "choice_id": 6 + }, + "7": { + "choice_id": 7 + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 + }, + "2": { "id": 14, "vote_id": 34, "value": "yes", "choice_id": 2, "text": null } - ] + } }, { "id": 15, @@ -396,15 +557,36 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { + "choice_id": 5 + }, + "6": { + "choice_id": 6 + }, + "7": { + "choice_id": 7 + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 + }, + "2": { "id": 15, "vote_id": 35, "value": "yes", "choice_id": 2, "text": null } - ] + } }, { "id": 16, @@ -414,22 +596,43 @@ export const mockPoll3 = { "timezone_type": 3, "timezone": "Europe/Berlin" }, - "votes": [ - { + "votes": { + "5": { + "choice_id": 5 + }, + "6": { + "choice_id": 6 + }, + "7": { + "choice_id": 7 + }, + "8": { + "choice_id": 8 + }, + "9": { + "choice_id": 9 + }, + "10": { + "choice_id": 10 + }, + "11": { + "choice_id": 11 + }, + "1": { "id": 16, "vote_id": 36, "value": "no", "choice_id": 1, "text": "orange" }, - { + "2": { "id": 16, "vote_id": 37, "value": "yes", "choice_id": 2, "text": null } - ] + } } ], "choices_count": { @@ -545,10 +748,6 @@ export const mockPoll3 = { ] } } - }, - "people": { - "voting_people_TEST": "yes", - "tk_TEST": "yes" } }, "choices": [ diff --git a/src/app/pages/poll-display/poll-display.component.html b/src/app/pages/poll-display/poll-display.component.html index 58d4a591..3a6ae413 100644 --- a/src/app/pages/poll-display/poll-display.component.html +++ b/src/app/pages/poll-display/poll-display.component.html @@ -1,35 +1,38 @@
+ Pseudo + | ++ + {{choice.text}} + | +
{{voteStack.pseudo}}
-
-
-
-
-
+
-
-
- {{v.id}}
- {{v.answer}}
-
- |
+ + + + + {{voteStack.votes[v].value}} + + | +