mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
hide time slices per day select, colors
This commit is contained in:
parent
ab6cb0288d
commit
f1403fe2a0
@ -140,7 +140,7 @@ export class PollService implements Resolve<Poll> {
|
|||||||
hasMaxCountOfAnswers: [300, [Validators.required]],
|
hasMaxCountOfAnswers: [300, [Validators.required]],
|
||||||
useVoterUniqueLink: [false, [Validators.required]],
|
useVoterUniqueLink: [false, [Validators.required]],
|
||||||
voterEmailList: ['', []],
|
voterEmailList: ['', []],
|
||||||
hasSeveralHours: [false, []],
|
hasSeveralHours: [true, []],
|
||||||
hideResults: [false, []],
|
hideResults: [false, []],
|
||||||
allowNewDateTime: [true, [Validators.required]],
|
allowNewDateTime: [true, [Validators.required]],
|
||||||
});
|
});
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
<div class="min-height">
|
<div class="min-height">
|
||||||
<app-stepper [step_current]="4" [step_max]="pollService.step_max"></app-stepper>
|
<app-stepper [step_current]="4" [step_max]="pollService.step_max"></app-stepper>
|
||||||
<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="environment.creation_display_hour_per_day">
|
||||||
<h2 class="title is-2">
|
<h2 class="title is-2">
|
||||||
Choisissez les horaires
|
Choisissez les horaires
|
||||||
</h2>
|
</h2>
|
||||||
@ -34,29 +36,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<section class="same-time-slices">
|
<section class="same-time-slices">
|
||||||
<button class="is-outlined is-primary" (click)="toggleHasSeveralHours()">
|
<!-- <button class="is-outlined is-primary" (click)="toggleHasSeveralHours()">-->
|
||||||
Appliquer le même horaire / option à toutes les dates
|
<!-- Appliquer le même horaire / option à toutes les dates-->
|
||||||
</button>
|
<!-- </button>-->
|
||||||
<section class="same-time-slices rounded-block" *ngIf="pollService.form.value.hasSeveralHours">
|
<section class="same-time-slices" *ngIf="pollService.form.value.hasSeveralHours">
|
||||||
<h3 class="title is-3">
|
<h3 class="title is-3">
|
||||||
Choisissez les horaires ou options à appliquer à toutes les dates
|
Choisissez les horaires ou options à appliquer à toutes les dates
|
||||||
</h3>
|
</h3>
|
||||||
<button
|
|
||||||
(click)="pollService.addTime()"
|
|
||||||
*ngIf="false == pollService.allowSeveralHours"
|
|
||||||
class="button is-primary is-block is-fullwidth"
|
|
||||||
id="add_time_button"
|
|
||||||
>
|
|
||||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
|
||||||
{{ 'dates.add_time' | translate }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<section class="proposals">
|
<section class="proposals" *ngIf="environment.creation_display_proposals_time_slices">
|
||||||
<h3 class="title is-3">
|
<h3 class="title is-3">
|
||||||
Propositions de créneaux horaires
|
Propositions de créneaux horaires
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="time-slices-proposals rounded-block">
|
<div class="time-slices-proposals rounded-block">
|
||||||
<div
|
<div
|
||||||
class="button is-rounded"
|
class="button is-rounded"
|
||||||
@ -88,6 +82,15 @@
|
|||||||
(pour chaque jour)
|
(pour chaque jour)
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<button
|
||||||
|
(click)="pollService.addTime()"
|
||||||
|
*ngIf="false == pollService.allowSeveralHours"
|
||||||
|
class="button is-primary is-block is-fullwidth"
|
||||||
|
id="add_time_button"
|
||||||
|
>
|
||||||
|
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||||
|
{{ 'dates.add_time' | translate }}
|
||||||
|
</button>
|
||||||
<button class="is-primary button" (click)="applyTimeSlicesToDateChoices()">
|
<button class="is-primary button" (click)="applyTimeSlicesToDateChoices()">
|
||||||
Appliquer ces créneaux
|
Appliquer ces créneaux
|
||||||
</button>
|
</button>
|
||||||
@ -124,11 +127,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<button
|
<button class="btn is-primary is-fullwidth" [routerLink]="['/administration/step/5']">
|
||||||
class="btn is-primary is-fullwidth"
|
|
||||||
[routerLink]="['/administration/step/5']"
|
|
||||||
[disabled]="!pollService.form.valid"
|
|
||||||
>
|
|
||||||
Suivant
|
Suivant
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,8 +14,9 @@ import { ToastService } from '../../../../../core/services/toast.service';
|
|||||||
styleUrls: ['./step-four.component.scss'],
|
styleUrls: ['./step-four.component.scss'],
|
||||||
})
|
})
|
||||||
export class StepFourComponent implements OnInit {
|
export class StepFourComponent implements OnInit {
|
||||||
urlPrefix: any;
|
public urlPrefix: any;
|
||||||
advancedDisplayEnabled: boolean = environment.advanced_options_display;
|
public environment = environment;
|
||||||
|
public advancedDisplayEnabled: boolean = environment.advanced_options_display;
|
||||||
@Input()
|
@Input()
|
||||||
step_max: any;
|
step_max: any;
|
||||||
@Input()
|
@Input()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="step step-container">
|
<div class="step step-container">
|
||||||
<form class="min-height" [formGroup]="pollService.form">
|
<form class="min-height" [formGroup]="pollService.form">
|
||||||
<app-stepper [step_current]="1" [step_max]="5"></app-stepper>
|
<app-stepper [step_current]="1" [step_max]="pollService.step_max"></app-stepper>
|
||||||
<section class="poll-title">
|
<section class="poll-title">
|
||||||
<h2 class="title is-2">
|
<h2 class="title is-2">
|
||||||
{{ 'creation.choose_title' | translate }}
|
{{ 'creation.choose_title' | translate }}
|
||||||
|
@ -21,7 +21,9 @@ export class StepOneComponent implements OnInit {
|
|||||||
@Inject(DOCUMENT) private document: any,
|
@Inject(DOCUMENT) private document: any,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private confirmationService: ConfirmationService
|
private confirmationService: ConfirmationService
|
||||||
) {}
|
) {
|
||||||
|
this.step_max = this.pollService.step_max;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.pollService.step_current = 1;
|
this.pollService.step_current = 1;
|
||||||
|
@ -22,11 +22,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<button
|
<button class="btn is-primary is-fullwidth" [routerLink]="['/administration/step/7']">
|
||||||
class="btn is-primary is-fullwidth"
|
|
||||||
[routerLink]="['/administration/step/7']"
|
|
||||||
[disabled]="!pollService.form.valid"
|
|
||||||
>
|
|
||||||
Suivant
|
Suivant
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,11 @@
|
|||||||
<app-stepper [step_current]="3" [step_max]="pollService.step_max"></app-stepper>
|
<app-stepper [step_current]="3" [step_max]="pollService.step_max"></app-stepper>
|
||||||
<app-errors-list [form]="pollService.form"></app-errors-list>
|
<app-errors-list [form]="pollService.form"></app-errors-list>
|
||||||
<!-- sélecteur d'interface-->
|
<!-- sélecteur d'interface-->
|
||||||
<button class="button" (click)="changeDateInputMode()" [ngClass]="{ 'is-primary': !pollService.mode_calendar }">
|
<button
|
||||||
|
class="button is-fullwidth"
|
||||||
|
(click)="changeDateInputMode()"
|
||||||
|
[ngClass]="{ 'is-primary': !pollService.mode_calendar }"
|
||||||
|
>
|
||||||
<span *ngIf="pollService.mode_calendar"> <i class="fa fa-pencil"></i> Saisir les dates manuellement </span>
|
<span *ngIf="pollService.mode_calendar"> <i class="fa fa-pencil"></i> Saisir les dates manuellement </span>
|
||||||
<span *ngIf="!pollService.mode_calendar">
|
<span *ngIf="!pollService.mode_calendar">
|
||||||
<i class="fa fa-calendar-o"></i> Saisir les dates dans le calendrier
|
<i class="fa fa-calendar-o"></i> Saisir les dates dans le calendrier
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="step step-container form-field poll-kind">
|
<div class="step step-container form-field poll-kind">
|
||||||
<form action="#" [formGroup]="pollService.form">
|
<form action="#" [formGroup]="pollService.form">
|
||||||
<div class="min-height">
|
<div class="min-height">
|
||||||
<app-stepper [step_current]="2" [step_max]="5"></app-stepper>
|
<app-stepper [step_current]="2" [step_max]="pollService.step_max"></app-stepper>
|
||||||
<app-errors-list [form]="pollService.form"></app-errors-list>
|
<app-errors-list [form]="pollService.form"></app-errors-list>
|
||||||
<h2 class="title is-2">
|
<h2 class="title is-2">
|
||||||
{{ 'creation.want' | translate }}
|
{{ 'creation.want' | translate }}
|
||||||
@ -11,7 +11,10 @@
|
|||||||
<div class="column">
|
<div class="column">
|
||||||
<div
|
<div
|
||||||
class="button input-radio is-fullwidth"
|
class="button input-radio is-fullwidth"
|
||||||
[ngClass]="{ 'is-selected is-primary': pollService.form.controls.isAboutDate.value }"
|
[ngClass]="{
|
||||||
|
'is-selected has-background-primary has-text-white':
|
||||||
|
pollService.form.controls.isAboutDate.value
|
||||||
|
}"
|
||||||
(click)="pollService.form.controls.isAboutDate.setValue(true)"
|
(click)="pollService.form.controls.isAboutDate.setValue(true)"
|
||||||
>
|
>
|
||||||
<i class="fa fa-calendar"></i>
|
<i class="fa fa-calendar"></i>
|
||||||
@ -24,7 +27,10 @@
|
|||||||
<div class="column">
|
<div class="column">
|
||||||
<div
|
<div
|
||||||
class="button input-radio is-fullwidth"
|
class="button input-radio is-fullwidth"
|
||||||
[ngClass]="{ 'is-selected is-primary': !pollService.form.controls.isAboutDate.value }"
|
[ngClass]="{
|
||||||
|
'is-selected has-background-primary has-text-white': !pollService.form.controls
|
||||||
|
.isAboutDate.value
|
||||||
|
}"
|
||||||
(click)="pollService.form.controls.isAboutDate.setValue(false)"
|
(click)="pollService.form.controls.isAboutDate.setValue(false)"
|
||||||
>
|
>
|
||||||
<i class="fa fa-list-ul"></i>
|
<i class="fa fa-list-ul"></i>
|
||||||
|
@ -40,6 +40,7 @@ export class StepTwoComponent implements OnInit {
|
|||||||
) {
|
) {
|
||||||
this.form = this.pollService.form;
|
this.form = this.pollService.form;
|
||||||
this.pollService.step_current = 2;
|
this.pollService.step_current = 2;
|
||||||
|
this.step_max = this.pollService.step_max;
|
||||||
}
|
}
|
||||||
|
|
||||||
get choices(): FormArray {
|
get choices(): FormArray {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
:host {
|
:host {
|
||||||
position: fixed;
|
position: relative;
|
||||||
bottom: 4em;
|
bottom: 4em;
|
||||||
left: 1em;
|
left: 1em;
|
||||||
color: white;
|
color: white;
|
||||||
|
@ -25,6 +25,7 @@ export const environment = {
|
|||||||
autofill_participation: false,
|
autofill_participation: false,
|
||||||
autofill_default_timeslices: false,
|
autofill_default_timeslices: false,
|
||||||
creation_email_is_required: true,
|
creation_email_is_required: true,
|
||||||
|
creation_display_proposals_time_slices: false,
|
||||||
creation_display_admin_url: false,
|
creation_display_admin_url: false,
|
||||||
creation_display_hour_per_day: false, // display or not the ability to choose time slices different per day
|
creation_display_hour_per_day: false, // display or not the ability to choose time slices different per day
|
||||||
showDemoWarning: false,
|
showDemoWarning: false,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// small screens
|
// small screens
|
||||||
@media (min-width: 600px) {
|
@media (min-width: 600px) {
|
||||||
.feedback-container {
|
.feedback-container {
|
||||||
position: fixed;
|
//position: fixed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// wide screen like desktop
|
// wide screen like desktop
|
||||||
|
Loading…
Reference in New Issue
Block a user