From 0fde7103d729b85e609cfe3c8efb6a98495f2410 Mon Sep 17 00:00:00 2001 From: Andrey Rusakov Date: Wed, 27 Nov 2024 15:34:59 +0100 Subject: [PATCH] Make tariff and condition links configurable --- .../help-overlay/help-overlay.component.html | 12 +++++++++++ .../help-overlay/help-overlay.component.ts | 6 ++++++ src/app/_models/IConfig.ts | 6 +++++- src/assets/configs/config.json.tmpl | 4 ++++ src/locale/messages.xlf | 20 ++++++++++++++++--- 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/src/app/_components/help-overlay/help-overlay.component.html b/src/app/_components/help-overlay/help-overlay.component.html index c67b9eb8..189b7a78 100644 --- a/src/app/_components/help-overlay/help-overlay.component.html +++ b/src/app/_components/help-overlay/help-overlay.component.html @@ -6,6 +6,18 @@ + +
+ Informations sur la tarification +
+
+ + +
+ Conditions d'utilisation +
+
+
diff --git a/src/app/_components/help-overlay/help-overlay.component.ts b/src/app/_components/help-overlay/help-overlay.component.ts index 414fcb47..58e9c2ce 100644 --- a/src/app/_components/help-overlay/help-overlay.component.ts +++ b/src/app/_components/help-overlay/help-overlay.component.ts @@ -10,6 +10,8 @@ export class HelpOverlayComponent implements OnInit { @HostBinding('class') class = 'overlay-container'; + tariffsUrl: string; + conditionsUrl: string; phoneLabel: string; phoneNumber: string; email: string; @@ -18,9 +20,13 @@ export class HelpOverlayComponent implements OnInit { this.phoneLabel = configService.config?.contact.phone.label || ''; this.phoneNumber = configService.config?.contact.phone.number || ''; this.email = configService.config?.contact.email || ''; + this.conditionsUrl = configService.config?.contact.links.conditions || ''; + this.tariffsUrl = configService.config?.contact.links.tariffs || ''; } ngOnInit(): void { } + + } diff --git a/src/app/_models/IConfig.ts b/src/app/_models/IConfig.ts index afd83cd3..f4a577d0 100644 --- a/src/app/_models/IConfig.ts +++ b/src/app/_models/IConfig.ts @@ -16,7 +16,11 @@ export interface IConfig { baseMapUrl: string; geocoderUrl: string; geocoderLayers: string[]; - contact: { phone: { label: string; number: string }; email: string; }; + contact: { + links: {conditions: string; tariffs:string;}; + phone: { label: string; number: string }; + email: string; + }; basemaps: Array; initialCenter: number[]; initialExtent: number[]; diff --git a/src/assets/configs/config.json.tmpl b/src/assets/configs/config.json.tmpl index e5340ba1..58ae0437 100644 --- a/src/assets/configs/config.json.tmpl +++ b/src/assets/configs/config.json.tmpl @@ -13,6 +13,10 @@ "label": "", "number": "" }, + "links": { + "conditions": "http://conditions", + "tariffs": "http://tariffs" + }, "email": "info@geogr.ch" }, "initialCenter": [ diff --git a/src/locale/messages.xlf b/src/locale/messages.xlf index 02c9982d..5ae98017 100644 --- a/src/locale/messages.xlf +++ b/src/locale/messages.xlf @@ -109,18 +109,32 @@ 5 + + Informations sur la tarification + + src/app/_components/help-overlay/help-overlay.component.html + 10,12 + + + + Conditions d'utilisation + + src/app/_components/help-overlay/help-overlay.component.html + 16,18 + + Avez-vous des questions ? src/app/_components/help-overlay/help-overlay.component.html - 12 + 24 phone src/app/_components/help-overlay/help-overlay.component.html - 16 + 28 src/app/account/profile/profile.component.html @@ -135,7 +149,7 @@ email src/app/_components/help-overlay/help-overlay.component.html - 23 + 35 src/app/account/profile/profile.component.html