build for production, 🐛 fix publicy of vars in templates

archived-develop
Baptiste Lemoine 3 years ago
parent d2c726012b
commit ea43430e1b

@ -1,18 +1,19 @@
{
"name": "framadate-funky-frontend",
"version": "0.1.0",
"version": "1.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"serve": "ng serve",
"build": "ng build --crossOrigin=anonymous --aot=false",
"build:demo": "ng build --crossOrigin=anonymous --extractCss=true --baseHref=https://framadate-api.cipherbliss.com --aot=true --progress=true --statsJson=true",
"package": " cat dist/framadate/{polyfills,runtime,main}.js > ./package.js",
"build:demo": "ng build --crossOrigin=anonymous --extractCss=true --baseHref=https://framadate-api.cipherbliss.com --progress=true --output-hashing=none --prod && npm run package",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"trans": "ng xi18n --output-path=src/locale --i18n-locale=fr"
},
"private": true,
"private": false,
"dependencies": {
"@angular/animations": "^8.2.14",
"@angular/cdk": "^8.2.3",

@ -2,8 +2,7 @@
* une option de date dans les sondages spéciaux
*/
import {environment} from "../../environments/environment";
import {mockMyPolls} from "./mocks/mockmypolls";
import {defaultAnswers, defaultDates, timeOfDay} from "./defaultConfigs";
import {defaultAnswers} from "./defaultConfigs";
export interface DateOption {
timeList: any;
@ -33,7 +32,7 @@ export class PollConfig {
myComment: string = 'wouah trop bien framadate!';
isAdmin: boolean = true;
myEmail: string = "tktest@tktest.com";
myPolls: any = mockMyPolls;// list of retrieved polls from the backend api
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
allowSeveralHours = 'false';
// access
@ -42,7 +41,7 @@ export class PollConfig {
creationDate = new Date();
expirationDate = ''; // expiracy date
pollId = null; // id of the current poll when created. data given by the backend api
selectedPoll = null; // current poll selected with createPoll or getPoll of ConfigService
currentPoll; // current poll selected with createPoll or getPoll of ConfigService
passwordAccess = 0;
password = '';
customUrl = ''; // custom slug in the url, must be unique
@ -52,8 +51,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[] = defaultDates; // sets of days as strings, config to set identical time for days in a special days poll
timeList: DateOption[] = timeOfDay; // ranges of time expressed as strings
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
answers: any = defaultAnswers;

@ -1,5 +1,5 @@
{
"message": "your poll config v2",
"message": "your poll config",
"data": {
"id": 3,
"title": "dessin animé préféré",
@ -38,8 +38,8 @@
"defaultExpiracyDaysFromNow": 60
},
"stacks_count": 10,
"stacks": {
"3": {
"stacks": [
{
"id": 3,
"pseudo": "voting_people_TEST",
"creation_date": {
@ -47,24 +47,24 @@
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": {
"4": {
"votes": [
{
"id": 3,
"vote_id": 4,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
},
"5": {
{
"id": 3,
"vote_id": 5,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
}
}
]
},
"4": {
{
"id": 4,
"pseudo": "voting_people_TEST",
"creation_date": {
@ -72,31 +72,31 @@
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": {
"6": {
"votes": [
{
"id": 4,
"vote_id": 6,
"value": "yes",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
"7": {
{
"id": 4,
"vote_id": 7,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
},
"8": {
{
"id": 4,
"vote_id": 8,
"value": "no",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
}
]
},
"5": {
{
"id": 5,
"pseudo": "voting_people_TEST",
"creation_date": {
@ -104,31 +104,31 @@
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": {
"9": {
"votes": [
{
"id": 5,
"vote_id": 9,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
"10": {
{
"id": 5,
"vote_id": 10,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
"11": {
{
"id": 5,
"vote_id": 11,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
}
]
},
"6": {
{
"id": 6,
"pseudo": "voting_people_TEST",
"creation_date": {
@ -136,31 +136,31 @@
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": {
"12": {
"votes": [
{
"id": 6,
"vote_id": 12,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
"13": {
{
"id": 6,
"vote_id": 13,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
"14": {
{
"id": 6,
"vote_id": 14,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
}
]
},
"7": {
{
"id": 7,
"pseudo": "voting_people_TEST",
"creation_date": {
@ -168,31 +168,31 @@
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": {
"15": {
"votes": [
{
"id": 7,
"vote_id": 15,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
"16": {
{
"id": 7,
"vote_id": 16,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
"17": {
{
"id": 7,
"vote_id": 17,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
}
]
},
"8": {
{
"id": 8,
"pseudo": "voting_people_TEST",
"creation_date": {
@ -200,31 +200,31 @@
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": {
"18": {
"votes": [
{
"id": 8,
"vote_id": 18,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
"19": {
{
"id": 8,
"vote_id": 19,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
"20": {
{
"id": 8,
"vote_id": 20,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
}
]
},
"9": {
{
"id": 9,
"pseudo": "voting_people_TEST",
"creation_date": {
@ -232,31 +232,31 @@
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": {
"21": {
"votes": [
{
"id": 9,
"vote_id": 21,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
"22": {
{
"id": 9,
"vote_id": 22,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
"23": {
{
"id": 9,
"vote_id": 23,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
}
]
},
"10": {
{
"id": 10,
"pseudo": "voting_people_TEST",
"creation_date": {
@ -264,31 +264,31 @@
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": {
"24": {
"votes": [
{
"id": 10,
"vote_id": 24,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
"25": {
{
"id": 10,
"vote_id": 25,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
"26": {
{
"id": 10,
"vote_id": 26,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
}
]
},
"11": {
{
"id": 11,
"pseudo": "voting_people_TEST",
"creation_date": {
@ -296,31 +296,31 @@
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": {
"27": {
"votes": [
{
"id": 11,
"vote_id": 27,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
"28": {
{
"id": 11,
"vote_id": 28,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
"29": {
{
"id": 11,
"vote_id": 29,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
}
]
},
"12": {
{
"id": 12,
"pseudo": "voting_people_TEST",
"creation_date": {
@ -328,34 +328,34 @@
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": {
"30": {
"votes": [
{
"id": 12,
"vote_id": 30,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
"31": {
{
"id": 12,
"vote_id": 31,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
"32": {
{
"id": 12,
"vote_id": 32,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
}
]
}
},
],
"choices_count": 7,
"choices": {
"5": {
"choices": [
{
"id": 5,
"date": {
"date": "2020-01-20 16:45:48.000000",
@ -364,7 +364,7 @@
},
"text": "Vic le viking"
},
"6": {
{
"id": 6,
"date": {
"date": "2020-01-20 16:45:48.000000",
@ -373,7 +373,7 @@
},
"text": "Boumbo petite automobile"
},
"7": {
{
"id": 7,
"date": {
"date": "2020-01-20 16:45:48.000000",
@ -382,7 +382,7 @@
},
"text": "Les mystérieuses cités d'or"
},
"8": {
{
"id": 8,
"date": {
"date": "2020-01-20 16:45:48.000000",
@ -391,7 +391,7 @@
},
"text": "Les mondes engloutis"
},
"9": {
{
"id": 9,
"date": {
"date": "2020-01-20 16:45:48.000000",
@ -400,7 +400,7 @@
},
"text": "Foot 2 rue"
},
"10": {
{
"id": 10,
"date": {
"date": "2020-01-20 16:45:48.000000",
@ -409,7 +409,7 @@
},
"text": "Le chat, la vache, et l'océan"
},
"11": {
{
"id": 11,
"date": {
"date": "2020-01-20 16:45:48.000000",
@ -418,9 +418,9 @@
},
"text": "Digimon"
}
},
"comments": {
"3": {
],
"comments": [
{
"id": 3,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -430,7 +430,7 @@
"timezone": "Europe/Berlin"
}
},
"4": {
{
"id": 4,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -440,7 +440,7 @@
"timezone": "Europe/Berlin"
}
},
"5": {
{
"id": 5,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -450,7 +450,7 @@
"timezone": "Europe/Berlin"
}
},
"6": {
{
"id": 6,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -460,7 +460,7 @@
"timezone": "Europe/Berlin"
}
},
"7": {
{
"id": 7,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -470,7 +470,7 @@
"timezone": "Europe/Berlin"
}
},
"8": {
{
"id": 8,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -480,7 +480,7 @@
"timezone": "Europe/Berlin"
}
},
"9": {
{
"id": 9,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -490,7 +490,7 @@
"timezone": "Europe/Berlin"
}
},
"10": {
{
"id": 10,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -500,7 +500,7 @@
"timezone": "Europe/Berlin"
}
},
"11": {
{
"id": 11,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -510,7 +510,7 @@
"timezone": "Europe/Berlin"
}
},
"12": {
{
"id": 12,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -520,7 +520,7 @@
"timezone": "Europe/Berlin"
}
},
"13": {
{
"id": 13,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
@ -530,7 +530,7 @@
"timezone": "Europe/Berlin"
}
},
"14": {
{
"id": 14,
"text": "wouah trop bien framadate wouhouuu!",
"pseudo": "tk_TEST",
@ -540,7 +540,7 @@
"timezone": "Europe/Berlin"
}
},
"15": {
{
"id": 15,
"text": "wouah trop bien framadate wouhouucghfdghu!",
"pseudo": "tk_TEST",
@ -550,7 +550,7 @@
"timezone": "Europe/Berlin"
}
},
"16": {
{
"id": 16,
"text": "wouah trop bien framadate woudghdghhouucghfdghu!",
"pseudo": "tk_TEST",
@ -560,6 +560,6 @@
"timezone": "Europe/Berlin"
}
}
},
],
"comments_count": 14
}

@ -1,12 +1,12 @@
export const mockComments = [
{
name: "Bulbizarre",
pseudo: "Bulbizarre",
date: "23 décembre 2019",
text: "Pokem ipsum dolor sit amet Electric Cottonee Scratch Leech Life Ice Berry Ducklett. Leaf Green Durant Zoroark\n" +
" Skitty Rock Luxio Surskit. Glacier Badge",
},
{
name: "Marylin",
pseudo: "Marylin",
date: "5 Janvier 2020",
text: "j'ai vu de la lumière o_o",
},

@ -1,5 +1,3 @@
import {mockComments} from "./mock-comments";
export const mockPoll3 = {
"message": "your poll config",
"data": {
@ -8,19 +6,21 @@ export const mockPoll3 = {
"customUrl": null,
"description": "choisissez votre animé préféré",
"creationDate": {
"date": "2020-01-15 15:07:53.000000",
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Paris"
"timezone": "Europe/Berlin"
},
"expiracyDate": {
"date": "2020-03-17 15:07:53.000000",
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Paris"
"timezone": "Europe/Berlin"
},
"owner": {
"__initializer__": {},
"__cloner__": {},
"__isInitialized__": false
"__initializer__": null,
"__cloner__": null,
"__isInitialized__": true,
"pseudo": "tk_TEST",
"email": "tktest@tktest.com"
},
"kind": "text",
"allowedAnswers": [
@ -37,65 +37,318 @@ export const mockPoll3 = {
"comments": {},
"defaultExpiracyDaysFromNow": 60
},
"stacks_count": 4,
"stacks_count": 10,
"stacks": [
{
"pseudo": "Wulfila",
"id": 3,
"pseudo": "voting_people_TEST",
"creation_date": {
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": [
{
"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"
}
]
},
{
"id": 4,
"pseudo": "voting_people_TEST",
"creation_date": {
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": [
{
"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"
},
{
"id": 4,
"vote_id": 8,
"value": "no",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
]
},
{
"id": 5,
"pseudo": "voting_people_TEST",
"creation_date": {
"date": "2020-01-21 10:33:26.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": [
{
"id": 5,
"answer": "yes",
"vote_id": 9,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
{
"id": 5,
"vote_id": 10,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
{
"id": 5,
"vote_id": 11,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
]
},
{
"id": 6,
"pseudo": "voting_people_TEST",
"creation_date": {
"date": "2020-01-21 10:36:58.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": [
{
"id": 6,
"vote_id": 12,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
{
"id": 6,
"vote_id": 13,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
{
"id": 6,
"answer": "maybe",
"vote_id": 14,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
]
},
{
"id": 7,
"pseudo": "voting_people_TEST",
"creation_date": {
"date": "2020-01-21 10:39:12.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": [
{
"id": 7,
"vote_id": 15,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
{
"id": 7,
"answer": "no",
"vote_id": 16,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
{
"id": 7,
"vote_id": 17,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
]
},
{
"pseudo": "Tykayn",
"id": 8,
"pseudo": "voting_people_TEST",
"creation_date": {
"date": "2020-01-21 10:39:13.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": [
{
"id": 5,
"answer": "yes",
"id": 8,
"vote_id": 18,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
{
"id": 8,
"vote_id": 19,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
{
"id": 8,
"answer": "maybe",
"vote_id": 20,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
]
},
{
"id": 9,
"pseudo": "voting_people_TEST",
"creation_date": {
"date": "2020-01-21 10:42:19.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": [
{
"id": 9,
"vote_id": 21,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
{
"id": 9,
"answer": "no",
"vote_id": 22,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
{
"id": 9,
"vote_id": 23,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
]
},
{
"pseudo": "CopyCat",
"id": 10,
"pseudo": "voting_people_TEST",
"creation_date": {
"date": "2020-01-21 10:42:32.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": [
{
"id": 5,
"answer": "yes",
"id": 10,
"vote_id": 24,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
{
"id": 8,
"answer": "maybe",
"id": 10,
"vote_id": 25,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
{
"id": 9,
"answer": "no",
"id": 10,
"vote_id": 26,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
]
},
{
"id": 11,
"pseudo": "voting_people_TEST",
"creation_date": {
"date": "2020-01-21 10:43:46.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": [
{
"id": 11,
"vote_id": 27,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
{
"id": 11,
"vote_id": 28,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
{
"id": 11,
"vote_id": 29,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
]
},
{
"pseudo": "Marylin",
"id": 12,
"pseudo": "voting_people_TEST",
"creation_date": {
"date": "2020-01-21 10:44:35.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
"votes": [
{
"id": 5,
"answer": "yes",
"id": 12,
"vote_id": 30,
"value": "no",
"choice_id": 5,
"text": "Vic le viking"
},
{
"id": 12,
"vote_id": 31,
"value": "maybe",
"choice_id": 6,
"text": "Boumbo petite automobile"
},
{
"id": 12,
"vote_id": 32,
"value": "yes",
"choice_id": 7,
"text": "Les mystérieuses cités d'or"
}
]
}
@ -104,137 +357,209 @@ export const mockPoll3 = {
"choices": [
{
"id": 5,
"name": "Vic le viking",
"dateTime": {
"date": "2020-01-15 15:07:53.000000",
"timezone_type": 3,
"timezone": "Europe/Paris"
},
"votes": {
"count": {
"yes": 0,
"no": 0,
"maybe": 0,
"null": 0,
}
"date": {
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
simpleAnswer: true,
"answer": null
"text": "Vic le viking"
},
{
"id": 6,
"name": "Boumbo petite automobile",
"dateTime": {
"date": "2020-01-15 15:07:53.000000",
"timezone_type": 3,
"timezone": "Europe/Paris"
},
"votes": {
"count": {
"yes": 0,
"no": 0,
"maybe": 0,
"null": 0,
}
"date": {
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
simpleAnswer: true,
"answer": null
"text": "Boumbo petite automobile"
},
{
"id": 7,
"name": "Les mystérieuses cités d'or",
"dateTime": {
"date": "2020-01-15 15:07:53.000000",
"timezone_type": 3,
"timezone": "Europe/Paris"
},
"votes": {
"count": {
"yes": 0,
"no": 0,
"maybe": 0,
"null": 0,
}
"date": {
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
simpleAnswer: true,
"answer": null
"text": "Les mystérieuses cités d'or"
},
{
"id": 8,
"name": "Les mondes engloutis",
"dateTime": {
"date": "2020-01-15 15:07:53.000000",
"timezone_type": 3,
"timezone": "Europe/Paris"
},
"votes": {
"count": {
"yes": 0,
"no": 0,
"maybe": 0,
"null": 0,
}
"date": {
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
simpleAnswer: true,
"answer": null
"text": "Les mondes engloutis"
},
{
"id": 9,
"name": "Foot 2 rue",
"dateTime": {
"date": "2020-01-15 15:07:53.000000",
"timezone_type": 3,
"timezone": "Europe/Paris"
},
"votes": {
"count": {
"yes": 0,
"no": 0,
"maybe": 0,
"null": 0,
}
"date": {
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
simpleAnswer: true,
"answer": null
"text": "Foot 2 rue"
},
{
"id": 10,
"name": "Le chat, la vache, et l'océan",
"dateTime": {
"date": "2020-01-15 15:07:53.000000",
"timezone_type": 3,
"timezone": "Europe/Paris"
},
"votes": {
"count": {
"yes": 0,
"no": 0,
"maybe": 0,
"null": 0,
}
"date": {
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
simpleAnswer: true,
"answer": null
"text": "Le chat, la vache, et l'océan"
},
{
"id": 11,
"name": "Digimon",
"dateTime": {
"date": "2020-01-15 15:07:53.000000",
"timezone_type": 3,
"timezone": "Europe/Paris"
},
"votes": {
"count": {
"yes": 0,
"no": 0,
"maybe": 0,
"null": 0,
}
"date": {
"date": "2020-01-20 16:45:48.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
},
simpleAnswer: true,
"answer": null
"text": "Digimon"
}
],
"comments": [
{
"id": 3,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-20 16:58:56.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 4,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-20 16:59:48.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 5,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:12:02.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 6,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:12:34.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 7,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:14:20.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 8,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:15:09.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 9,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:15:10.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 10,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:15:35.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 11,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:26:58.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 12,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:27:03.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 13,
"text": "wouah trop bien framadate!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:27:10.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 14,
"text": "wouah trop bien framadate wouhouuu!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:34:04.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 15,
"text": "wouah trop bien framadate wouhouucghfdghu!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:36:33.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
},
{
"id": 16,
"text": "wouah trop bien framadate woudghdghhouucghfdghu!",
"pseudo": "tk_TEST",
"date": {
"date": "2020-01-21 10:50:43.000000",
"timezone_type": 3,
"timezone": "Europe/Berlin"
}
}
],
"comments": mockComments
"comments_count": 14
};

@ -28,7 +28,7 @@
<button
class="btn btn--primary"
i18n
(click)="config.getPollById(1, 'example password')"
(click)="config.getPollById( '1', 'example password')"
>
get poll 1
</button >

@ -1,16 +1,17 @@
import { Component, OnInit } from '@angular/core';
import {BaseComponent} from '../base-page/base.component';
import {Component, OnInit} from '@angular/core';
import {ConfigService} from '../../services/config.service';
@Component({
selector: 'framadate-admin',
templateUrl: './admin.component.html',
styleUrls: ['./admin.component.scss']
selector: 'framadate-admin',
templateUrl: './admin.component.html',
styleUrls: ['./admin.component.scss']
})
export class AdminComponent implements OnInit {
constructor(private config : ConfigService) { }
constructor(public config: ConfigService) {
}
ngOnInit() {
}
ngOnInit() {
}
}

@ -11,11 +11,11 @@ import {DOCUMENT} from '@angular/common';
})
export class AnswersComponent extends BaseComponent implements OnInit, AfterViewInit, OnChanges {
private allAnswersAreValid = false;
allAnswersAreValid = false;
private answerList = [];
private currentHeader: any = "";
private display: boolean;
answerList = [];
currentHeader: any = "";
display: boolean;
constructor(public config: ConfigService,
@Inject(DOCUMENT) private document: any,

@ -1,8 +1,22 @@
<div class="poll" >
<nav class='sections-nav' >
<ul >
<li ><a href='#title' >{{config.currentPoll.data.title}}</a ></li >
<li ><a href='#graph' >Graphique</a ></li >
<li >
<a href='#title' >
{{config.currentPoll.data.title}}
</a >
</li >
<li >
<a href='#table' >
{{config.currentPoll.stacks.length}}
votes
</a >
</li >
<li >
<a href='#graph' >
Graphique
</a >
</li >
<li >
<a href='#comments' >
<i class='fa fa-comments' ></i >
@ -11,7 +25,8 @@
class='comments-count' >
{{config.currentPoll.comments.length}}
</span >
commentaires</a >
commentaires
</a >
</li >
</ul >
</nav >
@ -94,11 +109,14 @@
(click)='config.addVote()' >
<i class='fa fa-paper-plane' ></i > Envoyer
</button >
<hr >
<div id='graph' >
<!--<framadate-voting-graph ></framadate-voting-graph >-->
</div >
<!--<framadate-voting-summary ></framadate-voting-summary >-->
<div id='table' >
<!--<framadate-voting-summary ></framadate-voting-summary >-->
</div >
<div
class="comments"
id='comments' >