From 2d060f99055acb3d5251b1afde70abc786768f51 Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Thu, 3 Oct 2019 11:48:13 +0200 Subject: [PATCH] =?UTF-8?q?:zap:=20date=20en=20fran=C3=A7ais=20dans=20le?= =?UTF-8?q?=20choix=20de=20vote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.module.ts | 98 +++++++++---------- src/app/config/Routes.ts | 2 + .../vote-choice/vote-choice.component.html | 11 ++- 3 files changed, 58 insertions(+), 53 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 50301b68..8da4e668 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,5 +1,5 @@ import {BrowserModule} from '@angular/platform-browser'; -import {NgModule} from '@angular/core'; +import {LOCALE_ID, NgModule} from '@angular/core'; import {AppRoutingModule} from './app-routing.module'; import {AppComponent} from './app.component'; @@ -10,61 +10,59 @@ import {FormsModule} from '@angular/forms'; import {NavigationComponent} from './ui/navigation/navigation.component'; import {RouterModule} from '@angular/router'; import {Routes} from './config/Routes'; -import {CommonModule} from '@angular/common'; -import { DatesComponent } from './pages/dates/dates.component'; -import { DebuggerComponent } from './debugger/debugger.component'; -import { VisibilityComponent } from './pages/visibility/visibility.component'; -import { ResumeComponent } from './pages/resume/resume.component'; -import { PicturesComponent } from './pages/pictures/pictures.component'; -import { AnswersComponent } from './pages/answers/answers.component'; -import { EndConfirmationComponent } from './pages/end-confirmation/end-confirmation.component'; -import { CreateOrRetrieveComponent } from './pages/create-or-retrieve/create-or-retrieve.component'; -import { CalendarComponent } from './calendar/calendar.component'; - -import { registerLocaleData } from '@angular/common'; +import {CommonModule, registerLocaleData} from '@angular/common'; +import {DatesComponent} from './pages/dates/dates.component'; +import {DebuggerComponent} from './debugger/debugger.component'; +import {VisibilityComponent} from './pages/visibility/visibility.component'; +import {ResumeComponent} from './pages/resume/resume.component'; +import {PicturesComponent} from './pages/pictures/pictures.component'; +import {AnswersComponent} from './pages/answers/answers.component'; +import {EndConfirmationComponent} from './pages/end-confirmation/end-confirmation.component'; +import {CreateOrRetrieveComponent} from './pages/create-or-retrieve/create-or-retrieve.component'; +import {CalendarComponent} from './calendar/calendar.component'; import localeFr from '@angular/common/locales/fr'; -import { VotingSummaryComponent } from './pages/voting-summary/voting-summary.component'; -import { VotingGraphComponent } from './pages/voting-graph/voting-graph.component'; -import { VotingChoiceComponent } from './pages/voting-choice/voting-choice.component'; -import { PasswordComponent } from './pages/password/password.component'; -import { HomeComponent } from './pages/home/home.component'; -import { VoteChoiceComponent } from './vote-choice/vote-choice.component'; +import {VotingSummaryComponent} from './pages/voting-summary/voting-summary.component'; +import {VotingGraphComponent} from './pages/voting-graph/voting-graph.component'; +import {VotingChoiceComponent} from './pages/voting-choice/voting-choice.component'; +import {PasswordComponent} from './pages/password/password.component'; +import {HomeComponent} from './pages/home/home.component'; +import {VoteChoiceComponent} from './vote-choice/vote-choice.component'; registerLocaleData(localeFr, 'fr'); @NgModule({ - declarations: [ - AppComponent, - BaseComponent, - KindComponent, - HeaderComponent, - NavigationComponent, - DatesComponent, - DebuggerComponent, - VisibilityComponent, - ResumeComponent, - PicturesComponent, - AnswersComponent, - EndConfirmationComponent, - CreateOrRetrieveComponent, - CalendarComponent, - VotingSummaryComponent, - VotingGraphComponent, - VotingChoiceComponent, - PasswordComponent, - HomeComponent, - VoteChoiceComponent, + declarations: [ + AppComponent, + BaseComponent, + KindComponent, + HeaderComponent, + NavigationComponent, + DatesComponent, + DebuggerComponent, + VisibilityComponent, + ResumeComponent, + PicturesComponent, + AnswersComponent, + EndConfirmationComponent, + CreateOrRetrieveComponent, + CalendarComponent, + VotingSummaryComponent, + VotingGraphComponent, + VotingChoiceComponent, + PasswordComponent, + HomeComponent, + VoteChoiceComponent, - ], - imports: [ - CommonModule, - BrowserModule, - AppRoutingModule, - FormsModule, - RouterModule.forRoot(Routes) - ], - providers: [], - bootstrap: [AppComponent] + ], + imports: [ + CommonModule, + BrowserModule, + AppRoutingModule, + FormsModule, + RouterModule.forRoot(Routes) + ], + providers: [{provide: LOCALE_ID, useValue: "fr-FR"}], + bootstrap: [AppComponent] }) export class AppModule { } diff --git a/src/app/config/Routes.ts b/src/app/config/Routes.ts index 90a969ce..72ef5a8c 100644 --- a/src/app/config/Routes.ts +++ b/src/app/config/Routes.ts @@ -8,6 +8,7 @@ import {AnswersComponent} from '../pages/answers/answers.component'; import {CreateOrRetrieveComponent} from '../pages/create-or-retrieve/create-or-retrieve.component'; import {BaseComponent} from '../pages/base-page/base.component'; import {HomeComponent} from "../pages/home/home.component"; +import {VoteChoiceComponent} from "../vote-choice/vote-choice.component"; /** * each step in the form is a component @@ -25,5 +26,6 @@ export const Routes = {path: 'step/visibility', component: VisibilityComponent}, {path: 'step/resume', component: ResumeComponent}, {path: 'step/end', component: EndConfirmationComponent}, + {path: 'votechoice', component: VoteChoiceComponent}, ] ; diff --git a/src/app/vote-choice/vote-choice.component.html b/src/app/vote-choice/vote-choice.component.html index ef5aae72..09332c47 100644 --- a/src/app/vote-choice/vote-choice.component.html +++ b/src/app/vote-choice/vote-choice.component.html @@ -2,12 +2,17 @@
- {{choice.date | date:'Y-m-d'}} + {{choice.date | date:'EEEE'}} +
+
+ {{choice.date | date:'dd'}} +
+
+ {{choice.date | date:'LLLL'}}
- {{choice.date | date:'H:i:s'}} + {{choice.date | date:'H:m'}}
-
{{choice.text}}