mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
seven steps components and more steps for participation
This commit is contained in:
parent
5dfa315848
commit
4e449b38a8
@ -0,0 +1 @@
|
||||
<p>actions-menu works!</p>
|
@ -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<ActionsMenuComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ActionsMenuComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ActionsMenuComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,12 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-actions-menu',
|
||||
templateUrl: './actions-menu.component.html',
|
||||
styleUrls: ['./actions-menu.component.scss'],
|
||||
})
|
||||
export class ActionsMenuComponent implements OnInit {
|
||||
constructor() {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
}
|
@ -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 },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -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,
|
||||
|
@ -0,0 +1 @@
|
||||
<p>hours works!</p>
|
@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { HoursComponent } from './hours.component';
|
||||
|
||||
describe('HoursComponent', () => {
|
||||
let component: HoursComponent;
|
||||
let fixture: ComponentFixture<HoursComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [HoursComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(HoursComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,12 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-hours',
|
||||
templateUrl: './hours.component.html',
|
||||
styleUrls: ['./hours.component.scss'],
|
||||
})
|
||||
export class HoursComponent implements OnInit {
|
||||
constructor() {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<p>option-link works!</p>
|
@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { OptionLinkComponent } from './option-link.component';
|
||||
|
||||
describe('OptionLinkComponent', () => {
|
||||
let component: OptionLinkComponent;
|
||||
let fixture: ComponentFixture<OptionLinkComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [OptionLinkComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(OptionLinkComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,12 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-option-link',
|
||||
templateUrl: './option-link.component.html',
|
||||
styleUrls: ['./option-link.component.scss'],
|
||||
})
|
||||
export class OptionLinkComponent implements OnInit {
|
||||
constructor() {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
}
|
@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
<div class="columns">
|
||||
<h2 class="title is-2">
|
||||
Voici le résumé de votre sondage
|
||||
</h2>
|
||||
<p class="helper">
|
||||
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 suivante.
|
||||
<br />
|
||||
Mais rassurez-vous, vous n’aurez pas à tout remplir à nouveau.
|
||||
</p>
|
||||
<div class="resume">
|
||||
<h3 class="title is-3">Mes informations générales</h3>
|
||||
<h3 class="title is-3">Mon type de sondage</h3>
|
||||
<h3 class="title is-3">Mes dates et horaires</h3>
|
||||
<h3 class="title is-3">Mes paramètres et options de notifications</h3>
|
||||
<h3 class="title is-3">Mon nom et mon adresse e-mail</h3>
|
||||
</div>
|
||||
<div class="column">
|
||||
<button class="button is-secondary is-fullwidth" [routerLink]="['/administration/step/3']">
|
||||
précédent
|
||||
</button>
|
||||
</div>
|
||||
<div class="column">
|
||||
<button class="btn is-primary is-fullwidth" (click)="createPoll()" [disabled]="!pollService.form.valid">
|
||||
<i class="fa fa-save"></i>
|
||||
Enregistrer le sondage
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
@ -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<StepSevenComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [StepSevenComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(StepSevenComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -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);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<p>step-six works!</p>
|
@ -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<StepSixComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [StepSixComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(StepSixComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -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 {}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<p>text-list works!</p>
|
@ -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<TextListComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [TextListComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TextListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -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 {}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<div>
|
||||
<h2 class="title is-2">
|
||||
[nom créateur] vous invite à participer à son sondage
|
||||
</h2>
|
||||
<div>
|
||||
<div class="badge creator">
|
||||
Nom du créateur
|
||||
</div>
|
||||
<h3 class="title is-3">
|
||||
Quand pour le resto ?
|
||||
</h3>
|
||||
<p class="description">
|
||||
Si l’administrateur du sondage a ajouter une description elle sera affiché ici.
|
||||
</p>
|
||||
<p class="date-end-box">
|
||||
Fin du sondage le
|
||||
<strong class="date-end">
|
||||
14/11/2021
|
||||
</strong>
|
||||
</p>
|
||||
<button
|
||||
class="button is-primary"
|
||||
[routerLink]="['consultation/' + pollService._poll.getValue().custom_url + '/simple']"
|
||||
>
|
||||
Je donne mes disponibilités
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
@ -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<ConsultationLandingComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ConsultationLandingComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ConsultationLandingComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -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 {}
|
||||
}
|
@ -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)],
|
||||
|
@ -0,0 +1,26 @@
|
||||
<div class="user-infos">
|
||||
<h2 class="title is-2">
|
||||
Dites à l’organisateur et aux autres participants qui vous êtes !
|
||||
</h2>
|
||||
<label for="name">
|
||||
Votre nom (obligatoire)
|
||||
</label>
|
||||
<input class="input" type="text" id="name" />
|
||||
<label for="email">
|
||||
Votre adresse e-mail (obligatoire)
|
||||
</label>
|
||||
<input class="input" type="text" id="email" />
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<button class="button is-default" [routerLink]="['']">
|
||||
Précédent
|
||||
</button>
|
||||
</div>
|
||||
<div class="column">
|
||||
<button class="button is-success" [routerLink]="['']">
|
||||
Je participe
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -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<ConsultationUserComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ConsultationUserComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ConsultationUserComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -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 {}
|
||||
}
|
@ -11,6 +11,9 @@ 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';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -19,6 +22,9 @@ import { CoreModule } from '../../core/core.module';
|
||||
PollResultsDetailedComponent,
|
||||
ChoiceButtonComponent,
|
||||
PasswordPromptComponent,
|
||||
ConsultationLandingComponent,
|
||||
ConsultationUserComponent,
|
||||
SuccessComponent,
|
||||
],
|
||||
imports: [CommonModule, ConsultationRoutingModule, SharedModule, TranslateModule.forChild({ extend: true })],
|
||||
})
|
||||
|
18
src/app/features/consultation/success/success.component.html
Normal file
18
src/app/features/consultation/success/success.component.html
Normal file
@ -0,0 +1,18 @@
|
||||
<div class="success">
|
||||
<h2 class="title is-2">
|
||||
Votre participation a bien été prise en compte !
|
||||
</h2>
|
||||
<p class="conclusion">
|
||||
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 ».
|
||||
</p>
|
||||
<button
|
||||
class="button is-primary"
|
||||
[routerLink]="['consultation/' + pollService._poll.getValue().custom_url + '/simple']"
|
||||
>
|
||||
Voir le sondage
|
||||
</button>
|
||||
<button class="button is-primary" [routerLink]="['/']">
|
||||
Aller à l’acceuil
|
||||
</button>
|
||||
</div>
|
@ -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<SuccessComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [SuccessComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SuccessComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
13
src/app/features/consultation/success/success.component.ts
Normal file
13
src/app/features/consultation/success/success.component.ts
Normal file
@ -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 {}
|
||||
}
|
Loading…
Reference in New Issue
Block a user