forked from tykayn/funky-framadate-front
afficher les choix de plage horaires identiques
This commit is contained in:
parent
422090e997
commit
5028a54fb7
@ -30,7 +30,6 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="actions columns">
|
||||
<div class="column"></div>
|
||||
<div class="column has-text-right">
|
||||
<button
|
||||
(click)="addTime()"
|
||||
@ -65,28 +64,28 @@
|
||||
réinitialiser
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<fieldset class="range-container is-boxed">
|
||||
<div class="range-time" *ngIf="!form.value.hasSeveralHours">
|
||||
<h2>
|
||||
<span class="count-dates-txt">
|
||||
{{ 'dates.count_time' | translate }}
|
||||
(identique pour chaque jour)
|
||||
</span>
|
||||
</h2>
|
||||
<div class="title">
|
||||
<span class="count-dates">
|
||||
{{ timeList.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>
|
||||
<fieldset class="range-container is-boxed">
|
||||
<div class="range-time" *ngIf="!form.value.hasSeveralHours">
|
||||
<h2>
|
||||
<span class="count-dates-txt">
|
||||
{{ 'dates.count_time' | translate }}
|
||||
</span>
|
||||
</h2>
|
||||
<div class="title">
|
||||
<span class="count-dates">
|
||||
{{ timeList.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>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<app-time-list [timeSlices]="timeList"></app-time-list>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -52,4 +52,9 @@
|
||||
.movable {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
app-time-list {
|
||||
margin-top: 1em;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
@ -26,8 +26,8 @@ export class DateSelectComponent implements OnInit {
|
||||
@Input()
|
||||
form: FormGroup;
|
||||
|
||||
displaySeveralHoursChoice = false;
|
||||
allowSeveralHours = false;
|
||||
displaySeveralHoursChoice = true;
|
||||
allowSeveralHours = true;
|
||||
today = new Date();
|
||||
endDateInterval: string;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
<p>time-list works!</p>
|
||||
<div *ngFor="let time of timeList; index as id" class="time-choice">
|
||||
<label for="timeChoices_{{ id }}">
|
||||
<div *ngFor="let time of timeSlices; index as id" class="time-choice">
|
||||
<label class="icon" for="timeChoices_{{ id }}">
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i>
|
||||
</label>
|
||||
<input [(ngModel)]="time.literal" name="timeChoices_{{ id }}" type="text" id="timeChoices_{{ id }}" />
|
||||
|
@ -0,0 +1,6 @@
|
||||
:host {
|
||||
margin-top: 0.5em;
|
||||
.icon {
|
||||
margin-right: 1ch;
|
||||
}
|
||||
}
|
@ -10,7 +10,6 @@ import { moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
|
||||
export class TimeListComponent implements OnInit {
|
||||
@Input()
|
||||
public timeSlices: TimeSlices[];
|
||||
timeList: any;
|
||||
constructor() {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
@ -18,8 +18,8 @@
|
||||
{{ 'creation.want' | translate }}
|
||||
</p>
|
||||
<!-- <div class="step-choices" *ngIf="currentStep === 'base'">-->
|
||||
<app-kind-select [form]="form"></app-kind-select>
|
||||
<app-base-config [form]="form"></app-base-config>
|
||||
<!-- <app-kind-select [form]="form"></app-kind-select>-->
|
||||
<!-- <app-base-config [form]="form"></app-base-config>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="step-choices" *ngIf="currentStep === 'choices'"> </div>-->
|
||||
<app-date-select *ngIf="form.value && form.value.kind == 'date'" [form]="form"></app-date-select>
|
||||
|
@ -22,7 +22,7 @@ export class FormComponent implements OnInit {
|
||||
public form: FormGroup;
|
||||
|
||||
public displayDatePicker = false;
|
||||
public advancedDisplayEnabled = true;
|
||||
public advancedDisplayEnabled = false;
|
||||
public show_debug_data = false;
|
||||
public currentStep = 'base';
|
||||
public steps = ['base', 'choices', 'advanced'];
|
||||
|
Loading…
Reference in New Issue
Block a user