diff --git a/src/app/features/administration/actions-menu/actions-menu.component.html b/src/app/features/administration/actions-menu/actions-menu.component.html new file mode 100644 index 00000000..c6766ed8 --- /dev/null +++ b/src/app/features/administration/actions-menu/actions-menu.component.html @@ -0,0 +1,55 @@ +
+ + + + + + + + +
+ +
+
+ + + +
+
diff --git a/src/app/features/administration/actions-menu/actions-menu.component.scss b/src/app/features/administration/actions-menu/actions-menu.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/features/administration/actions-menu/actions-menu.component.spec.ts b/src/app/features/administration/actions-menu/actions-menu.component.spec.ts new file mode 100644 index 00000000..e5621920 --- /dev/null +++ b/src/app/features/administration/actions-menu/actions-menu.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ActionsMenuComponent } from './actions-menu.component'; + +describe('ActionsMenuComponent', () => { + let component: ActionsMenuComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ActionsMenuComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ActionsMenuComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/administration/actions-menu/actions-menu.component.ts b/src/app/features/administration/actions-menu/actions-menu.component.ts new file mode 100644 index 00000000..6e28aed1 --- /dev/null +++ b/src/app/features/administration/actions-menu/actions-menu.component.ts @@ -0,0 +1,72 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { PollUtilitiesService } from '../../../core/services/poll.utilities.service'; +import { StorageService } from '../../../core/services/storage.service'; +import { ApiService } from '../../../core/services/api.service'; +import { PollService } from '../../../core/services/poll.service'; +import { DateService } from '../../../core/services/date.service'; +import { ToastService } from '../../../core/services/toast.service'; +import { ConfirmationService } from 'primeng/api'; + +@Component({ + selector: 'app-actions-menu', + templateUrl: './actions-menu.component.html', + styleUrls: ['./actions-menu.component.scss'], +}) +export class ActionsMenuComponent implements OnInit { + constructor( + private router: Router, + private utils: PollUtilitiesService, + private _Activatedroute: ActivatedRoute, + private confirmationService: ConfirmationService, + public storageService: StorageService, + public api: ApiService, + public pollService: PollService, + public dateService: DateService, + public toastService: ToastService + ) {} + + ngOnInit(): void {} + + /** + * export all the poll data available to the public as a CSV single file + */ + exportCSV(): void { + this.utils.exportCSV(this.pollService._poll.getValue()); + } + + exportJson(): void { + this.utils.download( + 'export_poll_' + this.pollService._poll.getValue().custom_url + '.json', + JSON.stringify(this.pollService._poll.getValue()) + ); + } + + duplicate(): void { + alert('TODO'); + } + + print(): void { + alert('TODO'); + } + + deleteAllVotes() { + this.confirmationService.confirm({ + message: 'Supprimer tous les votes de ce sondage?', + accept: () => { + alert('TODO'); + console.log('TODO'); + }, + }); + } + + deleteAllComments() { + alert('TODO'); + console.log('TODO'); + } + + deletePoll() { + alert('TODO'); + console.log('TODO'); + } +} diff --git a/src/app/features/administration/administration-routing.module.ts b/src/app/features/administration/administration-routing.module.ts index 4676f048..b26342f2 100644 --- a/src/app/features/administration/administration-routing.module.ts +++ b/src/app/features/administration/administration-routing.module.ts @@ -9,6 +9,8 @@ import { StepFiveComponent } from './form/steps/step-five/step-five.component'; import { StepOneComponent } from './form/steps/step-one/step-one.component'; import { SuccessComponent } from './success/success.component'; import { AdminConsultationComponent } from './consultation/consultation.component'; +import { StepSixComponent } from './form/steps/step-six/step-six.component'; +import { StepSevenComponent } from './form/steps/step-seven/step-seven.component'; const routes: Routes = [ { @@ -24,6 +26,8 @@ const routes: Routes = [ { path: '3', component: StepThreeComponent }, { path: '4', component: StepFourComponent }, { path: '5', component: StepFiveComponent }, + { path: '6', component: StepSixComponent }, + { path: '7', component: StepSevenComponent }, ], }, { diff --git a/src/app/features/administration/administration.module.ts b/src/app/features/administration/administration.module.ts index c310d712..dff20f0b 100644 --- a/src/app/features/administration/administration.module.ts +++ b/src/app/features/administration/administration.module.ts @@ -29,6 +29,12 @@ import { PickerComponent } from './form/date/picker/picker.component'; import { TimeListComponent } from './form/date/list/time/time-list.component'; import { AdminConsultationComponent } from './consultation/consultation.component'; import { ConfirmDialogModule } from 'primeng/confirmdialog'; +import { StepSixComponent } from './form/steps/step-six/step-six.component'; +import { StepSevenComponent } from './form/steps/step-seven/step-seven.component'; +import { OptionLinkComponent } from './form/option-link/option-link.component'; +import { TextListComponent } from './form/text-list/text-list.component'; +import { HoursComponent } from './form/hours/hours.component'; +import { ActionsMenuComponent } from './actions-menu/actions-menu.component'; @NgModule({ declarations: [ @@ -53,6 +59,12 @@ import { ConfirmDialogModule } from 'primeng/confirmdialog'; PickerComponent, TimeListComponent, AdminConsultationComponent, + StepSixComponent, + StepSevenComponent, + OptionLinkComponent, + TextListComponent, + HoursComponent, + ActionsMenuComponent, ], imports: [ AdministrationRoutingModule, @@ -65,5 +77,6 @@ import { ConfirmDialogModule } from 'primeng/confirmdialog'; DragDropModule, ConfirmDialogModule, ], + exports: [ActionsMenuComponent], }) export class AdministrationModule {} diff --git a/src/app/features/administration/form/date/list/day/day-list.component.html b/src/app/features/administration/form/date/list/day/day-list.component.html index ad4a1229..fcee1119 100644 --- a/src/app/features/administration/form/date/list/day/day-list.component.html +++ b/src/app/features/administration/form/date/list/day/day-list.component.html @@ -2,7 +2,8 @@
-
@@ -21,12 +22,23 @@ cdkDrag [ngClass]="{ 'day-weekend': isWeekendDay(choice.date_object) }" > - - - - {{ choice.date_object | date: 'E':'Europe/Paris':'fr_FR' }} - - + + + + + + +
+
+ +
+
+ JJ/MM/AAAA +
+
+ - -
- +
+
+ + Supprimer la date +

-
-
diff --git a/src/app/features/administration/form/steps/step-four/step-four.component.ts b/src/app/features/administration/form/steps/step-four/step-four.component.ts index 127e9a62..c6d717be 100644 --- a/src/app/features/administration/form/steps/step-four/step-four.component.ts +++ b/src/app/features/administration/form/steps/step-four/step-four.component.ts @@ -21,15 +21,4 @@ export class StepFourComponent implements OnInit { } ngOnInit(): void {} - - createPoll() { - this.pollService.createPoll().then( - (resp) => { - this.router.navigate(['administration/success']); - }, - (err) => { - console.error('oops err', err); - } - ); - } } diff --git a/src/app/features/administration/form/steps/step-seven/step-seven.component.html b/src/app/features/administration/form/steps/step-seven/step-seven.component.html new file mode 100644 index 00000000..2d92a4e1 --- /dev/null +++ b/src/app/features/administration/form/steps/step-seven/step-seven.component.html @@ -0,0 +1,94 @@ +
+ +
+
+

+ Voici le résumé de votre sondage +

+

+ En cliquant sur le bouton « Modifier » d’une section vous serez renvoyé à l’étape correspondante de la + création du sondage. Vous devrez repasser par toutes les étapes suivantes. +
+ Mais rassurez-vous, vous n’aurez pas à tout remplir à nouveau. +

+
+

Mes informations générales

+
+

+ {{ pollService.form.value.title }} +

+

+ {{ pollService.form.value.description }} +

+
+
+ Modifier +
+
+

Mon type de sondage

+
+ {{ pollService.form.value.isAboutDate ? 'Date' : 'Propositions' }} +
+
+ Modifier +
+
+

Mes dates et horaires

+
+
+
    +
  • + {{ choice.date_object | date: 'E d M yyy':'Europe/Paris':'fr_FR' }} +
  • +
+
+
+
    +
  • + {{ choice }} +
  • +
+
+
+
+ Modifier +
+
+

Mes paramètres et options de notifications

+
+
+ Protégé par mot de passe: {{ pollService.form.value.isProtectedByPassword ? 'oui' : 'non' }} +
+
+
+ Modifier +
+
+

Mon nom et mon adresse e-mail

+
+
+ {{ pollService.form.value.creatorPseudo }} +
+ +
+
+ Modifier +
+
+
+
+ +
+
+ +
+
+
+
diff --git a/src/app/features/administration/form/steps/step-seven/step-seven.component.scss b/src/app/features/administration/form/steps/step-seven/step-seven.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/features/administration/form/steps/step-seven/step-seven.component.spec.ts b/src/app/features/administration/form/steps/step-seven/step-seven.component.spec.ts new file mode 100644 index 00000000..7979511d --- /dev/null +++ b/src/app/features/administration/form/steps/step-seven/step-seven.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { StepSevenComponent } from './step-seven.component'; + +describe('StepSevenComponent', () => { + let component: StepSevenComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [StepSevenComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(StepSevenComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/administration/form/steps/step-seven/step-seven.component.ts b/src/app/features/administration/form/steps/step-seven/step-seven.component.ts new file mode 100644 index 00000000..08b49f94 --- /dev/null +++ b/src/app/features/administration/form/steps/step-seven/step-seven.component.ts @@ -0,0 +1,26 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { PollService } from '../../../../../core/services/poll.service'; + +@Component({ + selector: 'app-step-seven', + templateUrl: './step-seven.component.html', + styleUrls: ['./step-seven.component.scss'], +}) +export class StepSevenComponent implements OnInit { + constructor(private router: Router, public pollService: PollService) { + this.pollService.step_current = 7; + } + + ngOnInit(): void {} + createPoll() { + this.pollService.createPoll().then( + (resp) => { + this.router.navigate(['administration/success']); + }, + (err) => { + console.error('oops err', err); + } + ); + } +} diff --git a/src/app/features/administration/form/steps/step-six/step-six.component.html b/src/app/features/administration/form/steps/step-six/step-six.component.html new file mode 100644 index 00000000..5ad525f6 --- /dev/null +++ b/src/app/features/administration/form/steps/step-six/step-six.component.html @@ -0,0 +1,34 @@ +
+ +
+
+

+ Dites à vos participants qui vous êtes ! +

+ + + + +
+
+
+
+ +
+
+ +
+
+
diff --git a/src/app/features/administration/form/steps/step-six/step-six.component.scss b/src/app/features/administration/form/steps/step-six/step-six.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/features/administration/form/steps/step-six/step-six.component.spec.ts b/src/app/features/administration/form/steps/step-six/step-six.component.spec.ts new file mode 100644 index 00000000..4cb50daf --- /dev/null +++ b/src/app/features/administration/form/steps/step-six/step-six.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { StepSixComponent } from './step-six.component'; + +describe('StepSixComponent', () => { + let component: StepSixComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [StepSixComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(StepSixComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/administration/form/steps/step-six/step-six.component.ts b/src/app/features/administration/form/steps/step-six/step-six.component.ts new file mode 100644 index 00000000..cbe4ea30 --- /dev/null +++ b/src/app/features/administration/form/steps/step-six/step-six.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; +import { PollService } from '../../../../../core/services/poll.service'; + +@Component({ + selector: 'app-step-six', + templateUrl: './step-six.component.html', + styleUrls: ['./step-six.component.scss'], +}) +export class StepSixComponent implements OnInit { + constructor(public pollService: PollService) { + this.pollService.step_current = 6; + } + + ngOnInit(): void {} +} diff --git a/src/app/features/administration/form/steps/step-three/step-three.component.html b/src/app/features/administration/form/steps/step-three/step-three.component.html index 769e06d4..4ccb5947 100644 --- a/src/app/features/administration/form/steps/step-three/step-three.component.html +++ b/src/app/features/administration/form/steps/step-three/step-three.component.html @@ -1,5 +1,5 @@
- +
diff --git a/src/app/features/administration/form/text-list/text-list.component.html b/src/app/features/administration/form/text-list/text-list.component.html new file mode 100644 index 00000000..2ee9518e --- /dev/null +++ b/src/app/features/administration/form/text-list/text-list.component.html @@ -0,0 +1 @@ +

text-list works!

diff --git a/src/app/features/administration/form/text-list/text-list.component.scss b/src/app/features/administration/form/text-list/text-list.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/features/administration/form/text-list/text-list.component.spec.ts b/src/app/features/administration/form/text-list/text-list.component.spec.ts new file mode 100644 index 00000000..5af54629 --- /dev/null +++ b/src/app/features/administration/form/text-list/text-list.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TextListComponent } from './text-list.component'; + +describe('TextListComponent', () => { + let component: TextListComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TextListComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TextListComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/administration/form/text-list/text-list.component.ts b/src/app/features/administration/form/text-list/text-list.component.ts new file mode 100644 index 00000000..36fec394 --- /dev/null +++ b/src/app/features/administration/form/text-list/text-list.component.ts @@ -0,0 +1,12 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-text-list', + templateUrl: './text-list.component.html', + styleUrls: ['./text-list.component.scss'], +}) +export class TextListComponent implements OnInit { + constructor() {} + + ngOnInit(): void {} +} diff --git a/src/app/features/consultation/consultation-landing/consultation-landing.component.html b/src/app/features/consultation/consultation-landing/consultation-landing.component.html new file mode 100644 index 00000000..ed3f01f9 --- /dev/null +++ b/src/app/features/consultation/consultation-landing/consultation-landing.component.html @@ -0,0 +1,29 @@ +
+

+ + vous invite à participer à son sondage +

+
+
+ +
+

+ {{ pollService.poll.title }} +

+

+ Si l’administrateur du sondage a ajouter une description elle sera affiché ici. +

+

+ Fin du sondage le + + 14/11/2021 + +

+ +
+
diff --git a/src/app/features/consultation/consultation-landing/consultation-landing.component.scss b/src/app/features/consultation/consultation-landing/consultation-landing.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/features/consultation/consultation-landing/consultation-landing.component.spec.ts b/src/app/features/consultation/consultation-landing/consultation-landing.component.spec.ts new file mode 100644 index 00000000..384ac81a --- /dev/null +++ b/src/app/features/consultation/consultation-landing/consultation-landing.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConsultationLandingComponent } from './consultation-landing.component'; + +describe('ConsultationLandingComponent', () => { + let component: ConsultationLandingComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ConsultationLandingComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConsultationLandingComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/consultation/consultation-landing/consultation-landing.component.ts b/src/app/features/consultation/consultation-landing/consultation-landing.component.ts new file mode 100644 index 00000000..6a31c7e3 --- /dev/null +++ b/src/app/features/consultation/consultation-landing/consultation-landing.component.ts @@ -0,0 +1,13 @@ +import { Component, OnInit } from '@angular/core'; +import { PollService } from '../../../core/services/poll.service'; + +@Component({ + selector: 'app-consultation-landing', + templateUrl: './consultation-landing.component.html', + styleUrls: ['./consultation-landing.component.scss'], +}) +export class ConsultationLandingComponent implements OnInit { + constructor(public pollService: PollService) {} + + ngOnInit(): void {} +} diff --git a/src/app/features/consultation/consultation-routing.module.ts b/src/app/features/consultation/consultation-routing.module.ts index 66d7647b..72568688 100644 --- a/src/app/features/consultation/consultation-routing.module.ts +++ b/src/app/features/consultation/consultation-routing.module.ts @@ -4,18 +4,24 @@ import { RouterModule, Routes } from '@angular/router'; import { ConsultationComponent } from './consultation.component'; import { WipTodoComponent } from '../../shared/components/ui/wip-todo/wip-todo.component'; import { PasswordPromptComponent } from './password/password-prompt/password-prompt.component'; +import { ConsultationLandingComponent } from './consultation-landing/consultation-landing.component'; +import { SuccessComponent } from './success/success.component'; +import { ConsultationUserComponent } from './consultation-user/consultation-user.component'; const routes: Routes = [ - { path: 'secure/:pass_hash', component: ConsultationComponent }, + { + path: '', + component: ConsultationLandingComponent, + children: [], + }, + { path: 'secure/:pass_hash', component: ConsultationComponent }, { path: 'prompt', component: PasswordPromptComponent }, { path: 'simple', component: WipTodoComponent }, { path: 'table', component: WipTodoComponent }, - { - path: '', - component: ConsultationComponent, - children: [], - }, + + { path: 'user-info', component: ConsultationUserComponent }, + { path: 'success', component: SuccessComponent }, ]; @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/features/consultation/consultation-user/consultation-user.component.html b/src/app/features/consultation/consultation-user/consultation-user.component.html new file mode 100644 index 00000000..701a91b8 --- /dev/null +++ b/src/app/features/consultation/consultation-user/consultation-user.component.html @@ -0,0 +1,26 @@ +
+

+ Dites à l’organisateur et aux autres participants qui vous êtes ! +

+ + + + + +
+
+ +
+
+ +
+
+
diff --git a/src/app/features/consultation/consultation-user/consultation-user.component.scss b/src/app/features/consultation/consultation-user/consultation-user.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/features/consultation/consultation-user/consultation-user.component.spec.ts b/src/app/features/consultation/consultation-user/consultation-user.component.spec.ts new file mode 100644 index 00000000..78c32ea4 --- /dev/null +++ b/src/app/features/consultation/consultation-user/consultation-user.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConsultationUserComponent } from './consultation-user.component'; + +describe('ConsultationUserComponent', () => { + let component: ConsultationUserComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ConsultationUserComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConsultationUserComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/consultation/consultation-user/consultation-user.component.ts b/src/app/features/consultation/consultation-user/consultation-user.component.ts new file mode 100644 index 00000000..2b3f729d --- /dev/null +++ b/src/app/features/consultation/consultation-user/consultation-user.component.ts @@ -0,0 +1,13 @@ +import { Component, OnInit } from '@angular/core'; +import { PollService } from '../../../core/services/poll.service'; + +@Component({ + selector: 'app-consultation-user', + templateUrl: './consultation-user.component.html', + styleUrls: ['./consultation-user.component.scss'], +}) +export class ConsultationUserComponent implements OnInit { + constructor(public pollService: PollService) {} + + ngOnInit(): void {} +} diff --git a/src/app/features/consultation/consultation.component.html b/src/app/features/consultation/consultation.component.html index 6447b16e..5d769b1f 100644 --- a/src/app/features/consultation/consultation.component.html +++ b/src/app/features/consultation/consultation.component.html @@ -37,40 +37,7 @@

author : {{ poll.owner?.pseudo }}

- - - - - - -
- -
+
@@ -120,13 +87,11 @@
@@ -151,8 +120,6 @@ *ngIf="!storageService.vote_stack || !storageService.vote_stack.id" > Envoyer - - - - - - diff --git a/src/app/features/consultation/consultation.component.ts b/src/app/features/consultation/consultation.component.ts index 63195644..dbd84ccc 100644 --- a/src/app/features/consultation/consultation.component.ts +++ b/src/app/features/consultation/consultation.component.ts @@ -15,8 +15,8 @@ import { ToastService } from '../../core/services/toast.service'; styleUrls: ['./consultation.component.scss'], }) export class ConsultationComponent implements OnInit, OnDestroy { - public isCompactMode = false; - // public isCompactMode = true; + // public isCompactMode = false; + public isCompactMode = true; public poll: Poll; public pollSlug: string; public pass_hash: string; @@ -139,23 +139,4 @@ export class ConsultationComponent implements OnInit, OnDestroy { this.toastService.display('erreur à l enregistrement'); } } - - /** - * export all the poll data available to the public as a CSV single file - */ - exportCSV(): void { - this.utils.exportCSV(this.poll); - } - - exportJson(): void { - this.utils.download('export_poll_' + this.pollSlug + '.json', JSON.stringify(this.poll)); - } - - duplicate(): void { - alert('TODO'); - } - - print(): void { - alert('TODO'); - } } diff --git a/src/app/features/consultation/consultation.module.ts b/src/app/features/consultation/consultation.module.ts index 7b5cfcb8..9c2d7450 100644 --- a/src/app/features/consultation/consultation.module.ts +++ b/src/app/features/consultation/consultation.module.ts @@ -11,6 +11,10 @@ import { ChoiceButtonComponent } from '../../shared/components/choice-item/choic import { PasswordPromptComponent } from './password/password-prompt/password-prompt.component'; import { ChoiceDetailsComponent } from '../../shared/components/choice-details/choice-details.component'; import { CoreModule } from '../../core/core.module'; +import { ConsultationLandingComponent } from './consultation-landing/consultation-landing.component'; +import { ConsultationUserComponent } from './consultation-user/consultation-user.component'; +import { SuccessComponent } from './success/success.component'; +import { AdministrationModule } from '../administration/administration.module'; @NgModule({ declarations: [ @@ -19,7 +23,16 @@ import { CoreModule } from '../../core/core.module'; PollResultsDetailedComponent, ChoiceButtonComponent, PasswordPromptComponent, + ConsultationLandingComponent, + ConsultationUserComponent, + SuccessComponent, + ], + imports: [ + CommonModule, + ConsultationRoutingModule, + SharedModule, + TranslateModule.forChild({ extend: true }), + AdministrationModule, ], - imports: [CommonModule, ConsultationRoutingModule, SharedModule, TranslateModule.forChild({ extend: true })], }) export class ConsultationModule {} diff --git a/src/app/features/consultation/success/success.component.html b/src/app/features/consultation/success/success.component.html new file mode 100644 index 00000000..097073ab --- /dev/null +++ b/src/app/features/consultation/success/success.component.html @@ -0,0 +1,18 @@ +
+

+ Votre participation a bien été prise en compte ! +

+

+ Vous avez participé au sondage « Quand pour le resto ? ». Vous pouvez modifier vos votes, voir les votes des + autres participants ou échanger des messages avec eux. Pour ça, cliquez sur « Voir le sondage ». +

+ + +
diff --git a/src/app/features/consultation/success/success.component.scss b/src/app/features/consultation/success/success.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/src/app/features/consultation/success/success.component.spec.ts b/src/app/features/consultation/success/success.component.spec.ts new file mode 100644 index 00000000..1e4f6a41 --- /dev/null +++ b/src/app/features/consultation/success/success.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SuccessComponent } from './success.component'; + +describe('SuccessComponent', () => { + let component: SuccessComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SuccessComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SuccessComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/features/consultation/success/success.component.ts b/src/app/features/consultation/success/success.component.ts new file mode 100644 index 00000000..9b3f6255 --- /dev/null +++ b/src/app/features/consultation/success/success.component.ts @@ -0,0 +1,13 @@ +import { Component, OnInit } from '@angular/core'; +import { PollService } from '../../../core/services/poll.service'; + +@Component({ + selector: 'app-success', + templateUrl: './success.component.html', + styleUrls: ['./success.component.scss'], +}) +export class SuccessComponent implements OnInit { + constructor(public pollService: PollService) {} + + ngOnInit(): void {} +} diff --git a/src/styles/partials/_datepicker.scss b/src/styles/partials/_datepicker.scss new file mode 100644 index 00000000..7f32c57f --- /dev/null +++ b/src/styles/partials/_datepicker.scss @@ -0,0 +1,86 @@ +// calendar primeng +.calendar { + text-align: center; +} +.p-datepicker { + border: solid 1px $logo_color; + padding: 0.5em; + margin: 1em auto; + + .p-datepicker-title, + .p-datepicker-calendar thead tr th span { + color: $secondary_color !important; + text-align: center; + width: 100%; + display: block; + } + + p-button, + button { + border: solid 1px $secondary_color !important; + color: $secondary_color !important; + } + + .p-datepicker-buttonbar { + margin-top: 0.5em; + button { + min-width: 15em; + } + } + + .p-datepicker-month { + margin-right: 1em; + } + + .p-datepicker-weeknumber span { + border-right: 1px solid $secondary_color; + } + + .p-datepicker-today span { + font-weight: bold; + border: solid 3px $secondary_color !important; + background: $white; + } + + .p-datepicker-calendar td span { + padding: 1.5em 0.5em; + width: 3.5em; + transition: all ease 0.5s; + background: $white; + border: solid 1px $secondary_color; + color: $secondary_color; + + &:hover { + background: mix($white, $secondary_color); + color: $white; + transition: all ease 0.2s; + } + } + + table td > span { + border-radius: 0.25em; + } + + .p-highlight { + background: $secondary_color !important; + color: $white !important; + } + + .p-disabled { + background: $d-grey; + color: $grey; + } + + .p-datepicker-other-month { + color: white; + } + + // weekend days + tr > td { + &:nth-of-type(6), + &:nth-of-type(7) { + //border-left: 1px solid $border-color; + background: $bg-grey; + } + } +} diff --git a/src/styles/partials/_forms.scss b/src/styles/partials/_forms.scss index 4f67a6da..5d7081c7 100644 --- a/src/styles/partials/_forms.scss +++ b/src/styles/partials/_forms.scss @@ -1,4 +1,7 @@ @charset "UTF-8"; + +@import 'datepicker'; + .input:hover, input:hover, select:hover, @@ -11,6 +14,7 @@ select.is-hovered, .select select.is-hovered { border-color: $border-color !important; } + app-step-one, app-step-two, app-step-three, @@ -18,11 +22,13 @@ app-step-four { padding: 2em 2.5em; display: block; } + app-step-five { app-stepper { padding: 2em 2.5em; display: block; } + .container { padding: 2em; } @@ -265,78 +271,12 @@ mat-checkbox { padding: 1em; } -// calendar primeng -.p-datepicker { - border: solid 1px $logo_color; - padding: 0.5em; - margin: 1em auto; - - p-button, - button { - border: solid 1px $secondary_color !important; - color: $secondary_color !important; - } - .p-datepicker-buttonbar { - margin-top: 0.5em; - } - .p-datepicker-month { - margin-right: 1em; - } - - .p-datepicker-weeknumber span { - border-right: 1px solid $secondary_color; - } - - .p-datepicker-today td span { - font-weight: bold; - border: solid 3px $secondary_color; - background: $white; - } - - .p-datepicker-calendar td span { - padding: 1.5em 0.5em; - width: 3.5em; - transition: all ease 0.5s; - background: $white; - border: solid 1px $secondary_color; - color: $secondary_color; - - &:hover { - background: mix($white, $secondary_color); - color: $white; - transition: all ease 0.2s; - } - } - - table td > span { - border-radius: 0.25em; - } - .p-highlight { - background: $secondary_color !important; - color: $white !important; - } - .p-disabled { - background: $d-grey; - color: $grey; - } - .p-datepicker-other-month { - color: white; - } - // weekend days - tr > td { - &:nth-of-type(6), - &:nth-of-type(7) { - //border-left: 1px solid $border-color; - background: $grey-lighter; - } - } -} - .advanced-config { .box { background: $light; border: 3px solid $primary-color; } + .work-in-progress { padding: 1em 2em; background: $border-color; @@ -345,5 +285,42 @@ mat-checkbox { } .step-container { + padding: 1em 2em; @extend .container, .is-widescreen; } + +// resume de la création de sondage +.step-resume { + .content { + .title { + &.is-2, + &.is-3 { + color: $secondary_color; + } + } + } +} + +.block-resume { + border-radius: 0.25em; + background: $bg-grey; + padding: 1em; + margin-bottom: 0.5em; + + hr { + margin: 0.5em -1em; + background: $rules; + } + + .go-to-step { + @extend .clickable; + color: $secondary_color; + padding: 1.5em; + border-radius: 0.25em; + + &:hover { + background: $secondary_color; + color: $white; + } + } +} diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 1be3515e..c411ffd6 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -25,7 +25,8 @@ $beige-lighter: #eff0eb; $d-primary: #3e3882; // bleu 800 $d-primary-intense: #6359cf; // bleu 600 -$d-grey: #f6f5fd; +$d-grey: #f6f5fd; // bleu 300 +$d-rule: #e2e0fa; // bleu 100 $d-neutral: #767486; $d-alt: #a9607f; @@ -42,6 +43,7 @@ $d-error-text: #d51b38; $primary_color: $d-primary; $primary: $d-primary; $secondary_color: $d-primary-intense; +$bg-grey: $d-grey; $font_color: $black; $logo_color: $d-primary; $logo_color_2: $d-primary-intense; @@ -49,6 +51,7 @@ $legend_color: $d-info-text; $legend_color_2: $d-info; $choice_select_border_color: $d-info; $hover-color: $d-neutral; +$rules: $d-rule; $border-color: $d-neutral; $grey-dark: $d-primary; $grey-lighter: $beige-light;