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

69 lines
1.8 KiB
HTML
Raw Normal View History

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">
{{ dateChoices.length }}
2021-05-17 16:15:54 +02:00
</span>
<span>
{{ 'dates.count_dates' | translate }}
</span>
</div>
</div>
<div
class="columns days-list"
cdkDropList
[cdkDropListData]="dateChoices"
(cdkDropListDropped)="dropDayItem($event)"
>
2021-05-17 16:15:54 +02:00
<div class="column">
<h2>Dates</h2>
<button class="btn button-help" mat-raised-button (click)="openSimple()">
2021-05-17 16:15:54 +02:00
💁 Raccourcis
2021-05-17 15:25:22 +02:00
</button>
<app-shortcuts-help *ngIf="display"></app-shortcuts-help>
2021-05-17 16:15:54 +02:00
<br />
<br />
<div
*ngFor="let choice of dateChoices; index as id"
class="date-choice padded"
cdkDrag
[ngClass]="{ 'day-weekend': isWeekendDay(choice.date_object) }"
>
<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)"
name="dateChoices_{{ id }}"
id="dateChoices_{{ id }}"
useValueAsDate
type="date"
/>
<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>
<button (click)="addTimeToDate(choice, id)" *ngIf="hasSeveralHours" class="btn btn--primary">
{{ 'dates.add_time' | translate }}
</button>
<div *ngIf="hasSeveralHours" class="several-times">
<br />
<app-time-list [timeSlices]="choice.timeSlices"></app-time-list>
2021-05-17 15:25:22 +02:00
</div>
</div>
</div>
</div>
2021-05-17 16:15:54 +02:00
<br />
2021-05-17 15:25:22 +02:00
</div>