error message when no date selected on hour page; add no default day

This commit is contained in:
Tykayn 2022-03-10 16:43:59 +01:00 committed by tykayn
parent e8dc383eae
commit 2b6e8ea5c1
4 changed files with 15 additions and 2 deletions

View File

@ -3,10 +3,13 @@
<div class="min-height">
<app-errors-list [form]="pollService.form"></app-errors-list>
<div class="custom-day-time-slices" *ngIf="1">
<div class="custom-day-time-slices">
<h1 class="title is-1">
{{ 'hours.title' | translate }}
</h1>
<div class="no-days-error has-text-danger" *ngIf="!pollService.dateChoiceList.length">
{{ 'hours.missing-days' | translate }}
</div>
<div
class="days-list-having-separated-time-slices rounded-block"
*ngFor="let dayChoice of pollService.dateChoiceList; index as day_id"
@ -68,7 +71,12 @@
</div>
</div>
</div>
<button id="apply_same_hour" class="is-secondary is-thin button is-fullwidth" (click)="openModal()">
<button
id="apply_same_hour"
class="is-secondary is-thin button is-fullwidth"
(click)="openModal()"
*ngIf="pollService.dateChoiceList.length"
>
{{ 'hours.apply_same' | translate }}
</button>
</div>

View File

@ -108,6 +108,7 @@
"element": "Time span",
"apply_same": "Apply the same time spans to all dates",
"add": "Add time span",
"missing-days": "No days have been selected, please add at least one",
"empty": "No time span",
"reinit": "Reinitialize",
"modal": {

View File

@ -108,6 +108,7 @@
"element": "Horaire",
"apply_same": "Appliquer le même horaire à toutes les dates",
"add": "Ajouter horaire",
"missing-days": "Aucun jour n'a été sélectionné, veuillez en ajouter au moins un",
"empty": "Aucune plage horaire",
"reinit": "Réinitialiser",
"modal": {

View File

@ -72,4 +72,7 @@ body {
.icon-success {
fill: $success_color;
}
.has-text-danger {
color: red !important;
}
}