mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
add components for consultation
This commit is contained in:
parent
b69e48fbe9
commit
9016b6d699
@ -29,6 +29,7 @@ import { CipheringComponent } from './features/shared/components/ui/static-pages
|
|||||||
import { ErrorsListComponent } from './features/shared/components/ui/form/errors-list/errors-list.component';
|
import { ErrorsListComponent } from './features/shared/components/ui/form/errors-list/errors-list.component';
|
||||||
import { KeyboardShortcutsModule } from 'ng-keyboard-shortcuts';
|
import { KeyboardShortcutsModule } from 'ng-keyboard-shortcuts';
|
||||||
import { AdministrationModule } from './features/administration/administration.module';
|
import { AdministrationModule } from './features/administration/administration.module';
|
||||||
|
import { EditComponent } from './consultation/edit/edit.component';
|
||||||
|
|
||||||
// register languages files for translation
|
// register languages files for translation
|
||||||
// import localeEn from '@angular/common/locales/en';
|
// import localeEn from '@angular/common/locales/en';
|
||||||
@ -50,7 +51,7 @@ export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent, CguComponent, LegalComponent, PrivacyComponent, CipheringComponent],
|
declarations: [AppComponent, CguComponent, LegalComponent, PrivacyComponent, CipheringComponent, EditComponent],
|
||||||
imports: [
|
imports: [
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
AdministrationModule,
|
AdministrationModule,
|
||||||
|
@ -81,6 +81,6 @@ import { DialogModule } from 'primeng/dialog';
|
|||||||
ConfirmDialogModule,
|
ConfirmDialogModule,
|
||||||
DialogModule,
|
DialogModule,
|
||||||
],
|
],
|
||||||
exports: [ActionsMenuComponent],
|
exports: [ActionsMenuComponent, StepperComponent, NavStepsComponent],
|
||||||
})
|
})
|
||||||
export class AdministrationModule {}
|
export class AdministrationModule {}
|
||||||
|
@ -8,6 +8,7 @@ import { ConsultationLandingComponent } from './consultation-landing/consultatio
|
|||||||
import { SuccessComponent } from './success/success.component';
|
import { SuccessComponent } from './success/success.component';
|
||||||
import { ConsultationUserComponent } from './consultation-user/consultation-user.component';
|
import { ConsultationUserComponent } from './consultation-user/consultation-user.component';
|
||||||
import { PageNotFoundComponent } from '../../shared/components/page-not-found/page-not-found.component';
|
import { PageNotFoundComponent } from '../../shared/components/page-not-found/page-not-found.component';
|
||||||
|
import { EditComponent } from './edit/edit.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
@ -19,6 +20,8 @@ const routes: Routes = [
|
|||||||
{ path: 'prompt', component: PasswordPromptComponent },
|
{ path: 'prompt', component: PasswordPromptComponent },
|
||||||
{ path: 'table', component: WipTodoComponent },
|
{ path: 'table', component: WipTodoComponent },
|
||||||
{ path: 'user-info', component: ConsultationUserComponent },
|
{ path: 'user-info', component: ConsultationUserComponent },
|
||||||
|
{ path: 'vote', component: EditComponent },
|
||||||
|
{ path: 'edit/:voteStackId', component: EditComponent },
|
||||||
{ path: 'success', component: SuccessComponent },
|
{ path: 'success', component: SuccessComponent },
|
||||||
{ path: 'page-not-found', component: PageNotFoundComponent },
|
{ path: 'page-not-found', component: PageNotFoundComponent },
|
||||||
{ path: '**', redirectTo: 'page-not-found', pathMatch: 'full' },
|
{ path: '**', redirectTo: 'page-not-found', pathMatch: 'full' },
|
||||||
|
@ -1,26 +1,30 @@
|
|||||||
<div class="user-infos">
|
<app-stepper [step_current]="4" [step_max]="pollService.step_max"></app-stepper>
|
||||||
<h2 class="title is-2">
|
<div class="step">
|
||||||
Dites à l’organisateur et aux autres participants qui vous êtes !
|
<div class="user-infos">
|
||||||
</h2>
|
<h2 class="title is-2">
|
||||||
<label for="name">
|
Dites à l’organisateur et aux autres participants qui vous êtes !
|
||||||
Votre nom (obligatoire)
|
</h2>
|
||||||
</label>
|
<label for="name">
|
||||||
<input class="input" type="text" id="name" />
|
Votre nom (obligatoire)
|
||||||
<label for="email">
|
</label>
|
||||||
Votre adresse e-mail (obligatoire)
|
<input class="input" type="text" id="name" />
|
||||||
</label>
|
<label for="email">
|
||||||
<input class="input" type="text" id="email" />
|
Votre adresse e-mail (obligatoire)
|
||||||
|
</label>
|
||||||
|
<input class="input" type="text" id="email" />
|
||||||
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<button class="button is-default" [routerLink]="['']">
|
<button class="button is-default" [routerLink]="['']">
|
||||||
Précédent
|
Précédent
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<button class="button is-success" [routerLink]="['']">
|
<button class="button is-success" [routerLink]="['']">
|
||||||
Je participe
|
Je participe
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<app-nav-steps [next_step_number]="2" [previous_step_number]="0"></app-nav-steps>
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core';
|
||||||
import { PollService } from '../../../core/services/poll.service';
|
import { PollService } from '../../../core/services/poll.service';
|
||||||
|
import { DateUtilitiesService } from '../../../core/services/date.utilities.service';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { ToastService } from '../../../core/services/toast.service';
|
||||||
|
import { DOCUMENT } from '@angular/common';
|
||||||
|
import { StorageService } from '../../../core/services/storage.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-consultation-user',
|
selector: 'app-consultation-user',
|
||||||
@ -7,7 +12,17 @@ import { PollService } from '../../../core/services/poll.service';
|
|||||||
styleUrls: ['./consultation-user.component.scss'],
|
styleUrls: ['./consultation-user.component.scss'],
|
||||||
})
|
})
|
||||||
export class ConsultationUserComponent implements OnInit {
|
export class ConsultationUserComponent implements OnInit {
|
||||||
constructor(public pollService: PollService) {}
|
constructor(
|
||||||
|
private dateUtilitiesService: DateUtilitiesService,
|
||||||
|
private router: Router,
|
||||||
|
private toastService: ToastService,
|
||||||
|
private cd: ChangeDetectorRef,
|
||||||
|
@Inject(DOCUMENT) private document: any,
|
||||||
|
private storageService: StorageService,
|
||||||
|
public pollService: PollService
|
||||||
|
) {
|
||||||
|
this.pollService.step_current = 4;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import { ConsultationLandingComponent } from './consultation-landing/consultatio
|
|||||||
import { ConsultationUserComponent } from './consultation-user/consultation-user.component';
|
import { ConsultationUserComponent } from './consultation-user/consultation-user.component';
|
||||||
import { SuccessComponent } from './success/success.component';
|
import { SuccessComponent } from './success/success.component';
|
||||||
import { AdministrationModule } from '../administration/administration.module';
|
import { AdministrationModule } from '../administration/administration.module';
|
||||||
|
import { EditComponent } from './edit/edit.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@ -26,6 +27,7 @@ import { AdministrationModule } from '../administration/administration.module';
|
|||||||
ConsultationLandingComponent,
|
ConsultationLandingComponent,
|
||||||
ConsultationUserComponent,
|
ConsultationUserComponent,
|
||||||
SuccessComponent,
|
SuccessComponent,
|
||||||
|
EditComponent,
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
11
src/app/features/consultation/edit/edit.component.html
Normal file
11
src/app/features/consultation/edit/edit.component.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<app-stepper [step_current]="4" [step_max]="pollService.step_max"></app-stepper>
|
||||||
|
<div class="step">
|
||||||
|
<h3 class="title is-3">
|
||||||
|
{{ 'participation.voting_title' | translate }}
|
||||||
|
</h3>
|
||||||
|
<div class="date-choices" *ngIf="pollService.poll.kind == 'date'">
|
||||||
|
<div class="box" *ngFor="let group of poll.choices_grouped"></div>
|
||||||
|
</div>
|
||||||
|
<div class="rounded-block"></div>
|
||||||
|
</div>
|
||||||
|
<app-nav-steps [next_step_number]="2" [previous_step_number]="0"></app-nav-steps>
|
24
src/app/features/consultation/edit/edit.component.spec.ts
Normal file
24
src/app/features/consultation/edit/edit.component.spec.ts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { EditComponent } from './edit.component';
|
||||||
|
|
||||||
|
describe('EditComponent', () => {
|
||||||
|
let component: EditComponent;
|
||||||
|
let fixture: ComponentFixture<EditComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [EditComponent],
|
||||||
|
}).compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(EditComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
28
src/app/features/consultation/edit/edit.component.ts
Normal file
28
src/app/features/consultation/edit/edit.component.ts
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core';
|
||||||
|
import { DateUtilitiesService } from '../../../core/services/date.utilities.service';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { ToastService } from '../../../core/services/toast.service';
|
||||||
|
import { DOCUMENT } from '@angular/common';
|
||||||
|
import { StorageService } from '../../../core/services/storage.service';
|
||||||
|
import { PollService } from '../../../core/services/poll.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-edit',
|
||||||
|
templateUrl: './edit.component.html',
|
||||||
|
styleUrls: ['./edit.component.scss'],
|
||||||
|
})
|
||||||
|
export class EditComponent implements OnInit {
|
||||||
|
constructor(
|
||||||
|
private dateUtilitiesService: DateUtilitiesService,
|
||||||
|
private router: Router,
|
||||||
|
private toastService: ToastService,
|
||||||
|
private cd: ChangeDetectorRef,
|
||||||
|
@Inject(DOCUMENT) private document: any,
|
||||||
|
private storageService: StorageService,
|
||||||
|
public pollService: PollService
|
||||||
|
) {
|
||||||
|
this.pollService.step_current = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {}
|
||||||
|
}
|
3
src/assets/i18n/hu.json
Normal file
3
src/assets/i18n/hu.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user