Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make tariff and condition links configurable #64

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/app/_components/help-overlay/help-overlay.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@
</div>
</a>

<a *ngIf="tariffsUrl" color="primary" mat-button href="{{tariffsUrl}}" target="_blank">
<div class="flex-row" i18n>
Informations sur la tarification
</div>
</a>

<a *ngIf="conditionsUrl" color="primary" mat-button href="{{conditionsUrl}}" target="_blank">
<div class="flex-row" i18n>
Conditions d'utilisation
</div>
</a>

<!-- TODO: add links to the pricing document -->
<!-- TODO: add links to the usage conditions -->
<hr>
Expand Down
6 changes: 6 additions & 0 deletions src/app/_components/help-overlay/help-overlay.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export class HelpOverlayComponent implements OnInit {

@HostBinding('class') class = 'overlay-container';

tariffsUrl: string;
conditionsUrl: string;
phoneLabel: string;
phoneNumber: string;
email: string;
Expand All @@ -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 {
}



}
6 changes: 5 additions & 1 deletion src/app/_models/IConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<IBasemap>;
initialCenter: number[];
initialExtent: number[];
Expand Down
4 changes: 4 additions & 0 deletions src/assets/configs/config.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"label": "",
"number": ""
},
"links": {
"conditions": "http://conditions",
"tariffs": "http://tariffs"
},
"email": "[email protected]"
},
"initialCenter": [
Expand Down
20 changes: 17 additions & 3 deletions src/locale/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,32 @@
<context context-type="linenumber">5</context>
</context-group>
</trans-unit>
<trans-unit id="d64327efbdd0f8653d689489ea4b486c7cb5d8b0" datatype="html">
<source> Informations sur la tarification </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/_components/help-overlay/help-overlay.component.html</context>
<context context-type="linenumber">10,12</context>
</context-group>
</trans-unit>
<trans-unit id="42da761136b351118ec563cfb5d4a5a53aa6348f" datatype="html">
<source> Conditions d&apos;utilisation </source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/_components/help-overlay/help-overlay.component.html</context>
<context context-type="linenumber">16,18</context>
</context-group>
</trans-unit>
<trans-unit id="b6b06490c915e07bc8ba7c88177574efa714af32" datatype="html">
<source>Avez-vous des questions ?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/_components/help-overlay/help-overlay.component.html</context>
<context context-type="linenumber">12</context>
<context context-type="linenumber">24</context>
</context-group>
</trans-unit>
<trans-unit id="main.phone" datatype="html">
<source>phone</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/_components/help-overlay/help-overlay.component.html</context>
<context context-type="linenumber">16</context>
<context context-type="linenumber">28</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/account/profile/profile.component.html</context>
Expand All @@ -135,7 +149,7 @@
<source>email</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/_components/help-overlay/help-overlay.component.html</context>
<context context-type="linenumber">23</context>
<context context-type="linenumber">35</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/account/profile/profile.component.html</context>
Expand Down