2021-05-17 16:15:54 +02:00
|
|
|
<div class="day-list-container">
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<!-- ajouter une date-->
|
|
|
|
<button class="btn btn--primary" (click)="addChoice()">
|
|
|
|
{{ 'dates.add' | translate }}
|
2021-05-17 15:25:22 +02:00
|
|
|
</button>
|
2021-05-17 16:15:54 +02:00
|
|
|
</div>
|
|
|
|
<div class="column">
|
|
|
|
<span class="count-dates title">
|
2021-05-20 09:53:20 +02:00
|
|
|
{{ dateChoices.length }}
|
2021-05-17 16:15:54 +02:00
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
{{ 'dates.count_dates' | translate }}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-05-20 09:53:20 +02:00
|
|
|
<div
|
|
|
|
class="columns days-list"
|
|
|
|
cdkDropList
|
|
|
|
[cdkDropListData]="dateChoices"
|
|
|
|
(cdkDropListDropped)="dropDayItem($event)"
|
|
|
|
>
|
2021-05-17 16:15:54 +02:00
|
|
|
<div class="column">
|
2021-05-18 12:27:26 +02:00
|
|
|
<div
|
2021-05-20 09:53:20 +02:00
|
|
|
*ngFor="let choice of dateChoices; index as id"
|
2021-05-18 12:27:26 +02:00
|
|
|
class="date-choice padded"
|
|
|
|
cdkDrag
|
|
|
|
[ngClass]="{ 'day-weekend': isWeekendDay(choice.date_object) }"
|
|
|
|
>
|
2021-05-18 13:34:28 +02:00
|
|
|
<span class="button is-default">
|
2021-05-18 12:36:49 +02:00
|
|
|
<i class="icon fa fa-arrows-v"></i>
|
2021-05-18 12:45:51 +02:00
|
|
|
<span *ngIf="choice.date_object">
|
|
|
|
{{ choice.date_object | date: 'E':'Europe/Paris':'fr_FR' }}
|
|
|
|
</span>
|
2021-05-18 12:36:49 +02:00
|
|
|
</span>
|
2021-05-17 16:15:54 +02:00
|
|
|
<input
|
|
|
|
[(ngModel)]="choice.date_object"
|
|
|
|
(keyup)="keyOnChoice($event, id)"
|
2021-05-20 10:54:28 +02:00
|
|
|
class="date-choice-item"
|
2021-05-17 16:15:54 +02:00
|
|
|
name="dateChoices_{{ id }}"
|
|
|
|
id="dateChoices_{{ id }}"
|
|
|
|
useValueAsDate
|
|
|
|
type="date"
|
|
|
|
/>
|
2021-05-20 09:53:20 +02:00
|
|
|
<button (click)="dateChoices.splice(id, 1)" class="btn btn-warning">
|
2021-05-17 16:15:54 +02:00
|
|
|
<i class="fa fa-times" aria-hidden="true"></i>
|
|
|
|
</button>
|
2021-05-20 10:54:28 +02:00
|
|
|
<br />
|
|
|
|
|
2021-05-17 16:15:54 +02:00
|
|
|
<div *ngIf="hasSeveralHours" class="several-times">
|
|
|
|
<br />
|
2021-05-20 10:54:28 +02:00
|
|
|
<app-time-list [timeSlices]="choice.timeSlices" [prefix_choice_id]="id"></app-time-list>
|
|
|
|
<div class="text-right">
|
|
|
|
<button (click)="addTimeToDate(choice, id)" class="btn btn--primary">
|
|
|
|
<i class="fa fa-plus"></i>
|
|
|
|
<!-- {{ 'dates.add_time' | translate }}-->
|
|
|
|
<i class="fa fa-clock-o"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
2021-05-17 15:25:22 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-05-17 16:15:54 +02:00
|
|
|
|
2021-05-18 16:02:36 +02:00
|
|
|
<br />
|
2021-05-17 15:25:22 +02:00
|
|
|
</div>
|