From 4a89b715a9e9a9f058c64f3384bd115a89170138 Mon Sep 17 00:00:00 2001
From: Tykayn
Date: Sat, 27 Mar 2021 21:55:05 +0100
Subject: [PATCH] date selector as question answers
---
.../administration/form/form.component.html | 2 +-
.../administration/form/form.component.ts | 4 +
.../kind-select/kind-select.component.html | 89 ++++++++++---------
3 files changed, 50 insertions(+), 45 deletions(-)
diff --git a/src/app/features/administration/form/form.component.html b/src/app/features/administration/form/form.component.html
index 0dc7c1bb..1938a652 100644
--- a/src/app/features/administration/form/form.component.html
+++ b/src/app/features/administration/form/form.component.html
@@ -24,7 +24,7 @@
-
+
diff --git a/src/app/features/administration/form/form.component.ts b/src/app/features/administration/form/form.component.ts
index 505aab38..aae22552 100644
--- a/src/app/features/administration/form/form.component.ts
+++ b/src/app/features/administration/form/form.component.ts
@@ -70,6 +70,7 @@ export class FormComponent implements OnInit {
label: ['', [Validators.required]],
}),
]),
+ kind: ['', [Validators.required]],
configuration: this.fb.group({
areResultsPublic: [true, [Validators.required]],
whoCanChangeAnswers: ['everybody', [Validators.required]],
@@ -77,6 +78,7 @@ export class FormComponent implements OnInit {
isOwnerNotifiedByEmailOnNewVote: [false, [Validators.required]],
isOwnerNotifiedByEmailOnNewComment: [false, [Validators.required]],
isMaybeAnswerAvailable: [false, [Validators.required]],
+
isAboutDate: [true, [Validators.required]],
isZeroKnoledge: [false, [Validators.required]],
expiresDaysDelay: [60, [Validators.required, Validators.min(1)]],
@@ -110,6 +112,8 @@ export class FormComponent implements OnInit {
creatorEmail: 'chucknorris@example.com',
isAboutDate: true,
// hasSeveralHours: true,
+ kind: 'date',
+ // TODO aplatir les contrôles
configuration: {
whoCanChangeAnswers: 'everybody',
isProtectedByPassword: false,
diff --git a/src/app/features/administration/form/kind-select/kind-select.component.html b/src/app/features/administration/form/kind-select/kind-select.component.html
index 2c589339..f322436f 100644
--- a/src/app/features/administration/form/kind-select/kind-select.component.html
+++ b/src/app/features/administration/form/kind-select/kind-select.component.html
@@ -1,47 +1,48 @@