Skip to content

Commit

Permalink
Fixed locale always set to French
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Rusakov committed Dec 9, 2024
1 parent 32a11e1 commit 1c18df8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/account/new-order/new-order.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- TODO: Create proper layout so navigation buttons will be always in the bottom -->
<mat-horizontal-stepper #stepper [linear]="true">
<mat-step [stepControl]="orderFormGroup" i18n-label label="Détails du mandat">
<form [formGroup]="orderFormGroup">
Expand Down Expand Up @@ -63,7 +64,6 @@
</mat-step>

<mat-step [stepControl]="contactFormGroup" i18n-label label="Facturation / Tiers">

<form class="form-no-full-height" [formGroup]="addressChoiceForm">
<mat-radio-group *ngIf="IsOrderTypePrivate" class="flex-column"
formControlName="addressChoice"
Expand Down
2 changes: 1 addition & 1 deletion src/app/account/new-order/new-order.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

&.form-height-mini {
height: calc(100vh - 64px - 72px - 41px - 24px);
height: calc(100vh - 64px - 72px - 41px - 48px);
}

.mat-mdc-form-field {
Expand Down
2 changes: 1 addition & 1 deletion src/app/account/orders/order/order.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, ComponentFactoryResolver, EventEmitter, Input, OnInit, Output, QueryList, ViewChild, ViewChildren} from '@angular/core';
import {Component, ComponentFactoryResolver, EventEmitter, Inject, Input, LOCALE_ID, OnInit, Output, QueryList, ViewChild, ViewChildren} from '@angular/core';
import {IOrderDowloadLink, IOrderSummary, Order} from '../../../_models/IOrder';
import {IProduct} from '../../../_models/IProduct';
import Map from 'ol/Map';
Expand Down
14 changes: 7 additions & 7 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {BrowserModule} from '@angular/platform-browser';
import { NgModule, APP_INITIALIZER, LOCALE_ID, DEFAULT_CURRENCY_CODE, Inject } from '@angular/core';
import { NgModule, APP_INITIALIZER, DEFAULT_CURRENCY_CODE, Inject } from '@angular/core';
import { registerLocaleData } from '@angular/common';
import localeCH from '@angular/common/locales/fr-CH';
import frCH from '@angular/common/locales/fr-CH';
import deCH from '@angular/common/locales/de-CH';
import enCH from '@angular/common/locales/en-CH';

import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
Expand Down Expand Up @@ -36,7 +38,9 @@ import {CommonModule} from '@angular/common';
import { OidcAuthConfigModule } from './auth/oidc-auth-config.module';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';

registerLocaleData(localeCH);
registerLocaleData(frCH);
registerLocaleData(deCH);
registerLocaleData(enCH);

export function initializeApp(configService: ConfigService, store: Store<AppState>) {
return () => configService.load().then(() => {
Expand Down Expand Up @@ -91,10 +95,6 @@ const MODULES = [
useClass: ErrorInterceptor,
multi: true,
},
{
provide: LOCALE_ID,
useValue: 'fr-CH'
},
{
provide: DEFAULT_CURRENCY_CODE,
useValue: 'CHF'
Expand Down

0 comments on commit 1c18df8

Please # to comment.