funky-framadate-front/src/app/features/administration/form/date-select/date-select.component.html

109 lines
3.0 KiB
HTML
Raw Normal View History

2021-02-04 16:14:07 +01:00
<div class="date-selection">
2021-02-09 12:10:10 +01:00
<form [formGroup]="form">
2021-05-03 15:10:29 +02:00
<h2>
{{ 'choices.title' | translate }}
</h2>
{{ 'dates.add' | translate }}
2021-02-09 12:10:10 +01:00
<!-- interval-->
<app-date-interval [form]="form"></app-date-interval>
2021-02-09 12:10:10 +01:00
</form>
2021-02-09 11:27:01 +01:00
<div class="dates-list">
2021-05-17 15:25:22 +02:00
<!-- 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>
<i class="fa fa-clock-o"></i>
2021-05-18 12:45:51 +02:00
<span> horaires avancées</span>
2021-05-17 15:25:22 +02:00
</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>
2021-02-09 11:27:01 +01:00
<div class="actions columns">
2021-02-09 12:31:33 +01:00
<div class="column has-text-right">
<button
2021-02-09 11:27:01 +01:00
(click)="addTime()"
2021-04-30 12:37:04 +02:00
*ngIf="!form.value.hasSeveralHours"
class="btn btn--primary"
2021-02-09 11:27:01 +01:00
id="add_time_button"
>
<i class="fa fa-plus" aria-hidden="true"></i>
<span>
{{ 'dates.add_time' | translate }}
</span>
</button>
<button
(click)="removeAllTimes()"
2021-04-30 12:37:04 +02:00
*ngIf="form.value.hasSeveralHours"
2021-02-09 11:27:01 +01:00
class="btn btn--warning"
id="remove_time_button"
>
2021-02-09 11:27:01 +01:00
<i class="fa fa-trash" aria-hidden="true"></i>
<span>
Aucune plage horaire
</span>
</button>
2021-02-09 11:27:01 +01:00
<button
(click)="resetTimes()"
2021-04-30 12:37:04 +02:00
*ngIf="form.value.hasSeveralHours"
2021-02-09 11:27:01 +01:00
class="btn btn--warning"
id="reset_time_button"
>
<i class="fa fa-refresh" aria-hidden="true"></i>
<span>
réinitialiser
</span>
</button>
<fieldset class="range-container is-boxed" *ngIf="!form.value.hasSeveralHours">
<div class="range-time">
<h2>
<span class="count-dates-txt">
{{ 'dates.count_time' | translate }}
</span>
</h2>
<div class="title">
<span class="count-dates">
2021-05-18 12:12:08 +02:00
{{ timeSlices.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>
<app-time-list [timeSlices]="timeSlices"></app-time-list>
</div>
</fieldset>
</div>
</div>
2021-05-17 15:25:22 +02:00
</div>
2021-02-09 11:27:01 +01:00
<hr />
<div class="main-box is-boxed">
2021-05-20 11:12:22 +02:00
<h2>Dates</h2>
<button class="btn button-help" mat-raised-button (click)="openSimple()">
💁 Raccourcis
</button>
<app-shortcuts-help *ngIf="display"></app-shortcuts-help>
<br />
<br />
2021-05-17 16:15:54 +02:00
<app-day-list
[form]="form"
[dateChoices]="dateChoices"
2021-05-17 16:15:54 +02:00
[hasSeveralHours]="form.value.hasSeveralHours"
></app-day-list>
2021-02-04 16:14:07 +01:00
</div>
</div>
2021-02-04 16:14:07 +01:00
</div>