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 { KeyboardShortcutsModule } from 'ng-keyboard-shortcuts';
|
||||
import { AdministrationModule } from './features/administration/administration.module';
|
||||
import { EditComponent } from './consultation/edit/edit.component';
|
||||
|
||||
// register languages files for translation
|
||||
// import localeEn from '@angular/common/locales/en';
|
||||
@ -50,7 +51,7 @@ export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent, CguComponent, LegalComponent, PrivacyComponent, CipheringComponent],
|
||||
declarations: [AppComponent, CguComponent, LegalComponent, PrivacyComponent, CipheringComponent, EditComponent],
|
||||
imports: [
|
||||
AppRoutingModule,
|
||||
AdministrationModule,
|
||||
|
@ -81,6 +81,6 @@ import { DialogModule } from 'primeng/dialog';
|
||||
ConfirmDialogModule,
|
||||
DialogModule,
|
||||
],
|
||||
exports: [ActionsMenuComponent],
|
||||
exports: [ActionsMenuComponent, StepperComponent, NavStepsComponent],
|
||||
})
|
||||
export class AdministrationModule {}
|
||||
|
@ -8,6 +8,7 @@ import { ConsultationLandingComponent } from './consultation-landing/consultatio
|
||||
import { SuccessComponent } from './success/success.component';
|
||||
import { ConsultationUserComponent } from './consultation-user/consultation-user.component';
|
||||
import { PageNotFoundComponent } from '../../shared/components/page-not-found/page-not-found.component';
|
||||
import { EditComponent } from './edit/edit.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
@ -19,6 +20,8 @@ const routes: Routes = [
|
||||
{ path: 'prompt', component: PasswordPromptComponent },
|
||||
{ path: 'table', component: WipTodoComponent },
|
||||
{ path: 'user-info', component: ConsultationUserComponent },
|
||||
{ path: 'vote', component: EditComponent },
|
||||
{ path: 'edit/:voteStackId', component: EditComponent },
|
||||
{ path: 'success', component: SuccessComponent },
|
||||
{ path: 'page-not-found', component: PageNotFoundComponent },
|
||||
{ path: '**', redirectTo: 'page-not-found', pathMatch: 'full' },
|
||||
|
@ -1,3 +1,5 @@
|
||||
<app-stepper [step_current]="4" [step_max]="pollService.step_max"></app-stepper>
|
||||
<div class="step">
|
||||
<div class="user-infos">
|
||||
<h2 class="title is-2">
|
||||
Dites à l’organisateur et aux autres participants qui vous êtes !
|
||||
@ -24,3 +26,5 @@
|
||||
</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 { 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({
|
||||
selector: 'app-consultation-user',
|
||||
@ -7,7 +12,17 @@ import { PollService } from '../../../core/services/poll.service';
|
||||
styleUrls: ['./consultation-user.component.scss'],
|
||||
})
|
||||
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 {}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import { ConsultationLandingComponent } from './consultation-landing/consultatio
|
||||
import { ConsultationUserComponent } from './consultation-user/consultation-user.component';
|
||||
import { SuccessComponent } from './success/success.component';
|
||||
import { AdministrationModule } from '../administration/administration.module';
|
||||
import { EditComponent } from './edit/edit.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@ -26,6 +27,7 @@ import { AdministrationModule } from '../administration/administration.module';
|
||||
ConsultationLandingComponent,
|
||||
ConsultationUserComponent,
|
||||
SuccessComponent,
|
||||
EditComponent,
|
||||
],
|
||||
imports: [
|
||||
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