diff --git a/src/app/config/PollConfig.ts b/src/app/config/PollConfig.ts index 42c71a40..7e3d88b4 100644 --- a/src/app/config/PollConfig.ts +++ b/src/app/config/PollConfig.ts @@ -37,7 +37,7 @@ export class PollConfig { 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 - allowSeveralHours = 'false'; + allowSeveralHours = 'true'; // access visibility = 'link_only'; // visible to anyone with the link: voteChoices = 'only_yes'; // possible answers to a vote choice: only "yes", "yes, maybe, no" diff --git a/src/app/config/defaultConfigs.ts b/src/app/config/defaultConfigs.ts index 54b0b7bd..c888bdf9 100644 --- a/src/app/config/defaultConfigs.ts +++ b/src/app/config/defaultConfigs.ts @@ -1,25 +1,30 @@ +export const basicSlicesOfDay = [ + {literal: 'matin'}, + {literal: 'midi'}, + {literal: 'soir'} +]; export const defaultTimeOfDay = [{ - timeList: [], + timeList: Object.create(basicSlicesOfDay), literal: 'matin' }, - {timeList: [], literal: 'midi'}, - {timeList: [], literal: 'après-midi'}, - {timeList: [], literal: 'soirée'}]; + {timeList: Object.create(basicSlicesOfDay), literal: 'midi'}, + {timeList: Object.create(basicSlicesOfDay), literal: 'après-midi'}, + {timeList: Object.create(basicSlicesOfDay), literal: 'soirée'}]; export const defaultDates = [ { literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate()}`, date_object: new Date(), - timeList: [{literal: 'matin'}, {literal: 'midi'}, {literal: 'soir'}] + timeList: Object.create(basicSlicesOfDay) }, { literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate() + 1}`, date_object: new Date(), - timeList: [{literal: 'matin'}, {literal: 'midi'}, {literal: 'soir'}] + timeList: Object.create(basicSlicesOfDay) }, { literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate() + 2}`, date_object: new Date(), - timeList: [{literal: 'matin'}, {literal: 'midi'}, {literal: 'soir'}] + timeList: Object.create(basicSlicesOfDay) } ]; export const defaultAnswers = [{ @@ -28,7 +33,7 @@ export const defaultAnswers = [{ url: 'https://mastodon.cipherbliss.com/system/media_attachments/files/001/439/118/original/6fcf149bd902841b.png?1579471574', literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate()}`, date_object: new Date(), - timeList: [{literal: 'matin'}, {literal: 'midi'}, {literal: 'soir'}] + timeList: Object.create(basicSlicesOfDay) }, { id: 1, diff --git a/src/app/pages/dates/dates.component.html b/src/app/pages/dates/dates.component.html index decf46e0..e6703e40 100644 --- a/src/app/pages/dates/dates.component.html +++ b/src/app/pages/dates/dates.component.html @@ -12,8 +12,8 @@ id="multi_hours" name="multi_hours" > - - + + {{"dates.hours_each_day"|translate}} @@ -91,7 +91,7 @@
-
@@ -149,6 +148,11 @@ {{"dates.count_dates"|translate}} +
-
+ *ngIf='config.pollType !== "classic"' > + + + {{"dates.multiple.different"|translate}} + + + {{"dates.multiple.identical"|translate}} +
+
+ +
{{choice.literal}} +
+ + {{time.literal}} +
+ +
+ +
+
{{time.literal}} -
@@ -73,7 +103,7 @@
diff --git a/src/app/pages/resume/resume.component.scss b/src/app/pages/resume/resume.component.scss index 003a05e6..44ae90f1 100644 --- a/src/app/pages/resume/resume.component.scss +++ b/src/app/pages/resume/resume.component.scss @@ -3,3 +3,7 @@ padding: 2em; margin: 1em 0; } + +.time-choice { + margin-left: 3em; +} diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index 892f3fab..a7346832 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -39,7 +39,7 @@ "identical": "identiques", "different": "possiblement différents" }, - "add": "Ajouter une plage de dates", + "add": "Ajouter une date", "add_time": "Ajouter une plage horaire", "empty": "Vider", "count_dates": "choix de dates", @@ -96,17 +96,17 @@ "validate_btn": "Créer ce sondage !" }, "admin": { - "choose_title": "Le titre du sondage est", - "description": "et sa description :", - "info_section_title": "Informations du sondage", - "settings_section_title": "Paramètres", - "votes_deletion_desc": "Pour repartir à zéro, je peux tous les supprimer :", - "votes_deletion_btn": "Supprimer tous les votes", - "comments_deletion_title": "Commentaires", - "comments_deletion_desc": "Si je le souhaite, je peux supprimer l'ensemble des commentaires", - "comments_deletion_btn": "Supprimer tous les commentaires", - "archiving_title": "Archivage", - "archiving_desc": "Ce sondage ne sera plus éditable à partir du", + "choose_title": "Le titre du sondage est", + "description": "et sa description :", + "info_section_title": "Informations du sondage", + "settings_section_title": "Paramètres", + "votes_deletion_desc": "Pour repartir à zéro, je peux tous les supprimer :", + "votes_deletion_btn": "Supprimer tous les votes", + "comments_deletion_title": "Commentaires", + "comments_deletion_desc": "Si je le souhaite, je peux supprimer l'ensemble des commentaires", + "comments_deletion_btn": "Supprimer tous les commentaires", + "archiving_title": "Archivage", + "archiving_desc": "Ce sondage ne sera plus éditable à partir du", "deletion": "Tout supprimer", "deletion_desc": "Dans le cas où vous voudriez tout supprimer, ce bouton est fait pour vous :", "deletion_btn": "Supprimer le sondage",