diff --git a/karma.conf.js b/karma.conf.js
index a568270f..cca0956f 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -17,7 +17,7 @@ module.exports = function (config) {
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/framadate'),
- reports: ['html', 'lcovonly', 'text-summary'],
+ reports: ['html', 'lcovonly', 'name-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index a977073f..6e18ab24 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -45,6 +45,7 @@ import {ConfigService} from "./services/config.service";
import {PollService} from "./services/poll.service";
import {ToastModule} from 'primeng/toast';
import {MessageService} from "primeng";
+import { PollDisplayComponent } from './pages/poll-display/poll-display.component';
export class MyMissingTranslationHandler implements MissingTranslationHandler {
handle(params: MissingTranslationHandlerParams) {
@@ -83,6 +84,7 @@ export function HttpLoaderFactory(http: HttpClient) {
VoteChoiceComponent,
AdminComponent,
SelectorComponent,
+ PollDisplayComponent,
],
imports: [
diff --git a/src/app/config/Routes.ts b/src/app/config/Routes.ts
index c9fcf5c7..fa981741 100644
--- a/src/app/config/Routes.ts
+++ b/src/app/config/Routes.ts
@@ -11,6 +11,7 @@ import {BaseComponent} from '../pages/base-page/base.component';
import {HomeComponent} from "../pages/home/home.component";
import {PollGraphicComponent} from '../poll-graphic/poll-graphic.component';
import {VoteChoiceComponent} from "../vote-choice/vote-choice.component";
+import {PollDisplayComponent} from "../pages/poll-display/poll-display.component";
/**
* each step in the form is a component
@@ -31,6 +32,7 @@ export const Routes =
{path: 'step/resume', component: ResumeComponent},
{path: 'step/end', component: EndConfirmationComponent},
{path: 'graphic/:poll', component: PollGraphicComponent},
+ {path: 'vote/poll/id/:poll', component: PollDisplayComponent},
{path: 'votechoice', component: VoteChoiceComponent},
{path: '**', redirectTo: '/home', pathMatch: 'full'},
]
diff --git a/src/app/config/mock-poll3.ts b/src/app/config/mock-poll3.ts
new file mode 100644
index 00000000..779b2e69
--- /dev/null
+++ b/src/app/config/mock-poll3.ts
@@ -0,0 +1,186 @@
+export const mockPoll3 = {
+ "message": "your poll config",
+ "data": {
+ "id": 3,
+ "title": "dessin animé préféré",
+ "customUrl": null,
+ "description": "choisissez votre animé préféré",
+ "creationDate": {
+ "date": "2020-01-15 15:07:53.000000",
+ "timezone_type": 3,
+ "timezone": "Europe/Paris"
+ },
+ "expiracyDate": {
+ "date": "2020-01-15 15:07:53.000000",
+ "timezone_type": 3,
+ "timezone": "Europe/Paris"
+ },
+ "owner": {
+ "__initializer__": {},
+ "__cloner__": {},
+ "__isInitialized__": false
+ },
+ "kind": "text",
+ "allowedAnswers": [
+ "yes"
+ ],
+ "modificationPolicy": "self",
+ "mailOnComment": null,
+ "mailOnVote": null,
+ "hideResults": null,
+ "showResultEvenIfPasswords": null,
+ "votes": {},
+ "stacksOfVotes": {},
+ "choices": {},
+ "comments": {},
+ "defaultExpiracyDaysFromNow": 60
+ },
+ "stacks_count": 2,
+ "stacks": [
+ {
+ "pseudo": "Wulfila",
+ "votes": {}
+ },
+ {
+ "pseudo": "Tykayn",
+ "votes": {}
+ }
+ ],
+ "choices_count": 7,
+ "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,
+ }
+ },
+ simpleAnswer: true,
+ "answer": null
+ },
+ {
+ "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,
+ }
+ },
+ simpleAnswer: true,
+ "answer": null
+ },
+ {
+ "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,
+ }
+ },
+ simpleAnswer: true,
+ "answer": null
+ },
+ {
+ "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,
+ }
+ },
+ simpleAnswer: true,
+ "answer": null
+ },
+ {
+ "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,
+ }
+ },
+ simpleAnswer: true,
+ "answer": null
+ },
+ {
+ "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,
+ }
+ },
+ simpleAnswer: true,
+ "answer": null
+ },
+ {
+ "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,
+ }
+ },
+ simpleAnswer: true,
+ "answer": null
+ }
+ ],
+ "comments": []
+}
diff --git a/src/app/debugger/debugger.component.html b/src/app/debugger/debugger.component.html
index b7f72cfe..bae653fd 100644
--- a/src/app/debugger/debugger.component.html
+++ b/src/app/debugger/debugger.component.html
@@ -18,26 +18,31 @@
type de formulaire: {{config.pollType}}
+
+
+
+
+
+ See example of vote page
+
-
-
-
-
diff --git a/src/app/debugger/debugger.component.ts b/src/app/debugger/debugger.component.ts
index 2dac8523..2cb828ff 100644
--- a/src/app/debugger/debugger.component.ts
+++ b/src/app/debugger/debugger.component.ts
@@ -23,4 +23,8 @@ export class DebuggerComponent implements OnInit {
return true;
}
+
+ launchToast() {
+ this.config.handleError({message: "hop"})
+ }
}
diff --git a/src/app/pages/admin/admin.component.html b/src/app/pages/admin/admin.component.html
index db4f9c73..f2b4063b 100644
--- a/src/app/pages/admin/admin.component.html
+++ b/src/app/pages/admin/admin.component.html
@@ -3,11 +3,11 @@
Informations du sondage
-
+
-
+
Paramètres
Visibilité des réponses
diff --git a/src/app/pages/answers/answers.component.html b/src/app/pages/answers/answers.component.html
index fa2027fa..bfdfdd3e 100644
--- a/src/app/pages/answers/answers.component.html
+++ b/src/app/pages/answers/answers.component.html
@@ -11,7 +11,7 @@
-
+
-
-
-
-
+
+
Aucun sondage.
+
+
+
+
+
diff --git a/src/app/pages/create-or-retrieve/create-or-retrieve.component.ts b/src/app/pages/create-or-retrieve/create-or-retrieve.component.ts
index 469f80ab..fdaefbc9 100644
--- a/src/app/pages/create-or-retrieve/create-or-retrieve.component.ts
+++ b/src/app/pages/create-or-retrieve/create-or-retrieve.component.ts
@@ -1,7 +1,6 @@
import {Component, OnInit} from '@angular/core';
import {BaseComponent} from "../base-page/base.component";
import {ConfigService} from "../../services/config.service";
-import {PollService} from "../../services/poll.service";
@Component({
selector: 'framadate-create-or-retrieve',
@@ -12,8 +11,7 @@ export class CreateOrRetrieveComponent extends BaseComponent implements OnInit {
loadedMyPolls: boolean = false;
- constructor(public config: ConfigService,
- public pollService: PollService) {
+ constructor(public config: ConfigService) {
super(config);
}
diff --git a/src/app/pages/dates/dates.component.html b/src/app/pages/dates/dates.component.html
index 43b43923..9ac26db3 100644
--- a/src/app/pages/dates/dates.component.html
+++ b/src/app/pages/dates/dates.component.html
@@ -89,7 +89,7 @@
@@ -133,7 +133,7 @@