diff --git a/src/app/config/PollConfig.ts b/src/app/config/PollConfig.ts
index a21725ab..8a6c7ffd 100644
--- a/src/app/config/PollConfig.ts
+++ b/src/app/config/PollConfig.ts
@@ -33,6 +33,7 @@ export class PollConfig {
myComment: string = 'wouah trop bien framadate!';
isAdmin: boolean = true;
myVoteStack: any;
+ myTempVoteStack =0;
myEmail: string = "tktest@tktest.com";
myPolls: any = [];// list of retrieved polls from the backend api
// date specific poll, we have the choice to setup different hours (timeList) for all possible dates (dateList), or use the same hours for all dates
diff --git a/src/app/config/mocks/mock-poll3.ts b/src/app/config/mocks/mock-poll3.ts
index 4e3dee84..bd17c8e1 100644
--- a/src/app/config/mocks/mock-poll3.ts
+++ b/src/app/config/mocks/mock-poll3.ts
@@ -1,6 +1,6 @@
export const mockPoll3 = {
"message": "your poll config",
- "data": {
+ "poll": {
"id": 3,
"title": "dessin animé préféré",
"customUrl": null,
@@ -37,7 +37,7 @@ export const mockPoll3 = {
"comments": {},
"defaultExpiracyDaysFromNow": 60
},
- "stacks_count": 10,
+ "stacks_count": 14,
"stacks": [
{
"id": 3,
@@ -351,9 +351,206 @@ export const mockPoll3 = {
"text": "Les mystérieuses cités d'or"
}
]
+ },
+ {
+ "id": 13,
+ "pseudo": "tk_TEST",
+ "creation_date": {
+ "date": "2020-01-23 14:31:07.000000",
+ "timezone_type": 3,
+ "timezone": "Europe/Berlin"
+ },
+ "votes": [
+ {
+ "id": 13,
+ "vote_id": 33,
+ "value": "yes",
+ "choice_id": 2,
+ "text": null
+ }
+ ]
+ },
+ {
+ "id": 14,
+ "pseudo": "tk_TEST",
+ "creation_date": {
+ "date": "2020-01-23 14:33:07.000000",
+ "timezone_type": 3,
+ "timezone": "Europe/Berlin"
+ },
+ "votes": [
+ {
+ "id": 14,
+ "vote_id": 34,
+ "value": "yes",
+ "choice_id": 2,
+ "text": null
+ }
+ ]
+ },
+ {
+ "id": 15,
+ "pseudo": "tk_TEST",
+ "creation_date": {
+ "date": "2020-01-23 14:33:11.000000",
+ "timezone_type": 3,
+ "timezone": "Europe/Berlin"
+ },
+ "votes": [
+ {
+ "id": 15,
+ "vote_id": 35,
+ "value": "yes",
+ "choice_id": 2,
+ "text": null
+ }
+ ]
+ },
+ {
+ "id": 16,
+ "pseudo": "tk_TEST",
+ "creation_date": {
+ "date": "2020-01-23 14:34:11.000000",
+ "timezone_type": 3,
+ "timezone": "Europe/Berlin"
+ },
+ "votes": [
+ {
+ "id": 16,
+ "vote_id": 36,
+ "value": "no",
+ "choice_id": 1,
+ "text": "orange"
+ },
+ {
+ "id": 16,
+ "vote_id": 37,
+ "value": "yes",
+ "choice_id": 2,
+ "text": null
+ }
+ ]
}
],
- "choices_count": 7,
+ "choices_count": {
+ "counts": {
+ "7": {
+ "yes": {
+ "count": 10,
+ "people": [
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST"
+ ]
+ },
+ "maybe": {
+ "count": 0,
+ "people": []
+ },
+ "no": {
+ "count": 1,
+ "people": [
+ "voting_people_TEST"
+ ]
+ }
+ },
+ "6": {
+ "yes": {
+ "count": 1,
+ "people": [
+ "voting_people_TEST"
+ ]
+ },
+ "maybe": {
+ "count": 9,
+ "people": [
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST"
+ ]
+ },
+ "no": {
+ "count": 0,
+ "people": []
+ }
+ },
+ "5": {
+ "yes": {
+ "count": 0,
+ "people": []
+ },
+ "maybe": {
+ "count": 0,
+ "people": []
+ },
+ "no": {
+ "count": 8,
+ "people": [
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST",
+ "voting_people_TEST"
+ ]
+ }
+ },
+ "2": {
+ "yes": {
+ "count": 4,
+ "people": [
+ "tk_TEST",
+ "tk_TEST",
+ "tk_TEST",
+ "tk_TEST"
+ ]
+ },
+ "maybe": {
+ "count": 0,
+ "people": []
+ },
+ "no": {
+ "count": 0,
+ "people": []
+ }
+ },
+ "1": {
+ "yes": {
+ "count": 0,
+ "people": []
+ },
+ "maybe": {
+ "count": 0,
+ "people": []
+ },
+ "no": {
+ "count": 1,
+ "people": [
+ "tk_TEST"
+ ]
+ }
+ }
+ },
+ "people": {
+ "voting_people_TEST": "yes",
+ "tk_TEST": "yes"
+ }
+ },
"choices": [
{
"id": 5,
@@ -362,7 +559,8 @@ export const mockPoll3 = {
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
- "text": "Vic le viking"
+ "text": "Vic le viking",
+ "url": null
},
{
"id": 6,
@@ -371,7 +569,8 @@ export const mockPoll3 = {
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
- "text": "Boumbo petite automobile"
+ "text": "Boumbo petite automobile",
+ "url": null
},
{
"id": 7,
@@ -380,7 +579,8 @@ export const mockPoll3 = {
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
- "text": "Les mystérieuses cités d'or"
+ "text": "Les mystérieuses cités d'or",
+ "url": null
},
{
"id": 8,
@@ -389,7 +589,8 @@ export const mockPoll3 = {
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
- "text": "Les mondes engloutis"
+ "text": "Les mondes engloutis",
+ "url": null
},
{
"id": 9,
@@ -398,7 +599,8 @@ export const mockPoll3 = {
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
- "text": "Foot 2 rue"
+ "text": "Foot 2 rue",
+ "url": null
},
{
"id": 10,
@@ -407,7 +609,8 @@ export const mockPoll3 = {
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
- "text": "Le chat, la vache, et l'océan"
+ "text": "Le chat, la vache, et l'océan",
+ "url": null
},
{
"id": 11,
@@ -416,7 +619,8 @@ export const mockPoll3 = {
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
- "text": "Digimon"
+ "text": "Digimon",
+ "url": null
}
],
"comments": [
@@ -562,4 +766,4 @@ export const mockPoll3 = {
}
],
"comments_count": 14
-};
+}
diff --git a/src/app/config/mocks/mock1.ts b/src/app/config/mocks/mock1.ts
index 10786af9..93cc4a2d 100644
--- a/src/app/config/mocks/mock1.ts
+++ b/src/app/config/mocks/mock1.ts
@@ -1,19 +1,19 @@
export const mockPoll1 = {
"message": "your poll config",
- "data": {
+ "poll": {
"id": 1,
"title": "citron ou orange",
"customUrl": null,
"description": "votre sorbert préféré",
"creationDate": {
- "date": "2020-01-22 14:28:19.000000",
+ "date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
- "timezone": "Europe/Paris"
+ "timezone": "Europe/Berlin"
},
"expiracyDate": {
- "date": "2020-01-22 14:28:19.000000",
+ "date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
- "timezone": "Europe/Paris"
+ "timezone": "Europe/Berlin"
},
"owner": {
"__initializer__": {},
@@ -41,9 +41,9 @@ export const mockPoll1 = {
"id": 1,
"pseudo": "voting_people_TEST",
"creation_date": {
- "date": "2020-01-22 14:28:19.000000",
+ "date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
- "timezone": "Europe/Paris"
+ "timezone": "Europe/Berlin"
},
"votes": [
{
@@ -66,9 +66,9 @@ export const mockPoll1 = {
"id": 2,
"pseudo": "voting_people_TEST",
"creation_date": {
- "date": "2020-01-22 14:28:19.000000",
+ "date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
- "timezone": "Europe/Paris"
+ "timezone": "Europe/Berlin"
},
"votes": [
{
@@ -81,14 +81,30 @@ export const mockPoll1 = {
]
}
],
- "choices_count": 2,
+ "choices_count": {
+ "counts": {
+ "1": {
+ "yes": 1,
+ "maybe": 1,
+ "no": 0
+ },
+ "2": {
+ "yes": 1,
+ "maybe": 0,
+ "no": 0
+ }
+ },
+ "people": {
+ "voting_people_TEST": "maybe"
+ }
+ },
"choices": [
{
"id": 1,
"date": {
- "date": "2020-01-22 14:28:19.000000",
+ "date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
- "timezone": "Europe/Paris"
+ "timezone": "Europe/Berlin"
},
"text": "orange",
"url": null
@@ -96,23 +112,14 @@ export const mockPoll1 = {
{
"id": 2,
"date": {
- "date": "2020-01-22 14:28:19.000000",
+ "date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
- "timezone": "Europe/Paris"
+ "timezone": "Europe/Berlin"
},
"text": "citron",
"url": null
}
],
- "comments": [{
- "id": 4,
- "text": "wouah trop bien framadate HOUHOUUUU!",
- "pseudo": "tk_TEST",
- "date": {
- "date": "2020-01-22 16:00:22.000000",
- "timezone_type": 3,
- "timezone": "Europe/Paris"
- }
- },],
+ "comments": [],
"comments_count": 0
};
diff --git a/src/app/pages/poll-display/poll-display.component.html b/src/app/pages/poll-display/poll-display.component.html
index 61ee6952..58d4a591 100644
--- a/src/app/pages/poll-display/poll-display.component.html
+++ b/src/app/pages/poll-display/poll-display.component.html
@@ -73,18 +73,22 @@