2021-12-09 15:43:44 +01:00
|
|
|
<app-stepper [step_current]="4" [step_max]="pollService.step_max"></app-stepper>
|
2021-11-07 14:52:49 +01:00
|
|
|
<div class="step">
|
|
|
|
<div class="min-height">
|
2021-11-22 15:30:23 +01:00
|
|
|
<app-errors-list [form]="pollService.form"></app-errors-list>
|
|
|
|
|
2021-11-30 18:01:18 +01:00
|
|
|
<div class="custom-day-time-slices" *ngIf="environment.creation_display_hour_per_day">
|
|
|
|
<h2 class="title is-2">
|
2022-02-04 13:30:04 +01:00
|
|
|
{{ 'hours.title' | translate }}
|
2021-11-30 18:01:18 +01:00
|
|
|
</h2>
|
|
|
|
<div
|
|
|
|
class="days-list-having-separated-time-slices rounded-block"
|
|
|
|
*ngFor="let dayChoice of pollService.dateChoiceList; index as day_id"
|
|
|
|
>
|
|
|
|
<div class="heading day-choice">
|
|
|
|
{{ dayChoice.date_object | date }}
|
2021-11-22 15:30:23 +01:00
|
|
|
</div>
|
|
|
|
|
2021-11-30 18:01:18 +01:00
|
|
|
<section class="time-slice-list-of-a-day">
|
|
|
|
<div *ngFor="let timeSlice of dayChoice.timeSlices; index as id" class="time-choice padded">
|
2022-02-04 13:30:04 +01:00
|
|
|
<label for="dateChoices_{{ id }}"> {{ 'hours.element' | translate }} {{ id + 1 }} </label>
|
2021-11-30 18:01:18 +01:00
|
|
|
<input
|
|
|
|
class="input is-fullwidth"
|
|
|
|
type="text"
|
|
|
|
id="dateChoices_{{ id }}"
|
|
|
|
[(ngModel)]="timeSlice.literal"
|
|
|
|
/>
|
|
|
|
<button class="button input is-full" (click)="pollService.timeList.splice(id, 1)">
|
2022-02-04 13:30:04 +01:00
|
|
|
<i class="fa fa-trash"></i> {{ 'choices.delete' | translate }}
|
2021-11-30 18:01:18 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="add-time-choice">
|
|
|
|
<button (click)="addChoiceForDay(dayChoice)">
|
|
|
|
<i class="fa fa-plus"></i>
|
2022-02-04 13:30:04 +01:00
|
|
|
{{ 'hours.add' | translate }}
|
2021-11-30 18:01:18 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-22 15:30:23 +01:00
|
|
|
<section class="same-time-slices">
|
2021-11-30 18:01:18 +01:00
|
|
|
<section class="same-time-slices" *ngIf="pollService.form.value.hasSeveralHours">
|
2021-12-21 16:36:43 +01:00
|
|
|
<h2 class="title is-2">
|
2022-02-04 13:30:04 +01:00
|
|
|
{{ 'hours.title' | translate }}
|
2021-12-21 16:36:43 +01:00
|
|
|
</h2>
|
2021-11-22 15:56:43 +01:00
|
|
|
|
2021-11-30 18:01:18 +01:00
|
|
|
<section class="proposals" *ngIf="environment.creation_display_proposals_time_slices">
|
2021-11-26 11:49:51 +01:00
|
|
|
<div class="time-slices-proposals rounded-block">
|
|
|
|
<div
|
|
|
|
class="button is-rounded"
|
|
|
|
*ngFor="let text of timeSlicesProposals"
|
|
|
|
(click)="addPreselect(text.literal)"
|
|
|
|
>
|
|
|
|
{{ text.literal }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
2021-12-06 12:51:37 +01:00
|
|
|
<div *ngFor="let timeSlice of pollService.timeList; index as id" class="time-choice">
|
2022-02-04 13:30:04 +01:00
|
|
|
<label for="timeList_{{ id }}"> {{ 'hours.element' | translate }} {{ id + 1 }} </label>
|
2021-11-22 15:30:23 +01:00
|
|
|
<input
|
|
|
|
class="input is-fullwidth"
|
|
|
|
type="text"
|
|
|
|
id="timeList_{{ id }}"
|
2021-12-06 12:51:37 +01:00
|
|
|
(change)="applyTimeSlicesToDateChoices()"
|
2021-11-22 15:30:23 +01:00
|
|
|
[(ngModel)]="timeSlice.literal"
|
|
|
|
/>
|
|
|
|
<button class="button is-block" (click)="pollService.timeList.splice(id, 1)">
|
2022-02-04 13:30:04 +01:00
|
|
|
<i class="fa fa-trash"></i> {{ 'choices.delete' | translate }}
|
2021-11-22 15:30:23 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
2021-11-22 15:56:43 +01:00
|
|
|
<div class="title" *ngIf="pollService.timeList.length">
|
|
|
|
<span class="count-dates">
|
|
|
|
{{ pollService.timeList.length }}
|
|
|
|
</span>
|
|
|
|
<span class="count-dates-txt">
|
|
|
|
{{ 'dates.count_time' | translate }}
|
2022-02-04 13:30:04 +01:00
|
|
|
<!-- (pour chaque jour)-->
|
2021-11-22 15:56:43 +01:00
|
|
|
</span>
|
|
|
|
</div>
|
2021-11-30 18:01:18 +01:00
|
|
|
<button
|
|
|
|
(click)="pollService.addTime()"
|
|
|
|
*ngIf="false == pollService.allowSeveralHours"
|
|
|
|
class="button is-primary is-block is-fullwidth"
|
|
|
|
id="add_time_button"
|
|
|
|
>
|
|
|
|
<i class="fa fa-plus" aria-hidden="true"></i>
|
|
|
|
{{ 'dates.add_time' | translate }}
|
|
|
|
</button>
|
2021-11-22 15:30:23 +01:00
|
|
|
</section>
|
|
|
|
</section>
|
2021-11-22 15:56:43 +01:00
|
|
|
|
|
|
|
<div class="section copy-paste">
|
|
|
|
<div class="actions">
|
|
|
|
<button
|
|
|
|
(click)="pollService.removeAllTimes()"
|
|
|
|
*ngIf="pollService.timeList.length && false == pollService.allowSeveralHours"
|
|
|
|
class="btn is-warning marged"
|
|
|
|
id="remove_time_button"
|
|
|
|
>
|
|
|
|
<i class="fa fa-trash" aria-hidden="true"></i>
|
2022-02-04 13:30:04 +01:00
|
|
|
{{ 'hours.empty' | translate }}
|
2021-11-22 15:56:43 +01:00
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
(click)="pollService.resetTimes()"
|
|
|
|
*ngIf="pollService.timeList.length && false == pollService.allowSeveralHours"
|
|
|
|
class="btn is-warning marged"
|
|
|
|
id="reset_time_button"
|
|
|
|
>
|
|
|
|
<i class="fa fa-refresh" aria-hidden="true"></i>
|
2022-02-04 13:30:04 +01:00
|
|
|
{{ 'hours.reinit' | translate }}
|
2021-11-22 15:56:43 +01:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-07 14:52:49 +01:00
|
|
|
</div>
|
2021-12-21 16:45:19 +01:00
|
|
|
<p>
|
2022-02-04 13:30:04 +01:00
|
|
|
{{ 'hours.apply_same' | translate }}
|
2021-12-21 16:45:19 +01:00
|
|
|
</p>
|
2021-11-07 14:52:49 +01:00
|
|
|
</div>
|
2021-12-09 15:43:44 +01:00
|
|
|
|
|
|
|
<app-nav-steps
|
|
|
|
[next_step_number]="pollService.step_current + 1"
|
|
|
|
[previous_step_number]="pollService.step_current - 1"
|
|
|
|
></app-nav-steps>
|