37 lines
1.3 KiB
HTML
37 lines
1.3 KiB
HTML
<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>
|