same time span for every day by default, clean config

This commit is contained in:
Tykayn 2021-05-03 15:19:06 +02:00 committed by tykayn
parent 6fdb56786a
commit c0ca623885
4 changed files with 33 additions and 42 deletions

View File

@ -57,15 +57,12 @@
<button
class="btn"
[class.is-primary]="form.value.hasSeveralHours"
(click)="
form.patchValue({
configuration: { hasSeveralHours: !form.value.hasSeveralHours }
})
"
(click)="form.patchValue({ hasSeveralHours: !form.value.hasSeveralHours })"
>
<i class="fa fa-clock-o"></i>
<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">

View File

@ -20,34 +20,28 @@
<p class="label is-medium">
{{ 'creation.want' | translate }}
</p>
<div class="step-choices" *ngIf="currentStep === 'base'">
<app-kind-select [form]="form"></app-kind-select>
<app-base-config [form]="form"></app-base-config>
</div>
<div class="step-choices" *ngIf="currentStep === 'choices'">
<app-date-select
*ngIf="form.value && form.value.kind == 'date'"
[form]="form"
></app-date-select>
<app-text-select
*ngIf="form.value && form.value.kind == 'date'"
[form]="form"
></app-text-select>
<!-- <div class="step-choices" *ngIf="currentStep === 'base'">-->
<!-- <app-kind-select [form]="form"></app-kind-select>-->
<!-- <app-base-config [form]="form"></app-base-config>-->
<!-- </div>-->
<!-- <div class="step-choices" *ngIf="currentStep === 'choices'"> </div>-->
<app-date-select *ngIf="form.value && form.value.kind == 'date'" [form]="form"></app-date-select>
<app-text-select *ngIf="form.value && form.value.kind == 'text'" [form]="form"></app-text-select>
<button
class="btn"
[class]="{ 'is-primary': advancedDisplayEnabled, 'is-info': !advancedDisplayEnabled }"
(click)="advancedDisplayEnabled = !advancedDisplayEnabled"
>
<i class="fa fa-save"></i>
{{ 'creation.advanced' | translate }}
</button>
<app-advanced-config
[poll]="poll"
[form]="form"
*ngIf="advancedDisplayEnabled"
></app-advanced-config>
<button
class="btn"
[class]="{ 'is-primary': advancedDisplayEnabled, 'is-info': !advancedDisplayEnabled }"
(click)="advancedDisplayEnabled = !advancedDisplayEnabled"
>
<i class="fa fa-save"></i>
{{ 'creation.advanced' | translate }}
</button>
<app-advanced-config
[poll]="poll"
[form]="form"
*ngIf="advancedDisplayEnabled"
></app-advanced-config>
</div>
<div class="bar-nav-admin">
<div class="columns">
<div class="column">

View File

@ -89,7 +89,7 @@ export class FormComponent implements OnInit {
allowComments: [true, [Validators.required]],
password: [this.pollUtilitiesService.makeUuid(), [Validators.required]],
dateCreated: [creationDate, [Validators.required]],
hasSeveralHours: [true, [Validators.required]],
hasSeveralHours: [false, [Validators.required]],
hasMaxCountOfAnswers: [true, [Validators.required, Validators.min(1)]],
startDateInterval: ['', [Validators.required]],
endDateInterval: ['', [Validators.required]],
@ -118,7 +118,7 @@ export class FormComponent implements OnInit {
creatorPseudo: 'Chuck Norris',
creatorEmail: 'chucknorris@example.com',
isAboutDate: true,
// hasSeveralHours: true,
hasSeveralHours: false,
kind: 'date',
password: '',
whoCanChangeAnswers: 'everybody',

View File

@ -72,22 +72,22 @@
<i class="fa fa-close"></i>
</button>
</mat-form-field>
<mat-checkbox class="is-flex" formControlName="configuration.areResultsPublic">
<mat-checkbox class="is-flex" formControlName="areResultsPublic">
Les participants pourront consulter les résultats
</mat-checkbox>
<mat-checkbox class="is-flex" formControlName="configuration.isAboutDate">
<mat-checkbox class="is-flex" formControlName="isAboutDate">
Les choix possibles concerneront des dates
</mat-checkbox>
<mat-checkbox class="is-flex" formControlName="configuration.isProtectedByPassword">
<mat-checkbox class="is-flex" formControlName="isProtectedByPassword">
Le sondage sera protégé par un mot de passe
</mat-checkbox>
<mat-checkbox class="is-flex" formControlName="configuration.isOwnerNotifiedByEmailOnNewVote">
<mat-checkbox class="is-flex" formControlName="isOwnerNotifiedByEmailOnNewVote">
Vous recevrez un mail à chaque nouvelle participation
</mat-checkbox>
<mat-checkbox class="is-flex" formControlName="configuration.isOwnerNotifiedByEmailOnNewComment">
<mat-checkbox class="is-flex" formControlName="isOwnerNotifiedByEmailOnNewComment">
Vous recevrez un mail à chaque nouveau commentaire
</mat-checkbox>
<mat-checkbox class="is-flex" formControlName="configuration.isMaybeAnswerAvailable">
<mat-checkbox class="is-flex" formControlName="isMaybeAnswerAvailable">
La réponse « peut-être » sera disponible
</mat-checkbox>