diff --git a/src/app/features/administration/form/form.component.scss b/src/app/features/administration/form/form.component.scss
index c64b7a4c..d5ce7a9c 100644
--- a/src/app/features/administration/form/form.component.scss
+++ b/src/app/features/administration/form/form.component.scss
@@ -75,4 +75,12 @@
.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder) {
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
}
+ .ng-touched.ng-invalid {
+ border-left: $danger 3px solid;
+ padding-left: 1em;
+ }
+ .ng-touched.ng-valid {
+ border-left: $success 3px solid;
+ padding-left: 1em;
+ }
}
diff --git a/src/app/features/administration/form/form.component.ts b/src/app/features/administration/form/form.component.ts
index 5fc98f27..2c0b6c1a 100644
--- a/src/app/features/administration/form/form.component.ts
+++ b/src/app/features/administration/form/form.component.ts
@@ -54,14 +54,15 @@ export class FormComponent implements OnInit {
public createPoll(): void {
console.log('this.form', this.form);
- if (this.form.valid && this.form.valid) {
- console.log('Le sondage est correctement rempli, prêt à enregistrer.');
- const newpoll = this.pollService.newPollFromForm(this.form);
- // TODO : save the poll
- this.apiService.createPoll(newpoll);
- } else {
- this.toastService.display('invalid form');
- }
+ this.apiService.createPoll(this.pollService.newPollFromForm(this.form));
+ // if (this.form.valid) {
+ // console.log('Le sondage est correctement rempli, prêt à enregistrer.');
+ // const newpoll = this.pollService.newPollFromForm(this.form);
+ // // TODO : save the poll
+ // this.apiService.createPoll(newpoll);
+ // } else {
+ // this.toastService.display('invalid form');
+ // }
}
public updateSlug(): void {
@@ -78,6 +79,7 @@ export class FormComponent implements OnInit {
if (optionalLabel) {
newControlGroup.patchValue({
label: optionalLabel,
+ imageUrl: 'mon url',
});
}
this.choices.push(newControlGroup);
@@ -164,7 +166,7 @@ export class FormComponent implements OnInit {
description: 'répondez SVP <3 ! *-* ',
slug: this.uuidService.getUUID(),
creatorPseudo: 'Chuck Norris',
- creatorEmail: '',
+ creatorEmail: 'chucknorris@example.com',
isAboutDate: true,
whoModifiesAnswers: 'everybody',
whoCanChangeAnswers: 'everybody',
@@ -188,7 +190,6 @@ export class FormComponent implements OnInit {
this.dateUtilities.parseInputDateToDateObject(this.startDateInterval),
this.dateUtilities.parseInputDateToDateObject(this.endDateInterval)
);
- this.toastService.display('intervalle de ' + this.intervalDays + ' jours');
this.cd.detectChanges();
}
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 69d3fd55..2be5bf59 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -6,6 +6,13 @@ const backendApiUrlsInDev = {
local: '/api/v1',
remote: 'https://framadate-api.cipherbliss.com/api/v1',
};
+const apiV1 = {
+ baseHref: 'https://framadate-api.cipherbliss.com/api/v1',
+ api_new_poll: '/poll/new',
+ api_get_poll: '/poll/{id}',
+ 'api_test-mail-poll': '/api/v1/poll/mail/test-mail-poll/{emailChoice}',
+ 'app.swagger': '/api/doc.json',
+};
export const environment = {
production: false,
@@ -13,10 +20,14 @@ export const environment = {
appVersion: '2.0.0',
appLogo: 'assets/img/logo.png',
api: {
+ versionToUse: 'apiV1',
+ version: {
+ apiV1,
+ },
baseHref: backendApiUrlsInDev.local,
endpoints: {
polls: {
- name: '/polls',
+ name: '/poll',
choices: {
name: '/choices',
},
diff --git a/src/styles/variables.scss b/src/styles/variables.scss
index e41fa212..36ac3885 100644
--- a/src/styles/variables.scss
+++ b/src/styles/variables.scss
@@ -1,7 +1,7 @@
@charset "UTF-8";
// colors from styleguide https://app.zeplin.io/project/5d4d83d68866d6522ff2ff10/styleguide/colors?cid=5d502bb032e23e3516af8154
-$camo: #839546;
+$green: #64d16e;
$black: #000000;
$ugly-purple: #b24eb7;
$lavender-pink: #e9bdeb;
@@ -27,7 +27,7 @@ $primary: $ugly-purple;
$secondary_color: $lavender-pink;
$font_color: $black;
$logo_color: $dark-lavender;
-$logo_color_2: $camo;
+$logo_color_2: $green;
$legend_color: $dark-lavender;
$legend_color_2: $dusty-orange;
$choice_select_border_color: $cool-grey;
@@ -38,6 +38,7 @@ $clicked-color: $wisteria;
$mini-button-color: $pale-purple;
$warning: $dusty-orange;
$danger: $red;
+$success: $green;
// FONT
$default_font: 'pt_sans';