diff --git a/src/app/account/new-order/new-order.component.html b/src/app/account/new-order/new-order.component.html index b4130eb..45e1712 100644 --- a/src/app/account/new-order/new-order.component.html +++ b/src/app/account/new-order/new-order.component.html @@ -225,12 +225,8 @@ Pays - - Suisse - - - France - + {{COUNTRIES.CH.name}} + {{COUNTRIES.FR.name}} diff --git a/src/app/account/new-order/new-order.component.ts b/src/app/account/new-order/new-order.component.ts index a13354c..e6f4109 100644 --- a/src/app/account/new-order/new-order.component.ts +++ b/src/app/account/new-order/new-order.component.ts @@ -43,6 +43,7 @@ export class NewOrderComponent implements OnInit, OnDestroy { readonly NEXT = ConstantsService.NEXT; readonly PREVIOUS = ConstantsService.PREVIOUS; readonly BACK: string = $localize`Réinitialiser`; + readonly COUNTRIES = ConstantsService.COUNTRIES; orderFormGroup: UntypedFormGroup; @@ -371,7 +372,7 @@ export class NewOrderComponent implements OnInit, OnDestroy { this.updateContactForm('2'); for (const key in this.invoiceContactsFormControls) { if (key === 'country') { - this.contactFormGroup.get(key)?.setValue($localize`Suisse`); + this.contactFormGroup.get(key)?.setValue(this.COUNTRIES.CH.name); } else { this.contactFormGroup.get(key)?.setValue(''); } diff --git a/src/app/constants.service.ts b/src/app/constants.service.ts index 9b4ef3e..b4953f6 100644 --- a/src/app/constants.service.ts +++ b/src/app/constants.service.ts @@ -37,4 +37,13 @@ export class ConstantsService { PUBLIC: $localize `:@@order.public:Public`, PRIVATE: $localize `:@@order.private:Privé` } + + static COUNTRIES = { + CH: { + name: $localize`@@country.ch.name:Suisse` + }, + FR: { + name: $localize`@@country.fr.name:France` + } + }; }