From 23fb1c9a6a3b7a001d7cc312a9a29462d428c611 Mon Sep 17 00:00:00 2001 From: Antony MARION Date: Wed, 13 Nov 2024 10:28:52 +0100 Subject: [PATCH] feat(web): add guide link for eligibility ref: MANAGER-15875 Signed-off-by: Antony MARION --- .../contact/dashboard/dashboard.constants.js | 38 +++++++++++++++++++ .../contact/dashboard/dashboard.controller.js | 3 ++ .../domain/contact/dashboard/dashboard.html | 25 +++++++++--- .../contact/translations/Messages_fr_FR.json | 2 + 4 files changed, 63 insertions(+), 5 deletions(-) diff --git a/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.constants.js b/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.constants.js index 1112db178acc..07812fa36c57 100644 --- a/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.constants.js +++ b/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.constants.js @@ -50,10 +50,48 @@ export const INFO_PROPERTIES_ARRAY = [ }, ]; +export const GUIDE_URLS = { + AU: + 'https://help.ovhcloud.com/csm/en-au-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042979', + DE: + 'https://help.ovhcloud.com/csm/de-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042983', + GB: + 'https://help.ovhcloud.com/csm/en-gb-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042993', + CA: + 'https://help.ovhcloud.com/csm/en-ca-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042991', + IE: + 'https://help.ovhcloud.com/csm/en-ie-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042992', + SG: + 'https://help.ovhcloud.com/csm/en-sg-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042996', + ES: + 'https://help.ovhcloud.com/csm/es-es-account-manage-contacts?id=kb_article_view&sysparm_article=KB0043001', + QC: + 'https://help.ovhcloud.com/csm/fr-ca-account-manage-contacts?id=kb_article_view&sysparm_article=KB0043000', + FR: + 'https://help.ovhcloud.com/csm/fr-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042989', + MA: + 'https://help.ovhcloud.com/csm/fr-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042989', + SN: + 'https://help.ovhcloud.com/csm/fr-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042989', + TN: + 'https://help.ovhcloud.com/csm/fr-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042989', + IT: + 'https://help.ovhcloud.com/csm/it-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042994', + PL: + 'https://help.ovhcloud.com/csm/pl-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042997', + PT: + 'https://help.ovhcloud.com/csm/pt-account-manage-contacts?id=kb_article_view&sysparm_article=KB0043004', + IN: + 'https://help.ovhcloud.com/csm/asia-account-manage-contacts?id=kb_article_view&sysparm_article=KB0029947', + DEFAULT: + 'https://help.ovhcloud.com/csm/en-account-manage-contacts?id=kb_article_view&sysparm_article=KB0042986', +}; + export const LEGAL_FORM_INDIVIDUAL = 'individual'; export default { INFO_PROPERTIES, LEGAL_FORM_INDIVIDUAL, INFO_PROPERTIES_ARRAY, + GUIDE_URL: GUIDE_URLS, }; diff --git a/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.controller.js b/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.controller.js index b9e216775c2e..9ccade7f06a4 100644 --- a/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.controller.js +++ b/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.controller.js @@ -2,6 +2,7 @@ import { INFO_PROPERTIES, INFO_PROPERTIES_ARRAY, LEGAL_FORM_INDIVIDUAL, + GUIDE_URLS, } from './dashboard.constants'; export default class DomainContactDashboardCtrl { @@ -17,6 +18,8 @@ export default class DomainContactDashboardCtrl { this.INFO_PROPERTIES = INFO_PROPERTIES; this.LEGAL_FORM_INDIVIDUAL = LEGAL_FORM_INDIVIDUAL; this.infoProperties = INFO_PROPERTIES_ARRAY; + this.ovhSubsidiary = this.user.ovhSubsidiary; + this.GUIDE_URL = GUIDE_URLS[this.ovhSubsidiary] || GUIDE_URLS.DEFAULT; } $onInit() { diff --git a/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.html b/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.html index 48739a81381b..920ef61ea36d 100644 --- a/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.html +++ b/packages/manager/apps/web/client/app/domain/contact/dashboard/dashboard.html @@ -8,11 +8,26 @@

- -

+
+ +

+
+
+ + + + +
diff --git a/packages/manager/apps/web/client/app/domain/contact/translations/Messages_fr_FR.json b/packages/manager/apps/web/client/app/domain/contact/translations/Messages_fr_FR.json index 5085f6ca5343..2aa82e413e96 100644 --- a/packages/manager/apps/web/client/app/domain/contact/translations/Messages_fr_FR.json +++ b/packages/manager/apps/web/client/app/domain/contact/translations/Messages_fr_FR.json @@ -12,5 +12,7 @@ "domain_tab_CONTACT_description_technical": "Il gère les aspects techniques d'un service. Il est responsable de la définition des serveurs DNS autoritaires.", "domain_tab_CONTACT_description_billing": "Il gère uniquement la facturation d'un service dont ses prélèvements.", "domain_tab_CONTACT_description_error_message": "Une erreur est apparue", + "domain_tab_CONTACT_guide_text": "Guide", + "domain_tab_CONTACT_guide_manage_contact_and_services": "Gérer les contacts de ses services", "domain_tab_CONTACT_view_more": "Voir plus" }