split date choice

This commit is contained in:
Tykayn 2021-05-17 15:25:22 +02:00 committed by tykayn
parent 5c7aac3a53
commit 003f27ae82
48 changed files with 721 additions and 507 deletions

View File

@ -60,6 +60,6 @@ build:
# artifacts:
# paths:
# - public
# expire_in: 30 days
# expire_in: 30 dateList
# only:
# - master

View File

@ -63,7 +63,7 @@ export class PollConfig {
owner_modifier_token = ''; // key to change a vote stack
canModifyAnswers = true; // bool for the frontend selector
whoCanChangeAnswers = 'everybody'; // everybody, self, nobody (= just admin)
dateList: any = otherDefaultDates; // sets of days as strings, config to set identical time for days in a special days poll
dateList: any = otherDefaultDates; // sets of dateList as strings, config to set identical time for dateList in a special dateList poll
timeList: DateChoice[] = otherDefaultDates; // ranges of time expressed as strings
answers: PollAnswer[] = defaultAnswers;

View File

@ -8,7 +8,7 @@ export const mockGraphConfig = {
visibility: 'link_only',
// date specific poll
allowSeveralHours: 'true',
dateLgfgfgfgist: ['jeudi', 'vendredi', 'samedi'], // sets of days as strings
dateLgfgfgfgist: ['jeudi', 'vendredi', 'samedi'], // sets of dateList as strings
timeList: ['08:00', '08:30', '09:00'], // ranges of time expressed as strings
answers: [
{

View File

@ -95,20 +95,7 @@
</div>
<div *ngIf="'false' === config.allowSeveralHours" class="identical-dates">
<div *ngFor="let time of config.timeList; index as id" class="time-choice">
<label for="timeChoices_{{ id }}">
<i class="fa fa-clock-o" aria-hidden="true"></i>
</label>
<input
[(ngModel)]="time.literal"
name="timeChoices_{{ id }}"
type="text"
id="timeChoices_{{ id }}"
/>
<button (click)="time.timeList.splice(id, 1)" class="btn btn-warning">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</div>
</div>
<hr />
<span class="count-dates title">

View File

@ -30,7 +30,7 @@ export class DatesComponent extends BaseComponent implements OnInit {
}
countDays() {
// compute the number of days in the date interval
// compute the number of dateList in the date interval
if (this.endDateInterval && this.startDateInterval) {
this.intervalDays = this.dateUtilities.dayDiff(this.endDateInterval, this.startDateInterval).toFixed(0);
}

View File

@ -48,7 +48,7 @@ export class ConfigService extends PollConfig {
}
/**
* add some days to a date, to compute intervals
* add some dateList to a date, to compute intervals
* @param days
* @param date
*/

View File

@ -68,7 +68,7 @@ export class Poll {
public modification_policy = 'everybody';
public dateChoices: DateChoice[] = [];
// sets of days as strings, config to set identical time for days in a special days poll
// sets of dateList as strings, config to set identical time for dateList in a special dateList poll
public timeSlices: TimeSlices[] = []; // ranges of time expressed as strings
constructor(public owner: Owner = new Owner(), public title = 'mon titre', public custom_url: string = '') {}

View File

@ -1,11 +1,12 @@
import { Injectable } from '@angular/core';
import { DateChoice } from '../../../../mocks/old-stuff/config/defaultConfigs';
@Injectable({
providedIn: 'root',
})
export class DateUtilitiesService {
/**
* add some days to a date, to compute intervals
* add some dateList to a date, to compute intervals
* @param days
* @param date
*/
@ -27,7 +28,7 @@ export class DateUtilitiesService {
const dates = [];
while (+d1 < +d2) {
dates.push({
literal: this.formateDate(d1),
literal: this.formateDateToInputStringNg(d1),
date_object: d1,
});
d1.setDate(d1.getDate() + interval);
@ -36,7 +37,7 @@ export class DateUtilitiesService {
}
/**
* get the number of days between two dates
* get the number of dateList between two dates
* @param d1
* @param d2
*/
@ -50,7 +51,7 @@ export class DateUtilitiesService {
* YYYY-MM-DD
* @param date
*/
formateDate(date) {
formateDateToInputStringNg(date: Date): string {
return [
date.getFullYear(),
this.getDoubleDigits(date.getMonth() + 1),
@ -58,24 +59,69 @@ export class DateUtilitiesService {
].join('-');
}
parseInputDateToDateObject(inputDateString: string) {
const boom = inputDateString.split('-');
/**
* transform a date object to a short date string
* @param inputDate
*/
parseInputDateToDateObject(inputDate: Date): Date {
const boom = inputDate.toISOString().substring(0, 10).split('-');
const converted = new Date(boom['0'], boom['1'] - 1, boom['2']);
console.log('converted', converted);
return converted;
}
/**
* get double in string
* @param str
*/
getDoubleDigits(str) {
return ('00' + str).slice(-2);
}
/**
* compute the number of dateList in the date interval
* @param startDateInterval
* @param endDateInterval
*/
countDays(startDateInterval: Date, endDateInterval: Date): number {
// compute the number of days in the date interval
if (endDateInterval && startDateInterval) {
return this.dayDiff(endDateInterval, startDateInterval);
}
return 0;
}
/**
* fill default dates for today + the next 3 dateList
*/
makeDefaultDateChoices(): DateChoice[] {
const today = new Date();
const ladate = this.addDaysToDate(1, today);
const ladate2 = this.addDaysToDate(2, today);
const ladate3 = this.addDaysToDate(3, today);
const ladate4 = this.addDaysToDate(4, today);
return [
{
literal: this.formateDateToInputStringNg(ladate),
timeList: [],
date_object: ladate,
},
{
literal: this.formateDateToInputStringNg(ladate2),
timeList: [],
date_object: ladate2,
},
{
literal: this.formateDateToInputStringNg(ladate3),
timeList: [],
date_object: ladate3,
},
{
literal: this.formateDateToInputStringNg(ladate4),
timeList: [],
date_object: ladate4,
},
];
}
}

View File

@ -212,6 +212,8 @@ export class PollService implements Resolve<Poll> {
newpoll.password = form.value.password;
newpoll.kind = form.value.kind;
newpoll.allow_comments = form.value.allowComments;
// merge choices from storage
newpoll.choices = this.storageService.choices;
newpoll.dateChoices = this.storageService.dateList;
newpoll.timeSlices = this.storageService.timeSlices;

View File

@ -16,6 +16,7 @@ import {
} from '../../../../mocks/old-stuff/config/defaultConfigs';
import { Poll } from '../models/poll.model';
import { Owner } from '../models/owner.model';
import { DateUtilitiesService } from './date.utilities.service';
@Injectable({
providedIn: 'root',
@ -31,7 +32,7 @@ export class StorageService {
public userPolls: Poll[] = [];
@LocalStorage()
public dateList: DateChoice[] = otherDefaultDates;
public dateList: DateChoice[] = [];
@LocalStorage()
public timeSlices: TimeSlices[];
@ -39,15 +40,19 @@ export class StorageService {
@LocalStorage()
public vote_stack: Stack = new Stack();
constructor() {
@LocalStorage()
public choices: Choice[];
constructor(public dateUtilities: DateUtilitiesService) {
if (environment.autofill) {
this.userPolls.push(new Poll(new Owner(), 'Démo: Anniversaire de tonton Patrick', 'aujourdhui-ou-demain'));
this.userPolls.push(new Poll(new Owner(), 'Démo: Atelier cuisine du quartier', 'aujourdhui-ou-demain'));
this.userPolls.push(
new Poll(new Owner(), 'Démo: Réunion du département des chatons', 'aujourdhui-ou-demain')
);
// this.timeSlices = basicSlicesOfDay;
}
this.dateList = this.dateUtilities.makeDefaultDateChoices();
}
setChoicesForVoteStack(choices_list: Choice[]) {

View File

@ -19,6 +19,10 @@ import { AdvancedConfigComponent } from './form/advanced-config/advanced-config.
import { CalendarModule } from 'primeng';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { AppModule } from '../../app.module';
import { IntervalComponent } from './form/date/interval/interval.component';
import { DayListComponent } from './form/date/list/day/day-list.component';
import { PickerComponent } from './form/date/picker/picker.component';
import { TimeListComponent } from './form/date/list/time/time-list.component';
@NgModule({
declarations: [
@ -32,6 +36,10 @@ import { AppModule } from '../../app.module';
KindSelectComponent,
BaseConfigComponent,
AdvancedConfigComponent,
IntervalComponent,
DayListComponent,
PickerComponent,
TimeListComponent,
],
imports: [
CalendarModule,

View File

@ -6,65 +6,29 @@
{{ 'dates.add' | translate }}
<!-- interval-->
<button
(click)="showDateInterval = !showDateInterval"
[ngClass]="{ active: showDateInterval }"
class="btn btn--primary"
id="toggle_interval_button"
>
<i class="fa fa-clock-o" aria-hidden="true"></i>
<span>
{{ 'dates.add_interval' | translate }}
</span>
</button>
<fieldset *ngIf="showDateInterval" class="date-interval form-row is-boxed">
<h2>{{ 'dates.add_interval' | translate }}</h2>
<div class="columns">
<div class="column">
{{ 'dates.interval_propose' | translate }}
</div>
<div class="column">
<label for="start_interval" class="hidden">start</label>
<input id="start_interval" (change)="countDays()" formControlName="startDateInterval" type="date" />
</div>
</div>
<div class="columns">
<div class="column">
{{ 'dates.interval_span' | translate }}
</div>
<div class="column">
<label for="end_interval" class="hidden">end</label>
<input id="end_interval" formControlName="endDateInterval" type="date" />
</div>
</div>
<button (click)="addIntervalOfDates()" class="btn btn-block btn--primary">
<i class="fa fa-plus" aria-hidden="true"></i>
{{ 'dates.interval_button' | translate }}
{{ intervalDays }}
{{ 'dates.interval_button_dates' | translate }}
</button>
</fieldset>
<!-- <app-date-interval></app-date-interval>-->
</form>
<div class="dates-list">
<button
class="btn"
[class.is-primary]="form.value.hasSeveralHours"
(click)="form.patchValue({ hasSeveralHours: !form.value.hasSeveralHours })"
>
<i class="fa fa-check-square-o" *ngIf="form.value.hasSeveralHours"></i>
<i class="fa fa-square-o" *ngIf="!form.value.hasSeveralHours"></i>
<span> horaires avancées</span>
<i class="fa fa-clock-o"></i>
</button>
<div class="is-info notification">
<span *ngIf="form.value.hasSeveralHours">
Chaque jour aura ses plages de temps personnalisées
</span>
<span *ngIf="!form.value.hasSeveralHours">
Tous les jours auront les mêmes plages de temps
</span>
</div>
<fieldset class="range-container is-boxed">
<!-- différentes horaires-->
<div class="different-hours" *ngIf="displaySeveralHoursChoice">
<button
class="btn"
[class.is-primary]="form.value.hasSeveralHours"
(click)="form.patchValue({ hasSeveralHours: !form.value.hasSeveralHours })"
>
<i class="fa fa-check-square-o" *ngIf="form.value.hasSeveralHours"></i>
<i class="fa fa-square-o" *ngIf="!form.value.hasSeveralHours"></i>
<span> horaires avancées</span>
<i class="fa fa-clock-o"></i>
</button>
<div class="is-info notification">
<span *ngIf="form.value.hasSeveralHours">
Chaque jour aura ses plages de temps personnalisées
</span>
<span *ngIf="!form.value.hasSeveralHours">
Tous les jours auront les mêmes plages de temps
</span>
</div>
<div class="actions columns">
<div class="column"></div>
<div class="column has-text-right">
@ -102,56 +66,29 @@
</span>
</button>
</div>
</div>
<div class="range-time" *ngIf="!form.value.hasSeveralHours">
<h2>
<span class="count-dates-txt">
{{ 'dates.count_time' | translate }}
(identique pour chaque jour)
</span>
</h2>
<div class="title">
<span class="count-dates">
{{ timeList.length }}
</span>
<button class="button is-warning" (click)="removeAllTimes()">
<i class="fa fa-trash"></i>
</button>
<button class="button is-info" (click)="resetTimes()">
<i class="fa fa-refresh"></i>
</button>
</div>
<div class="identical-dates" cdkDropListGroup>
<div
class="time-list"
cdkDropList
[cdkDropListData]="timeList"
(cdkDropListDropped)="dropTimeItem($event)"
>
<div *ngFor="let time of timeList; index as time_id" class="time-choice movable" cdkDrag>
<div class="columns">
<div class="column">
<label class="button pull-left" [for]="'timeChoices_' + time_id">
<i class="icon fa fa-arrows-v" aria-hidden="true"></i>
</label>
<input
class="pull-left"
[(ngModel)]="time.literal"
name="timeChoices_{{ time_id }}"
type="text"
id="timeChoices_{{ time_id }}"
/>
<button (click)="timeList.splice(time_id, 1)" class="button is-warning">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</div>
</div>
<fieldset class="range-container is-boxed">
<div class="range-time" *ngIf="!form.value.hasSeveralHours">
<h2>
<span class="count-dates-txt">
{{ 'dates.count_time' | translate }}
(identique pour chaque jour)
</span>
</h2>
<div class="title">
<span class="count-dates">
{{ timeList.length }}
</span>
<button class="button is-warning" (click)="removeAllTimes()">
<i class="fa fa-trash"></i>
</button>
<button class="button is-info" (click)="resetTimes()">
<i class="fa fa-refresh"></i>
</button>
</div>
</div>
</div>
</fieldset>
</div>
</fieldset>
</div>
<hr />
<div class="main-box is-boxed">
@ -172,80 +109,7 @@
</div>
</div>
<div
class="columns days-list"
cdkDropList
[cdkDropListData]="dateList"
(cdkDropListDropped)="dropDayItem($event)"
>
<div class="column">
<!-- TODO lier au formulaire les valeurs des dates-->
<h2>Dates</h2>
<div *ngFor="let choice of dateList; index as id" class="date-choice" cdkDrag>
<input
[(ngModel)]="choice.date_object"
name="dateChoices_{{ id }}"
id="dateChoices_{{ id }}"
useValueAsDate
type="date"
/>
<button (click)="dateList.splice(id, 1)" class="btn btn-warning">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
<button
(click)="addTimeToDate(choice, id)"
*ngIf="form.value.hasSeveralHours"
class="btn btn--primary"
>
{{ 'dates.add_time' | translate }}
</button>
<div *ngIf="form.value.hasSeveralHours" class="several-times">
plage horaire distincte
<br />
<div *ngFor="let timeItem of choice.timeList; index as idTime" class="time-choice">
<input
[(ngModel)]="timeItem.literal"
name="dateTime_{{ id }}_Choices_{{ idTime }}"
id="dateTime_{{ id }}_Choices_{{ idTime }}"
type="text"
/>
<button (click)="choice.timeList.splice(idTime, 1)" class="btn btn-warning">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</div>
</div>
</div>
</div>
<!-- date picker calendrier-->
<!-- <div class="column calendar-column">-->
<!-- <button class="btn" (click)="selectionKind = 'range'" [class.is-primary]="selectionKind == 'range'">-->
<!-- plage de jours-->
<!-- </button>-->
<!-- <button-->
<!-- class="btn"-->
<!-- (click)="selectionKind = 'multiple'"-->
<!-- [class.is-primary]="selectionKind == 'multiple'"-->
<!-- >-->
<!-- jours séparés-->
<!-- </button>-->
<!-- <button class="btn" (click)="setDefaultDatesForInterval()">-->
<!-- réinitialiser</button-->
<!-- ><button class="btn" (click)="dateCalendarEnum = [today]">-->
<!-- vider-->
<!-- </button>-->
<!-- <div class="text-center">-->
<!-- <br />-->
<!-- <p-calendar-->
<!-- [(ngModel)]="dateCalendarEnum"-->
<!-- [locale]="'calendar_widget' | translate"-->
<!-- [inline]="true"-->
<!-- [monthNavigator]="true"-->
<!-- [selectionMode]="selectionKind"-->
<!-- ></p-calendar>-->
<!-- </div>-->
<!-- </div>-->
</div>
<app-day-list [dateList]="dateList" [hasSeveralHours]="form.value.hasSeveralHours"></app-day-list>
</div>
</div>
</div>

View File

@ -24,18 +24,17 @@ import { StorageService } from '../../../../core/services/storage.service';
})
export class DateSelectComponent implements OnInit {
@Input()
public form: FormGroup;
form: FormGroup;
public showDateInterval = false;
public allowSeveralHours = false;
displaySeveralHoursChoice = false;
allowSeveralHours = false;
today = new Date();
startDateInterval: string;
endDateInterval: string;
intervalDays: any;
intervalDaysDefault = 7;
dateList: DateChoice[]; // sets of days as strings, config to set identical time for days in a special days poll
dateList: DateChoice[]; // sets of dateList as strings, config to set identical time for dateList in a special dateList poll
timeList: TimeSlices[]; // ranges of time expressed as strings
dateCalendarEnum: Date[] = [new Date('02/09/2021')];
selectionKind = 'range';
constructor(
@ -44,7 +43,6 @@ export class DateSelectComponent implements OnInit {
private uuidService: UuidService,
private toastService: ToastService,
private pollService: PollService,
public dateUtilities: DateUtilitiesService,
private apiService: ApiService,
private storageService: StorageService,
private router: Router,
@ -63,72 +61,7 @@ export class DateSelectComponent implements OnInit {
return this.form.get('dateChoices') as FormArray;
}
ngOnInit(): void {
// this.setDefaultDatesForInterval();
}
/**
* default interval of dates proposed is from today to 7 days more
*/
setDefaultDatesForInterval(): void {
const dateCurrent = new Date();
const dateJson = dateCurrent.toISOString();
this.startDateInterval = dateJson.substring(0, 10);
this.endDateInterval = this.dateUtilities
.addDaysToDate(this.intervalDaysDefault, dateCurrent)
.toISOString()
.substring(0, 10);
this.form.patchValue({
startDateInterval: this.startDateInterval,
endDateInterval: this.endDateInterval,
});
this.dateCalendarEnum = [dateCurrent, this.dateUtilities.addDaysToDate(this.intervalDaysDefault, dateCurrent)];
this.countDays();
}
countDays(): void {
this.intervalDays = this.dateUtilities.countDays(
this.dateUtilities.parseInputDateToDateObject(this.startDateInterval),
this.dateUtilities.parseInputDateToDateObject(this.endDateInterval)
);
// this.cd.detectChanges();
}
/**
* add all the dates between the start and end dates in the interval section
*/
addIntervalOfDates(): void {
const newIntervalArray = this.dateUtilities.getDatesInRange(
this.dateUtilities.parseInputDateToDateObject(this.startDateInterval),
this.dateUtilities.parseInputDateToDateObject(this.endDateInterval),
1
);
const converted = [];
newIntervalArray.forEach((element) => {
converted.push({
literal: element.literal,
date_object: element.date_object,
timeList: [],
});
});
this.dateList = [...new Set(converted)];
// add only dates that are not already present with a Set of unique items
console.log('this.dateList', this.dateList);
this.showDateInterval = false;
this.form.patchValue({ choices: this.dateList });
// this.dateList.forEach(elem=>{
// const newControlGroup = this.fb.group({
// label: this.fb.control('', [Validators.required]),
// url: ['', [Validators.required]],
// });
//
// this.choices.push(newControlGroup);
// })
this.toastService.display(`les dates ont été ajoutées aux réponses possibles.`);
}
ngOnInit(): void {}
/**
* change time spans
@ -141,49 +74,43 @@ export class DateSelectComponent implements OnInit {
removeAllTimes() {
this.timeList = [];
this.dateList.map((elem) => (elem.timeList = []));
this.toastService.display('périodes horaires vidées');
}
resetTimes() {
this.timeList = defaultTimeOfDay;
this.dateList.map((elem) => (elem.timeList = Object.create(defaultTimeOfDay)));
this.toastService.display('périodes horaires réinitialisées');
}
/**
* add a time period to a specific date choice,
* focus on the new input
* @param config
* @param id
*/
addTimeToDate(config: any, id: number) {
this.timeList.push({
literal: '',
});
const selector = '[ng-reflect-choice_label="dateTime_' + id + '_Choices_' + (this.timeList.length - 1) + '"]';
// this.cd.detectChanges();
const elem = this.document.querySelector(selector);
if (elem) {
elem.focus();
}
}
addChoice(optionalLabel = ''): void {
const newControlGroup = this.fb.group({
label: this.fb.control('', [Validators.required]),
imageUrl: ['', [Validators.required]],
});
if (optionalLabel) {
newControlGroup.patchValue({
label: optionalLabel,
imageUrl: 'mon url',
if (this.form.value.kind == 'date') {
this.storageService.dateList.push({
literal: '',
timeList: [],
date_object: new Date(),
});
} else {
const newControlGroup = this.fb.group({
label: this.fb.control('', [Validators.required]),
imageUrl: ['', [Validators.required]],
});
}
this.dateChoices.push(newControlGroup);
// this.cd.detectChanges();
console.log('this.choices.length', this.choices.length);
this.focusOnChoice(this.choices.length - 1);
if (optionalLabel) {
newControlGroup.patchValue({
label: optionalLabel,
imageUrl: 'mon url',
});
}
this.dateChoices.push(newControlGroup);
}
// this.cd.detectChanges();
console.log('this.choices.length', this.storageService.dateList.length);
this.focusOnChoice(this.storageService.dateList.length - 1);
}
focusOnChoice(index): void {
@ -204,82 +131,9 @@ export class DateSelectComponent implements OnInit {
this.choices.setValue([]);
}
/**
* handle keyboard shortcuts
* @param $event
* @param choice_number
*/
keyOnChoice($event: KeyboardEvent, choice_number: number): void {
$event.preventDefault();
console.log('this.choices.length', this.choices.length);
console.log('choice_number', choice_number);
const lastChoice = this.choices.length - 1 === choice_number;
// TODO handle shortcuts
// reset field with Ctrl + D
// add a field with Ctrl + N
// go to previous choice with arrow up
// go to next choice with arrow down
console.log('$event', $event);
if ($event.key == 'ArrowUp' && choice_number > 0) {
this.focusOnChoice(choice_number - 1);
}
if ($event.key == 'ArrowDown') {
// add a field if we are on the last choice
if (lastChoice) {
this.addChoice();
this.toastService.display('choix ajouté par raccourci "flèche bas"');
} else {
this.focusOnChoice(choice_number + 1);
}
}
if ($event.ctrlKey && $event.key == 'Backspace') {
this.deleteChoiceField(choice_number);
this.toastService.display('choix supprimé par raccourci "Ctrl + retour"');
// this.cd.detectChanges();
this.focusOnChoice(Math.min(choice_number - 1, 0));
}
if ($event.ctrlKey && $event.key == 'Enter') {
// go to other fields
const elem = this.document.querySelector('#creatorEmail');
if (elem) {
elem.focus();
}
}
}
setDemoValues(): void {
this.addChoice('orange');
this.addChoice('raisin');
this.addChoice('abricot');
}
dropTimeItem(event: any): void {
// moveItemInArray(this.timeSlices, event.previousIndex, event.currentIndex);
if (event.previousContainer === event.container) {
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
} else {
transferArrayItem(
event.previousContainer.data,
event.container.data,
event.previousIndex,
event.currentIndex
);
}
}
dropDayItem(event: any): void {
// moveItemInArray(this.timeSlices, event.previousIndex, event.currentIndex);
if (event.previousContainer === event.container) {
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
} else {
transferArrayItem(
event.previousContainer.data,
event.container.data,
event.previousIndex,
event.currentIndex
);
}
}
}

View File

@ -0,0 +1,43 @@
<div class="interval" [formGroup]="form">
<button
(click)="showDateInterval = !showDateInterval"
[ngClass]="{ active: showDateInterval }"
class="btn btn--primary"
id="toggle_interval_button"
>
<i class="fa fa-clock-o" aria-hidden="true"></i>
<span>
{{ 'dates.add_interval' | translate }}
</span>
</button>
<fieldset *ngIf="showDateInterval" class="date-interval form-row is-boxed">
<div class="columns">
<div class="column">
{{ 'dates.interval_propose' | translate }}
</div>
<div class="column">
<label for="start_interval" class="hidden">start</label>
<input id="start_interval" (change)="countDays()" formControlName="startDateInterval" type="date" />
</div>
</div>
<div class="columns">
<div class="column">
{{ 'dates.interval_span' | translate }}
</div>
<div class="column">
<label for="end_interval" class="hidden">end</label>
<input id="end_interval" formControlName="endDateInterval" type="date" />
<div class="well">
{{ form.value.endDateInterval }}
</div>
</div>
</div>
<div class="span resume">soit {{ intervalDays }} jours.</div>
<button (click)="addIntervalOfDates()" class="btn btn-block btn--primary">
<i class="fa fa-plus" aria-hidden="true"></i>
{{ 'dates.interval_button' | translate }}
{{ intervalDays }}
{{ 'dates.interval_button_dates' | translate }}
</button>
</fieldset>
</div>

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { IntervalComponent } from './interval.component';
describe('IntervalComponent', () => {
let component: IntervalComponent;
let fixture: ComponentFixture<IntervalComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [IntervalComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(IntervalComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,93 @@
import { Component, Input, OnInit } from '@angular/core';
import { environment } from '../../../../../../environments/environment';
import { DateUtilitiesService } from '../../../../../core/services/date.utilities.service';
import { FormArray, FormGroup } from '@angular/forms';
import { ToastService } from '../../../../../core/services/toast.service';
import { DateChoice } from '../../../../../../../mocks/old-stuff/config/defaultConfigs';
@Component({
selector: 'app-date-interval',
templateUrl: './interval.component.html',
styleUrls: ['./interval.component.scss'],
})
export class IntervalComponent implements OnInit {
@Input()
public form: FormGroup;
showDateInterval = true;
intervalDays: any;
intervalDaysDefault = environment.interval_days_default;
startDateInterval: Date;
startDateIntervalString: string;
endDateInterval: Date;
endDateIntervalString: string;
dateList: DateChoice[]; // sets of dateList as strings, config to set identical time for dateList in a special dateList poll
dateCalendarEnum: Date[] = [new Date('02/09/2021')];
constructor(public dateUtilities: DateUtilitiesService, private toastService: ToastService) {}
ngOnInit(): void {
this.setDefaultDatesForInterval();
}
countDays(): void {
this.intervalDays = this.dateUtilities.countDays(
this.dateUtilities.parseInputDateToDateObject(this.startDateInterval),
this.dateUtilities.parseInputDateToDateObject(this.endDateInterval)
);
// this.cd.detectChanges();
}
/**
* add all the dates between the start and end dates in the interval section
*/
addIntervalOfDates(): void {
const newIntervalArray = this.dateUtilities.getDatesInRange(
this.dateUtilities.parseInputDateToDateObject(this.startDateInterval),
this.dateUtilities.parseInputDateToDateObject(this.endDateInterval),
1
);
const converted = [];
newIntervalArray.forEach((element) => {
converted.push({
literal: element.literal,
date_object: element.date_object,
timeList: [],
});
});
this.dateList = [...new Set(converted)];
// add only dates that are not already present with a Set of unique items
console.log('this.dateList', this.dateList);
this.showDateInterval = false;
this.form.patchValue({ choices: this.dateList });
this.toastService.display(`les dates ont été ajoutées aux réponses possibles.`);
}
get dateChoices() {
return this.form.get('dateChoices') as FormArray;
}
/**
* default interval of dates proposed is from today to 7 dateList more
*/
setDefaultDatesForInterval(): void {
if (this.form) {
const dateCurrent = new Date();
// const dateJson = dateCurrent.toISOString();
this.startDateInterval = dateCurrent;
this.endDateInterval = this.dateUtilities.addDaysToDate(this.intervalDaysDefault, dateCurrent);
this.form.patchValue({
startDateInterval: this.startDateInterval,
endDateInterval: this.endDateInterval,
});
this.dateCalendarEnum = [
dateCurrent,
this.dateUtilities.addDaysToDate(this.intervalDaysDefault, dateCurrent),
];
this.countDays();
}
}
}

View File

@ -0,0 +1,36 @@
<div class="columns days-list" cdkDropList [cdkDropListData]="dateList" (cdkDropListDropped)="dropDayItem($event)">
<div class="column">
<!-- TODO lier au formulaire les valeurs des dates-->
<h2>Dates</h2>
<div *ngFor="let choice of dateList; index as id" class="date-choice" cdkDrag>
<input
[(ngModel)]="choice.date_object"
name="dateChoices_{{ id }}"
id="dateChoices_{{ id }}"
useValueAsDate
type="date"
/>
<button (click)="dateList.splice(id, 1)" class="btn btn-warning">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
<button (click)="addTimeToDate(choice, id)" *ngIf="hasSeveralHours" class="btn btn--primary">
{{ 'dates.add_time' | translate }}
</button>
<div *ngIf="hasSeveralHours" class="several-times">
plage horaire distincte
<br />
<div *ngFor="let timeItem of choice.timeList; index as idTime" class="time-choice">
<input
[(ngModel)]="timeItem.literal"
name="dateTime_{{ id }}_Choices_{{ idTime }}"
id="dateTime_{{ id }}_Choices_{{ idTime }}"
type="text"
/>
<button (click)="choice.timeList.splice(idTime, 1)" class="btn btn-warning">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DayListComponent } from './day-list.component';
describe('ListComponent', () => {
let component: DayListComponent;
let fixture: ComponentFixture<DayListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [DayListComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DayListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,110 @@
import { Component, Inject, Input, OnInit } from '@angular/core';
import { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
import { DateChoice } from '../../../../../../../../mocks/old-stuff/config/defaultConfigs';
import { DOCUMENT } from '@angular/common';
@Component({
selector: 'app-day-list',
templateUrl: './day-list.component.html',
styleUrls: ['./day-list.component.scss'],
})
export class DayListComponent implements OnInit {
@Input()
public dateList: DateChoice[] = [];
@Input()
public hasSeveralHours: boolean;
timeList: any;
constructor(@Inject(DOCUMENT) private document: any) {}
ngOnInit(): void {}
dropTimeItem(event: any): void {
// moveItemInArray(this.timeSlices, event.previousIndex, event.currentIndex);
if (event.previousContainer === event.container) {
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
} else {
transferArrayItem(
event.previousContainer.data,
event.container.data,
event.previousIndex,
event.currentIndex
);
}
}
dropDayItem(event: any): void {
// moveItemInArray(this.timeSlices, event.previousIndex, event.currentIndex);
if (event.previousContainer === event.container) {
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
} else {
transferArrayItem(
event.previousContainer.data,
event.container.data,
event.previousIndex,
event.currentIndex
);
}
}
/**
* add a time period to a specific date choice,
* focus on the new input
* @param config
* @param id
*/
addTimeToDate(config: any, id: number) {
this.timeList.push({
literal: '',
});
const selector = '[ng-reflect-choice_label="dateTime_' + id + '_Choices_' + (this.timeList.length - 1) + '"]';
// this.cd.detectChanges();
const elem = this.document.querySelector(selector);
if (elem) {
elem.focus();
}
}
/**
* handle keyboard shortcuts
* @param $event
* @param choice_number
*/
keyOnChoice($event: KeyboardEvent, choice_number: number): void {
$event.preventDefault();
console.log('this.choices.length', this.choices.length);
console.log('choice_number', choice_number);
const lastChoice = this.choices.length - 1 === choice_number;
// TODO handle shortcuts
// reset field with Ctrl + D
// add a field with Ctrl + N
// go to previous choice with arrow up
// go to next choice with arrow down
console.log('$event', $event);
if ($event.key == 'ArrowUp' && choice_number > 0) {
this.focusOnChoice(choice_number - 1);
}
if ($event.key == 'ArrowDown') {
// add a field if we are on the last choice
if (lastChoice) {
this.addChoice();
this.toastService.display('choix ajouté par raccourci "flèche bas"');
} else {
this.focusOnChoice(choice_number + 1);
}
}
if ($event.ctrlKey && $event.key == 'Backspace') {
this.deleteChoiceField(choice_number);
this.toastService.display('choix supprimé par raccourci "Ctrl + retour"');
// this.cd.detectChanges();
this.focusOnChoice(Math.min(choice_number - 1, 0));
}
if ($event.ctrlKey && $event.key == 'Enter') {
// go to other fields
const elem = this.document.querySelector('#creatorEmail');
if (elem) {
elem.focus();
}
}
}
}

View File

@ -0,0 +1,10 @@
<p>time-list works!</p>
<div *ngFor="let time of timeList; index as id" class="time-choice">
<label for="timeChoices_{{ id }}">
<i class="fa fa-clock-o" aria-hidden="true"></i>
</label>
<input [(ngModel)]="time.literal" name="timeChoices_{{ id }}" type="text" id="timeChoices_{{ id }}" />
<button (click)="time.timeList.splice(id, 1)" class="btn btn-warning">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</div>

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TimeListComponent } from './time-list.component';
describe('TimeListComponent', () => {
let component: TimeListComponent;
let fixture: ComponentFixture<TimeListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [TimeListComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TimeListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,16 @@
import { Component, Input, OnInit } from '@angular/core';
import { TimeSlices } from '../../../../../../../../mocks/old-stuff/config/defaultConfigs';
@Component({
selector: 'app-time-list',
templateUrl: './time-list.component.html',
styleUrls: ['./time-list.component.scss'],
})
export class TimeListComponent implements OnInit {
@Input()
public timeSlices: TimeSlices[];
timeList: any;
constructor() {}
ngOnInit(): void {}
}

View File

@ -0,0 +1,28 @@
<!-- date picker calendrier-->
<div class="picker" [formGroup]="form">
<div class="column calendar-column">
<button class="btn" (click)="selectionKind = 'range'" [class.is-primary]="selectionKind == 'range'">
plage de jours
</button>
<button class="btn" (click)="selectionKind = 'multiple'" [class.is-primary]="selectionKind == 'multiple'">
jours séparés
</button>
<button class="btn" (click)="setDefaultDatesForInterval()">
réinitialiser
</button>
<button class="btn" (click)="dateCalendarEnum = [today]">
vider
</button>
<div class="text-center">
<br />
<p-calendar
[(ngModel)]="dateCalendarEnum"
[locale]="'calendar_widget' | translate"
[inline]="true"
[monthNavigator]="true"
[selectionMode]="selectionKind"
></p-calendar>
</div>
</div>
</div>

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PickerComponent } from './picker.component';
describe('PickerComponent', () => {
let component: PickerComponent;
let fixture: ComponentFixture<PickerComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [PickerComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PickerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,21 @@
import { Component, Input, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms';
@Component({
selector: 'app-picker',
templateUrl: './picker.component.html',
styleUrls: ['./picker.component.scss'],
})
export class PickerComponent implements OnInit {
@Input()
public form: FormGroup;
selectionKind = 'multiple';
dateCalendarEnum: any[];
today: Date = new Date();
constructor() {}
ngOnInit(): void {}
setDefaultDatesForInterval() {}
}

View File

@ -1,7 +1,6 @@
<div class="admin-form padded">
<div class="container is-max-widescreen">
<form [formGroup]="form">
<app-errors-list [form]="form"></app-errors-list>
<header class="columns">
<div class="column">
<h1 class="title is-2">
@ -40,27 +39,28 @@
*ngIf="advancedDisplayEnabled"
></app-advanced-config>
<div class="bar-nav-admin">
<div class="columns">
<div class="column">
<p class="control">
<a class="button is-light" (click)="goPreviousStep()">
Précédent
</a>
</p>
</div>
<div class="column">
<p class="control text-right">
<a class="button is-primary" (click)="goNextStep()">
Suivant
</a>
</p>
</div>
</div>
</div>
<!-- <div class="bar-nav-admin">-->
<!-- <div class="columns">-->
<!-- <div class="column">-->
<!-- <p class="control">-->
<!-- <a class="button is-light" (click)="goPreviousStep()">-->
<!-- Précédent-->
<!-- </a>-->
<!-- </p>-->
<!-- </div>-->
<!-- <div class="column">-->
<!-- <p class="control text-right">-->
<!-- <a class="button is-primary" (click)="goNextStep()">-->
<!-- Suivant-->
<!-- </a>-->
<!-- </p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</main>
<app-picker [form]="form" *ngIf="displayDatePicker"></app-picker>
<app-errors-list [form]="form"></app-errors-list>
<p>
<i>
{{ 'choices.helper' | translate }}
@ -108,6 +108,4 @@
</div>
</form>
</div>
<!-- <app-success [poll]="poll"></app-success>-->
</div>

View File

@ -9,7 +9,6 @@ import { Router } from '@angular/router';
import { environment } from '../../../../environments/environment';
import { PollUtilitiesService } from '../../../core/services/poll.utilities.service';
import { StorageService } from '../../../core/services/storage.service';
import { defaultDates, defaultTimeOfDay } from '../../../../../mocks/old-stuff/config/defaultConfigs';
@Component({
selector: 'app-admin-form',
@ -21,7 +20,8 @@ export class FormComponent implements OnInit {
public poll?: Poll;
public form: FormGroup;
public advancedDisplayEnabled = true;
public displayDatePicker = false;
public advancedDisplayEnabled = false;
public show_debug_data = false;
public currentStep = 'base';
public steps = ['base', 'choices', 'advanced'];

View File

@ -17,7 +17,6 @@ export class LanguageSelectorComponent implements OnInit {
ngOnInit(): void {
this.availableLanguages = this.languageService.getAvailableLanguages();
console.log('this.availableLanguages', this.availableLanguages);
this.currentLang = this.languageService.getLangage();
this.nextLang();
@ -29,10 +28,6 @@ export class LanguageSelectorComponent implements OnInit {
nextLang(): void {
console.log('this.currentLang ', this.currentLang);
console.log('this.storageService.language ', this.storageService.language);
console.log("this.availableLanguages['FR']", this.availableLanguages['FR']);
console.log('this.availableLanguages', this.availableLanguages);
console.log('TODO');
}
}

View File

@ -82,7 +82,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days
#: +it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"eo diazezet Framadate. Ur meziant diorroet gant Skol-Veur Straßburg an hini "
@ -916,7 +916,7 @@ msgid "Your name"
msgstr "Hoc'h anv"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "a zevezhioù"
#: .Generic.for
@ -1632,7 +1632,7 @@ msgid "Remove a time slot"
msgstr "Dileml an eur diwezhañ"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Dilemel an holl zevezhioù"
#: .Step+2+date.Remove+all+times
@ -1647,13 +1647,13 @@ msgstr "Dilemel an devezh-mañ"
#: +two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Evit krouiñ ur sontadeg deiziadoù eo ret deoc'h kinnig daou zibab d'an "
"nebeutañ (div eur evit an hevelep devezh pe daou zevezh)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr ""
"Gallout a rit ouzhpennañ pe dilemel devezhioù hag eurioù ouzhpenn gant an "
"afelloù"
@ -1711,7 +1711,7 @@ msgid "Your poll will automatically be archived"
msgstr "Diellaouet e vo ho sontadeg ent emgefreek"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "Diellaouet e vo ho sontadeg a-benn %d a zevezhioù ent emgefreek."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -84,7 +84,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days
#: +it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"programari desenvolupat per la Universitat d'Estrasburg. Actualment "
@ -933,7 +933,7 @@ msgid "Your name"
msgstr "El vostre nom"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "dies"
#: .Generic.for
@ -1650,7 +1650,7 @@ msgid "Remove a time slot"
msgstr "Elimina un espai horari"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Elimina tots els dies"
#: .Step+2+date.Remove+all+times
@ -1665,13 +1665,13 @@ msgstr "Elimina aquest dia"
#: +two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Per a programar un esdeveniment, cal que proporcioneu almenys dues opcions ("
"per exemple, dos espais horaris en un o dos dies)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr "Podeu afegir o treure dies i hores addicionals amb els botons"
#: .Step+3.Back+to+step+2
@ -1727,7 +1727,7 @@ msgid "Your poll will automatically be archived"
msgstr "L'enquesta s'arxivarà automàticament"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "L'enquesta s'arxivarà automàticament d'aquí a %d dies."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -85,7 +85,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days
#: +it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
", einer von der Universität von Straßburg entwickelten Software. Heute wird "
@ -942,7 +942,7 @@ msgid "Your name"
msgstr "Ihr Name"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "Tage"
#: .Generic.for
@ -1662,7 +1662,7 @@ msgid "Remove a time slot"
msgstr "Eine Uhrzeit entfernen"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Alle Tage entfernen"
#: .Step+2+date.Remove+all+times
@ -1677,14 +1677,14 @@ msgstr "Diesen Tag entfernen"
#: +two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Um eine Terminabsprache zu konfigurieren, müssen Sie mindestens zwei "
"alternative Zeitpunkte vorschlagen (zwei Uhrzeiten am gleichen Tag oder "
"verschiedene Tage)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr ""
"Sie können weitere Tage und Uhrzeiten über die Buttons hinzufügen oder "
"entfernen"
@ -1742,7 +1742,7 @@ msgid "Your poll will automatically be archived"
msgstr "Ihre Umfrage wird automatisch archiviert"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "Ihre Umfrage wird automatisch in %d Tagen archiviert werden."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -83,7 +83,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days,+it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"λογισμικό αναπτυγμένο από το Πανεπιστήμιο του Στρασβούργου. Σήμερα, "
@ -926,7 +926,7 @@ msgid "Your name"
msgstr "Το όνομά σας"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "ημέρες"
#: .Generic.for
@ -1640,7 +1640,7 @@ msgid "Remove a time slot"
msgstr "Αφαίρεση ενός πεδίου ώρας"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Αφαίρεση όλων των ημερών"
#: .Step+2+date.Remove+all+times
@ -1654,13 +1654,13 @@ msgstr "Αφαίρεση αυτής της ημέρας"
#: .Step+2+date.To+schedule+an+event+you+need+to+provide+at+least+two+choices+(e.g.,+two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Για τον προγραμματισμό μιας δραστηριότητας πρέπει να παρέχετε τουλάχιστον "
"δύο επιλογές (π.χ, δύο πεδία ώρας σε μία ημέρα, ή δύο ημέρες)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr "Μπορείτε να προσθέσετε ή να αφαιρέσετε ημέρες και ώρες με τα κουμπιά"
#: .Step+3.Back+to+step+2
@ -1714,7 +1714,7 @@ msgid "Your poll will automatically be archived"
msgstr "Η ψηφοφορία σας θα αρχειοθετηθεί αυτόματα"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "Η ψηφοφορία σας θα αρχειοθετηθεί αυτόματα σε %d ημέρες."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -84,10 +84,10 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days
#: +it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
#: .3rd+section.Grow+your+own
@ -931,8 +931,8 @@ msgid "Your name"
msgstr "Your name"
#: .Generic.days
msgid "days"
msgstr "days"
msgid "dateList"
msgstr "dateList"
#: .Generic.for
msgid "for"
@ -1635,8 +1635,8 @@ msgid "Remove a time slot"
msgstr "Remove a time slot"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgstr "Remove all days"
msgid "Remove all dateList"
msgstr "Remove all dateList"
#: .Step+2+date.Remove+all+times
msgid "Remove all times"
@ -1650,14 +1650,14 @@ msgstr "Remove this day"
#: +two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgstr "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr "You can add or remove additional dateList and times with the buttons"
#: .Step+3.Back+to+step+2
msgid "Back to step 2"
@ -1712,8 +1712,8 @@ msgid "Your poll will automatically be archived"
msgstr "Your poll will automatically be archived"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgstr "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "Your poll will be automatically archived in %d dateList."
#: .Step+3.after+the+last+date+of+your+poll.
msgid "after the last date of your poll."

View File

@ -88,7 +88,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days
#: +it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"un software desarrollado por la Universidad de Estrasburgo. Ahora, su "
@ -945,7 +945,7 @@ msgid "Your name"
msgstr "Su nombre"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "días"
#: .Generic.for
@ -1664,7 +1664,7 @@ msgid "Remove a time slot"
msgstr "Eliminar una franja horaria"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Borrar todos los días"
#: .Step+2+date.Remove+all+times
@ -1679,13 +1679,13 @@ msgstr "Eliminar este dia"
#: +two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Para programar un evento, tiene que proponer por lo menos dos opciones (dos "
"horarios para un día, o dos días)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr "Puede agregar o borrar días y horarios con los botones"
#: .Step+3.Back+to+step+2
@ -1741,7 +1741,7 @@ msgid "Your poll will automatically be archived"
msgstr "Su encuesta estará archivada de manera automática"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "Su encuesta estará archivada de manera automática en %d días."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -87,7 +87,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days
#: +it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"un logiciel développé par l'Université de Strasbourg. Aujourd'hui, son "
@ -949,7 +949,7 @@ msgid "Your name"
msgstr "Votre nom"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "jours"
#: .Generic.for
@ -1675,7 +1675,7 @@ msgid "Remove a time slot"
msgstr "Supprimer le dernier horaire"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Effacer tous les jours"
#: .Step+2+date.Remove+all+times
@ -1690,13 +1690,13 @@ msgstr "Supprimer ce jour"
#: +two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Pour créer un sondage spécial dates vous devez proposer au moins deux choix "
"(deux horaires pour une même journée ou deux jours)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr ""
"Vous pouvez ajouter ou supprimer des jours et horaires supplémentaires avec "
"les boutons"
@ -1754,7 +1754,7 @@ msgid "Your poll will automatically be archived"
msgstr "Votre sondage sera automatiquement archivé"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "Votre sondage sera automatiquement archivé dans %d jours."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -75,7 +75,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days,+it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
@ -861,7 +861,7 @@ msgid "Your name"
msgstr ""
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr ""
#: .Generic.for
@ -1538,7 +1538,7 @@ msgid "Remove a time slot"
msgstr ""
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr ""
#: .Step+2+date.Remove+all+times
@ -1552,11 +1552,11 @@ msgstr ""
#: .Step+2+date.To+schedule+an+event+you+need+to+provide+at+least+two+choices+(e.g.,+two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr ""
#: .Step+3.Back+to+step+2
@ -1605,7 +1605,7 @@ msgid "Your poll will automatically be archived"
msgstr ""
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr ""
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -81,7 +81,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days,+it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"un software desenvolvido pola Universidade de Estrasburgo. Agora, o seu "
@ -918,7 +918,7 @@ msgid "Your name"
msgstr "Seu nome"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "días"
#: .Generic.for
@ -1618,7 +1618,7 @@ msgid "Remove a time slot"
msgstr "Borrar unha hora"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Borrar todos os días"
#: .Step+2+date.Remove+all+times
@ -1632,13 +1632,13 @@ msgstr "Borrar este día"
#: .Step+2+date.To+schedule+an+event+you+need+to+provide+at+least+two+choices+(e.g.,+two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Para programar unha enquisa, precisa fornecer polo menos dúas opcións (por "
"exemplo, dúas horas nun día ou dous días)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr "Cos botóns pode engadir ou borrar días e horas adicionais"
#: .Step+3.Back+to+step+2
@ -1692,7 +1692,7 @@ msgid "Your poll will automatically be archived"
msgstr "A súa enquisa será arquivada de xeito automático"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "A súa enquisa será arquivada de xeito automático en %d días."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -83,7 +83,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days
#: +it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"szoftveren alapul, melyet a Strasbourg-i Egyetem fejlesztett. Manapság a "
@ -926,7 +926,7 @@ msgid "Your name"
msgstr "Neve"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "nap"
#: .Generic.for
@ -1636,7 +1636,7 @@ msgid "Remove a time slot"
msgstr "Idősáv eltávolítása"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Összes nap eltávolítása"
#: .Step+2+date.Remove+all+times
@ -1651,13 +1651,13 @@ msgstr "Nap eltávolítása"
#: +two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Egy esemény ütemezéséhez legalább két lehetőséget kell megadni (azaz két "
"idősávot egy nap, vagy két napot)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr "A gombokkal további napokat és idősávokat adhat hozzá"
#: .Step+3.Back+to+step+2
@ -1713,7 +1713,7 @@ msgid "Your poll will automatically be archived"
msgstr "A szavazása automatikusan archiválva lesz"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "A szavazása %d nap után automatikusan archiválva lesz."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -87,7 +87,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days
#: +it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"un software sviluppato dall'Università di Strasburgo. Oggi il suo sviluppo è "
@ -941,7 +941,7 @@ msgid "Your name"
msgstr "Il tuo nome"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "giorni"
#: .Generic.for
@ -1653,7 +1653,7 @@ msgid "Remove a time slot"
msgstr "Eliminare l'ultimo orario"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Cancellare tutti i giorni"
#: .Step+2+date.Remove+all+times
@ -1668,13 +1668,13 @@ msgstr "Eliminare questo giorno"
#: +two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Per creare un evento, è meglio proporre almeno 2 scelte (2 orari per lo "
"stesso giorno o 2 giorni)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr ""
"Puoi aggiungere o eliminare dei giorni et orari ulteriori con i pulsanti"
@ -1731,7 +1731,7 @@ msgid "Your poll will automatically be archived"
msgstr "Il tuo sondaggio sarà archiviato automaticamente"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "Il tuo sondaggio verrà archiviata automaticamente in %d giorni."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -82,7 +82,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days
#: +it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"software ontwikkeld door de Universiteit van Straatsburg. Het wordt "
@ -922,7 +922,7 @@ msgid "Your name"
msgstr "Je naam"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "dagen"
#: .Generic.for
@ -1628,7 +1628,7 @@ msgid "Remove a time slot"
msgstr "Verwijder een tijd"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Verwijder alle dagen"
#: .Step+2+date.Remove+all+times
@ -1643,13 +1643,13 @@ msgstr "Verwijder deze dag"
#: +two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Om een datum te prikken, moet je tenminste twee keuzes geven. (Bijvoorbeeld "
"twee tijden op één dag of twee verschillende dagen)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr "Je kan extra dagen of tijden toevoegen en verwijderen met deze knoppen"
#: .Step+3.Back+to+step+2
@ -1704,7 +1704,7 @@ msgid "Your poll will automatically be archived"
msgstr "Je poll wordt automatisch gearchiveerd"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "Je poll wordt over %d dagen automatisch gearchiveerd."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -87,7 +87,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days
#: +it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"un logicial desvolopat per lUniversitat dEstrasborg. Uèi son desvolopament "
@ -942,7 +942,7 @@ msgid "Your name"
msgstr "Vòstre nom"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "jorns"
#: .Generic.for
@ -1660,7 +1660,7 @@ msgid "Remove a time slot"
msgstr "Suprimir lo darrièr orari"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Suprimir totes los jorns"
#: .Step+2+date.Remove+all+times
@ -1675,13 +1675,13 @@ msgstr "Suprimir aqueste jorn"
#: +two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"Per crear un sondatge especial datas vos cal prepausar almens doas causidas "
"(dos oraris per la meteissa jornada o dos jorns)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr ""
"Podètz apondre o suprimir de jorns e oraris suplementaris amb los botons"
@ -1738,7 +1738,7 @@ msgid "Your poll will automatically be archived"
msgstr "Vòstre sondatge serà archivat automaticament"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "Vòstre sondatge serà archivat automaticament dins %d jorns."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -81,7 +81,7 @@ msgstr ""
#: .2nd+section.software+developed+by+the+University+of+Strasbourg.+These+days,+it+is+developed+by+the+Framasoft+association.
msgid ""
"software developed by the University of Strasbourg. These days, it is "
"software developed by the University of Strasbourg. These dateList, it is "
"developed by the Framasoft association."
msgstr ""
"mjukvara utvecklad av Strasbourgs universitet. Idag utvecklas den av "
@ -917,7 +917,7 @@ msgid "Your name"
msgstr "Ditt namn"
#: .Generic.days
msgid "days"
msgid "dateList"
msgstr "dagar"
#: .Generic.for
@ -1607,7 +1607,7 @@ msgid "Remove a time slot"
msgstr "Ta bort en tid"
#: .Step+2+date.Remove+all+days
msgid "Remove all days"
msgid "Remove all dateList"
msgstr "Ta bort alla dagar"
#: .Step+2+date.Remove+all+times
@ -1621,13 +1621,13 @@ msgstr "Ta bort den här dagen"
#: .Step+2+date.To+schedule+an+event+you+need+to+provide+at+least+two+choices+(e.g.,+two+time+slots+on+one+day+or+two+days).
msgid ""
"To schedule an event you need to provide at least two choices (e.g., two "
"time slots on one day or two days)."
"time slots on one day or two dateList)."
msgstr ""
"För att schemalägga ett evenemang måste du ange minst två val (alltså minst "
"två tider samma dag eller två dagar)."
#: .Step+2+date.You+can+add+or+remove+additional+days+and+times+with+the+buttons
msgid "You can add or remove additional days and times with the buttons"
msgid "You can add or remove additional dateList and times with the buttons"
msgstr "Du kan lägga till och ta bort dagar och tider med knapparna"
#: .Step+3.Back+to+step+2
@ -1680,7 +1680,7 @@ msgid "Your poll will automatically be archived"
msgstr "Din undersökning kommer arkiveras automatiskt"
#: .Step+3.Your+poll+will+be+automatically+archived+in+%25d+days.
msgid "Your poll will be automatically archived in %d days."
msgid "Your poll will be automatically archived in %d dateList."
msgstr "Din undersökning kommer arkiveras automatiskt om %d dagar."
#: .Step+3.after+the+last+date+of+your+poll.

View File

@ -17,6 +17,7 @@ export const environment = {
showDemoWarning: true,
autofill: false,
autoSendNewPoll: false,
interval_days_default: 7,
appTitle: 'FramaDate Funky',
appVersion: '2.1.0',
appLogo: 'assets/img/logo.png',

View File

@ -24,6 +24,7 @@ export const environment = {
autofill: true,
showDemoWarning: false,
autoSendNewPoll: false,
interval_days_default: 7,
appTitle: 'FramaDate Funky',
appVersion: '2.1.0',
appLogo: 'assets/img/logo.png',