From dfb3e98159d80a801f0a0a9858aae8681134b23a Mon Sep 17 00:00:00 2001 From: Tykayn Date: Tue, 19 Oct 2021 12:53:19 +0200 Subject: [PATCH] set min height for each step --- src/app/core/services/poll.service.ts | 4 - .../administration/form/form.component.html | 15 +- .../form/step-five/step-five.component.html | 2 +- .../form/step-four/step-four.component.html | 2 +- .../form/step-one/step-one.component.html | 13 +- .../form/step-three/step-three.component.html | 268 +++++++++--------- .../form/step-three/step-three.component.ts | 5 + .../form/step-two/step-two.component.html | 50 ++-- .../form/step-two/step-two.component.ts | 4 - src/styles/partials/global.scss | 4 + 10 files changed, 180 insertions(+), 187 deletions(-) diff --git a/src/app/core/services/poll.service.ts b/src/app/core/services/poll.service.ts index 9ff8d134..0489ca02 100644 --- a/src/app/core/services/poll.service.ts +++ b/src/app/core/services/poll.service.ts @@ -165,7 +165,6 @@ export class PollService implements Resolve { } public async loadPollBySlug(slug: string): Promise { - console.log('slug', slug); if (slug) { const poll: Poll | undefined = await this.apiService.getPollBySlug(slug); console.log({ loadPollBySlugResponse: poll }); @@ -213,14 +212,11 @@ export class PollService implements Resolve { keyOnChoice($event: KeyboardEvent, choice_number: number): void { $event.preventDefault(); - console.log('this.choices.length', this.choices.length); - console.log('choice_number', choice_number); const lastChoice = this.choices.length - 1 === choice_number; // reset field with Ctrl + D // add a field with Ctrl + N // go to previous choice with arrow up // go to next choice with arrow down - console.log('$event', $event); if ($event.key == 'ArrowUp' && choice_number > 0) { this.focusOnChoice(choice_number - 1); diff --git a/src/app/features/administration/form/form.component.html b/src/app/features/administration/form/form.component.html index 8e79451b..284a3504 100644 --- a/src/app/features/administration/form/form.component.html +++ b/src/app/features/administration/form/form.component.html @@ -5,22 +5,9 @@ -
+
-
-
-
-
- - -
-
-
- -
diff --git a/src/app/features/administration/form/step-five/step-five.component.html b/src/app/features/administration/form/step-five/step-five.component.html index 829f19a4..7de723a0 100644 --- a/src/app/features/administration/form/step-five/step-five.component.html +++ b/src/app/features/administration/form/step-five/step-five.component.html @@ -1,4 +1,4 @@ - +
diff --git a/src/app/features/administration/form/step-four/step-four.component.html b/src/app/features/administration/form/step-four/step-four.component.html index 41c2e770..3ec32b0f 100644 --- a/src/app/features/administration/form/step-four/step-four.component.html +++ b/src/app/features/administration/form/step-four/step-four.component.html @@ -1,4 +1,4 @@ - +
-
+
-
+
-
diff --git a/src/app/features/administration/form/step-three/step-three.component.html b/src/app/features/administration/form/step-three/step-three.component.html index 0abfc8bf..e2e6f07b 100644 --- a/src/app/features/administration/form/step-three/step-three.component.html +++ b/src/app/features/administration/form/step-three/step-three.component.html @@ -1,145 +1,151 @@ - +
+ - -
-
- - {{ pollService.timeList.length }} - - - {{ 'dates.count_time' | translate }} - (pour chaque jour) - -
-
- - - -
+ +
+
+ + {{ pollService.timeList.length }} + + + {{ 'dates.count_time' | translate }} + (pour chaque jour) + +
+
+ + + +
-
-
-
- - - +
+
+
+ + + +
-
-
- - {{ pollService.dateList.length }} - - - {{ 'dates.count_dates' | translate }} - - -
- - - -
-
- - -
-
-
-
- - -
-

{{ 'dates.add_interval' | translate }}

-
-
- {{ 'dates.interval_propose' | translate }} -
-
- +
+ + +
+
+ + +
+
-
-
- {{ 'dates.interval_span' | translate }} -
-
- - -
-
- -
+ +
+

{{ 'dates.add_interval' | translate }}

+
+
+ {{ 'dates.interval_propose' | translate }} +
+
+ + +
+
+
+
+ {{ 'dates.interval_span' | translate }} +
+
+ + +
+
+ +
+
-
-
- +
+ +

+ {{ 'creation.want' | translate }} +

+
+
+ +
+
+ +
diff --git a/src/app/features/administration/form/step-two/step-two.component.ts b/src/app/features/administration/form/step-two/step-two.component.ts index f6d26010..f5fa17d9 100644 --- a/src/app/features/administration/form/step-two/step-two.component.ts +++ b/src/app/features/administration/form/step-two/step-two.component.ts @@ -53,10 +53,6 @@ export class StepTwoComponent implements OnInit { resetTimes() {} - drop(event: CdkDragDrop) { - // moveItemInArray(this.choices, event.previousIndex, event.currentIndex); - } - addChoice() {} addTimeToDate(choice: any, id: number) {} diff --git a/src/styles/partials/global.scss b/src/styles/partials/global.scss index 73a57f4e..d305dd2f 100644 --- a/src/styles/partials/global.scss +++ b/src/styles/partials/global.scss @@ -4,3 +4,7 @@ html { font-size: 1rem; /* 16px */ color: $font_color; } + +.min-height { + min-height: 50vh; +}