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"> <div class="min-height">
<app-errors-list [form]="pollService.form"></app-errors-list> <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"> <h1 class="title is-1">
{{ 'hours.title' | translate }} {{ 'hours.title' | translate }}
</h1> </h1>
<div class="no-days-error has-text-danger" *ngIf="!pollService.dateChoiceList.length">
{{ 'hours.missing-days' | translate }}
</div>
<div <div
class="days-list-having-separated-time-slices rounded-block" class="days-list-having-separated-time-slices rounded-block"
*ngFor="let dayChoice of pollService.dateChoiceList; index as day_id" *ngFor="let dayChoice of pollService.dateChoiceList; index as day_id"
@ -68,7 +71,12 @@
</div> </div>
</div> </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 }} {{ 'hours.apply_same' | translate }}
</button> </button>
</div> </div>

View File

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

View File

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

View File

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