From f7808f818ecec381b1783e058bdb7874687cedf3 Mon Sep 17 00:00:00 2001 From: Anoop N Date: Wed, 9 Aug 2023 12:51:35 +0530 Subject: [PATCH] feat(*): acquisition storage (#9209) feat(*): acquisition storage ref: MANAGER-11155 Signed-off-by: Anoop N Co-authored-by: sachinrameshn Co-authored-by: CDS Translator Agent --- .../container/legacy/server-sidebar/index.tsx | 1 + .../universe/AccountSidebar.tsx | 24 ++- .../container/nav-reshuffle/sidebar/index.tsx | 23 +++ .../sidebar/navigation-tree/root.ts | 10 ++ .../translations/sidebar/Messages_de_DE.json | 3 +- .../translations/sidebar/Messages_en_GB.json | 3 +- .../translations/sidebar/Messages_es_ES.json | 3 +- .../translations/sidebar/Messages_fr_CA.json | 1 + .../translations/sidebar/Messages_fr_FR.json | 1 + .../translations/sidebar/Messages_it_IT.json | 3 +- .../translations/sidebar/Messages_pl_PL.json | 3 +- .../translations/sidebar/Messages_pt_PT.json | 3 +- .../app/account/identity-documents/index.js | 21 +++ .../translations/Messages_de_DE.json | 26 +++ .../translations/Messages_en_GB.json | 26 +++ .../translations/Messages_es_ES.json | 26 +++ .../translations/Messages_fr_CA.json | 26 +++ .../translations/Messages_fr_FR.json | 26 +++ .../translations/Messages_it_IT.json | 26 +++ .../translations/Messages_pl_PL.json | 26 +++ .../translations/Messages_pt_PT.json | 26 +++ .../user-identitiy-documents.component.js | 10 ++ .../user-identity-documents.constant.js | 49 ++++++ .../user-identity-documents.controller.js | 111 ++++++++++++ .../user-identity-documents.html | 163 ++++++++++++++++++ .../user-identity-documents.module.js | 21 +++ .../user-identity-documents.routes.js | 47 +++++ .../dedicated/client/app/account/index.js | 2 + .../hub/src/dashboard/dashboard.constant.js | 15 +- .../hub/src/dashboard/dashboard.controller.js | 42 ++++- .../apps/hub/src/dashboard/dashboard.html | 31 +++- .../dashboard/order-dashboard/template.html | 18 ++ .../translations/Messages_de_DE.json | 4 +- .../translations/Messages_en_GB.json | 4 +- .../translations/Messages_es_ES.json | 4 +- .../translations/Messages_fr_CA.json | 4 +- .../translations/Messages_fr_FR.json | 4 +- .../translations/Messages_it_IT.json | 4 +- .../translations/Messages_pl_PL.json | 4 +- .../translations/Messages_pt_PT.json | 4 +- 40 files changed, 814 insertions(+), 34 deletions(-) create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/index.js create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_de_DE.json create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_en_GB.json create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_es_ES.json create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_fr_CA.json create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_fr_FR.json create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_it_IT.json create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_pl_PL.json create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_pt_PT.json create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/user-identitiy-documents.component.js create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.constant.js create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.controller.js create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.html create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.module.js create mode 100644 packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.routes.js diff --git a/packages/manager/apps/container/src/container/legacy/server-sidebar/index.tsx b/packages/manager/apps/container/src/container/legacy/server-sidebar/index.tsx index 6cb0ce218bae..a4aa4facf3f5 100644 --- a/packages/manager/apps/container/src/container/legacy/server-sidebar/index.tsx +++ b/packages/manager/apps/container/src/container/legacy/server-sidebar/index.tsx @@ -32,6 +32,7 @@ export default function ServerSidebarIndex() { '/support', '/ticket', '/useraccount', + '/identity-documents', ], iam: '*', 'carbon-calculator': '*', diff --git a/packages/manager/apps/container/src/container/legacy/server-sidebar/universe/AccountSidebar.tsx b/packages/manager/apps/container/src/container/legacy/server-sidebar/universe/AccountSidebar.tsx index c5eff1cca203..6c8b925872ea 100644 --- a/packages/manager/apps/container/src/container/legacy/server-sidebar/universe/AccountSidebar.tsx +++ b/packages/manager/apps/container/src/container/legacy/server-sidebar/universe/AccountSidebar.tsx @@ -24,7 +24,7 @@ export default function AccountSidebar() { const region = environment.getRegion(); const isEnterprise = environment.getUser()?.enterprise; - const getAccountSidebar = (availability: Record | null) => { + const getAccountSidebar = async (availability: Record | null) => { if (!availability) { return []; } @@ -44,6 +44,24 @@ export default function AccountSidebar() { routeMatcher: new RegExp('^/useraccount'), }); + const featureAvailability = await reketInstance.get( + `/feature/identity-documents/availability`, + { + requestType: 'aapi', + }, + ); + if (featureAvailability['identity-documents']) { + const { status } = await reketInstance.get(`/me/procedure/identity`); + if (['required','open'].includes(status)) { + menu.push({ + id: 'my-identity-documents', + label: t('sidebar_account_identity_documents'), + href: navigation.getURL('dedicated', '/identity-documents'), + routeMatcher: new RegExp('^/identity-documents'), + }); + } + } + if (!isEnterprise) { menu.push({ id: 'my-bills', @@ -134,11 +152,11 @@ export default function AccountSidebar() { getFeatures, ); - const buildMenu = () => + const buildMenu = async () => Promise.resolve({ id: 'my-account-sidebar', label: '', - subItems: [...getAccountSidebar(availability)], + subItems: [...(await getAccountSidebar(availability))], }); useEffect(() => { diff --git a/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/index.tsx b/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/index.tsx index 9245200ed282..525369dca311 100644 --- a/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/index.tsx +++ b/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/index.tsx @@ -149,6 +149,29 @@ const Sidebar = (): JSX.Element => { mxPlanNode.routing.hash = '#/email_mxplan'; } + /** + * Remove Identity Documents option + * Identity docments entry is added by default in ./navigation-tree/root.ts + */ + let isIdentityDocumentsVisible; + if (results['identity-documents']) { + const { status } = await reketInstance.get(`/me/procedure/identity`); + if (!['required','open'].includes(status)) { + isIdentityDocumentsVisible = false; + } + } else { + isIdentityDocumentsVisible = false; + } + if (!isIdentityDocumentsVisible) { + const account = findNodeById(tree, 'account'); + account.children.splice( + account.children.findIndex( + (node) => node.id === 'account_identity_documents', + ), + 1, + ); + } + /** * US enterprise customers special case */ diff --git a/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/navigation-tree/root.ts b/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/navigation-tree/root.ts index 6cec1ef05561..0dd55d10bf68 100644 --- a/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/navigation-tree/root.ts +++ b/packages/manager/apps/container/src/container/nav-reshuffle/sidebar/navigation-tree/root.ts @@ -45,6 +45,16 @@ const root: Node = { }, count: false, }, + { + id: 'account_identity_documents', + translation: 'sidebar_account_identity_documents', + routing: { + application: 'dedicated', + hash: '#/identity-documents', + }, + count: false, + features: ['additional-ips'], + }, { id: 'account_contacts', translation: 'sidebar_account_contacts', diff --git a/packages/manager/apps/container/src/public/translations/sidebar/Messages_de_DE.json b/packages/manager/apps/container/src/public/translations/sidebar/Messages_de_DE.json index d551f2c436ff..9a94d5c90799 100644 --- a/packages/manager/apps/container/src/public/translations/sidebar/Messages_de_DE.json +++ b/packages/manager/apps/container/src/public/translations/sidebar/Messages_de_DE.json @@ -158,5 +158,6 @@ "sidebar_access_list": "Zur Liste", "sidebar_access_dashboard": "Zum Dashboard", "sidebar_account_iam": "Identity and Access (IAM)", - "sidebar_carbon_footprint": "Mein CO2-Fußabdruck" + "sidebar_carbon_footprint": "Mein CO2-Fußabdruck", + "sidebar_account_identity_documents": "Meine Ausweisdokumente" } diff --git a/packages/manager/apps/container/src/public/translations/sidebar/Messages_en_GB.json b/packages/manager/apps/container/src/public/translations/sidebar/Messages_en_GB.json index 0ee1daee327e..0ad19b7a521f 100644 --- a/packages/manager/apps/container/src/public/translations/sidebar/Messages_en_GB.json +++ b/packages/manager/apps/container/src/public/translations/sidebar/Messages_en_GB.json @@ -158,5 +158,6 @@ "sidebar_access_list": "Access list", "sidebar_access_dashboard": "Access dashboard", "sidebar_account_iam": "Identity and Access Management (IAM)", - "sidebar_carbon_footprint": "My carbon footprint" + "sidebar_carbon_footprint": "My carbon footprint", + "sidebar_account_identity_documents": "My identity documents" } diff --git a/packages/manager/apps/container/src/public/translations/sidebar/Messages_es_ES.json b/packages/manager/apps/container/src/public/translations/sidebar/Messages_es_ES.json index 223e09261b1e..e01915d47f3b 100644 --- a/packages/manager/apps/container/src/public/translations/sidebar/Messages_es_ES.json +++ b/packages/manager/apps/container/src/public/translations/sidebar/Messages_es_ES.json @@ -158,5 +158,6 @@ "sidebar_access_list": "Acceder a la lista", "sidebar_access_dashboard": "Acceder al panel de control", "sidebar_account_iam": "Identidades y acceso (IAM)", - "sidebar_carbon_footprint": "Mi huella de carbono" + "sidebar_carbon_footprint": "Mi huella de carbono", + "sidebar_account_identity_documents": "Mis documentos de identidad" } diff --git a/packages/manager/apps/container/src/public/translations/sidebar/Messages_fr_CA.json b/packages/manager/apps/container/src/public/translations/sidebar/Messages_fr_CA.json index 267444db6524..b119b86f73e3 100644 --- a/packages/manager/apps/container/src/public/translations/sidebar/Messages_fr_CA.json +++ b/packages/manager/apps/container/src/public/translations/sidebar/Messages_fr_CA.json @@ -137,6 +137,7 @@ "sidebar_account_contacts": "Mes contacts", "sidebar_account_iam": "Identités et accès (IAM)", "sidebar_carbon_footprint": "Mon empreinte carbone", + "sidebar_account_identity_documents": "Mes documents d'identité", "sidebar_billing_services": "Mes services", "sidebar_billing_ssh": "Mes clés SSH", "sidebar_billing_bills": "Mes factures", diff --git a/packages/manager/apps/container/src/public/translations/sidebar/Messages_fr_FR.json b/packages/manager/apps/container/src/public/translations/sidebar/Messages_fr_FR.json index 267444db6524..b119b86f73e3 100644 --- a/packages/manager/apps/container/src/public/translations/sidebar/Messages_fr_FR.json +++ b/packages/manager/apps/container/src/public/translations/sidebar/Messages_fr_FR.json @@ -137,6 +137,7 @@ "sidebar_account_contacts": "Mes contacts", "sidebar_account_iam": "Identités et accès (IAM)", "sidebar_carbon_footprint": "Mon empreinte carbone", + "sidebar_account_identity_documents": "Mes documents d'identité", "sidebar_billing_services": "Mes services", "sidebar_billing_ssh": "Mes clés SSH", "sidebar_billing_bills": "Mes factures", diff --git a/packages/manager/apps/container/src/public/translations/sidebar/Messages_it_IT.json b/packages/manager/apps/container/src/public/translations/sidebar/Messages_it_IT.json index a364c1508a4a..bcaf539db19d 100644 --- a/packages/manager/apps/container/src/public/translations/sidebar/Messages_it_IT.json +++ b/packages/manager/apps/container/src/public/translations/sidebar/Messages_it_IT.json @@ -158,5 +158,6 @@ "sidebar_access_list": "Accedere alla lista", "sidebar_access_dashboard": "Accedere alla dashboard", "sidebar_account_iam": "Identità e accessi (IAM)", - "sidebar_carbon_footprint": "La mia impronta di carbonio" + "sidebar_carbon_footprint": "La mia impronta di carbonio", + "sidebar_account_identity_documents": "I miei documenti d'identità" } diff --git a/packages/manager/apps/container/src/public/translations/sidebar/Messages_pl_PL.json b/packages/manager/apps/container/src/public/translations/sidebar/Messages_pl_PL.json index f2e02e681d52..1d660f25b04b 100644 --- a/packages/manager/apps/container/src/public/translations/sidebar/Messages_pl_PL.json +++ b/packages/manager/apps/container/src/public/translations/sidebar/Messages_pl_PL.json @@ -158,5 +158,6 @@ "sidebar_access_list": "Dostęp do listy", "sidebar_access_dashboard": "Dostęp do interfejsu", "sidebar_account_iam": "Tożsamości i uprawnienia (IAM)", - "sidebar_carbon_footprint": "Mój ślad węglowy" + "sidebar_carbon_footprint": "Mój ślad węglowy", + "sidebar_account_identity_documents": "Moje dokumenty tożsamości" } diff --git a/packages/manager/apps/container/src/public/translations/sidebar/Messages_pt_PT.json b/packages/manager/apps/container/src/public/translations/sidebar/Messages_pt_PT.json index f071cb5854bb..48deb3239969 100644 --- a/packages/manager/apps/container/src/public/translations/sidebar/Messages_pt_PT.json +++ b/packages/manager/apps/container/src/public/translations/sidebar/Messages_pt_PT.json @@ -158,5 +158,6 @@ "sidebar_access_list": "Aceder à lista", "sidebar_access_dashboard": "Aceder ao painel de controlo", "sidebar_account_iam": "Identidades e acessos (IAM)", - "sidebar_carbon_footprint": "A minha pegada de carbono" + "sidebar_carbon_footprint": "A minha pegada de carbono", + "sidebar_account_identity_documents": "Documentos de identificação" } diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/index.js b/packages/manager/apps/dedicated/client/app/account/identity-documents/index.js new file mode 100644 index 000000000000..3392c6c2bb44 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/index.js @@ -0,0 +1,21 @@ +import angular from 'angular'; +import '@uirouter/angularjs'; +import 'oclazyload'; + +const moduleName = 'ovhManagerDedicatedAccountUserIdentityDocumentsLazyLoading'; + +angular.module(moduleName, ['ui.router', 'oc.lazyLoad']).config( + /* @ngInject */ ($stateProvider) => { + $stateProvider.state('app.account.identity-documents.**', { + url: '/identity-documents', + lazyLoad: ($transition$) => { + const $ocLazyLoad = $transition$.injector().get('$ocLazyLoad'); + return import( + /* webpackChunkName: "contacts" */ './user-identity-documents.module' + ).then((mod) => $ocLazyLoad.inject(mod.default || mod)); + }, + }); + }, +); + +export default moduleName; diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_de_DE.json b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_de_DE.json new file mode 100644 index 000000000000..ff6fd67ffc3e --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_de_DE.json @@ -0,0 +1,26 @@ +{ + "user_account_identity_documents": "Meine Ausweisdokumente", + "user_account_identity_documents_sub_title": "Dokumente einreichen", + "user_account_identity_documents_intro": "Sie haben Ihren Account erstellt und möchten eine Bestellung über unsere indische Website aufgeben. Aufgrund der geltenden Vorschriften muss vor der Bestellung Ihre Identität überprüft werden.", + "user_account_identity_documents_list_for_particular": "Als Privatperson müsse Sie folgende Dokumente bereitstellen:", + "user_account_identity_documents_list_for_enterprise": "Als Unternehmen müssen Sie folgende Dokumente bereitstellen:", + "user_account_identity_documents_list_for_association": "Als Verein oder Verband müssen Sie folgende Dokumente bereitstellen:", + "user_account_identity_documents_list_for_institution": "Als Behörde müssen Sie folgende Dokumente bereitstellen:", + "user_account_identity_documents_list_for_others": "Hier die Dokumente, die bereitgestellt werden müssen:", + "user_account_identity_documents_list_doc1": "Personalausweis oder Reisepass (oder Führerschein, Wahlschein, Nachweis der Zuteilung einer Aadhaar-Nummer)", + "user_account_identity_documents_list_doc2": "Adressnachweis", + "user_account_identity_documents_list_doc3": "GST-Zertifikat", + "user_account_identity_documents_list_doc3_optional": "GST-Zertifikat (optional)", + "user_account_identity_documents_description": "Die Dokumente werden nach Vertragsende noch 5 Jahre aufbewahrt.", + "user_account_identity_documents_selection_file_format": "Format: jpg, jpeg, pdf, png Maximale Größe: 10 MB", + "user_account_identity_documents_submit": "Meine Dokumente senden", + "user_account_identity_documents_submit_success_message_title": "Wir haben Ihre Dokumente erhalten.", + "user_account_identity_documents_submit_success_message_description": "Wir haben alle Ihre Dokumente erhalten. Sie werden unseren Teams zur Validierung vorgelegt. Sie werden per E-Mail über die Validierung informiert oder kontaktiert, wenn wir weitere Informationen benötigen.", + "user_account_identity_documents_submit_error_message_description": "Ihre Dokumente wurden nicht richtig gesendet. Bitte wiederholen Sie den Upload und die Übermittlung Ihrer Dokumente.", + "user_account_identity_documents_go_back_to_dashboard": "Mein Dashboard anzeigen", + "user_account_identity_documents_legal_info1": "OVH S.A.S ist für die Verarbeitung Ihrer personenbezogenen Daten verantwortlich. Die über dieses Formular erhobenen Daten werden verarbeitet, um den Richtlinien zur Cybersicherheit vom 28.04.2022 Rechnung zu tragen, die das CERT-IN gemäß den Bestimmungen des Unterabschnitts (6) von Artikel 70B des Gesetzes von 2000 ", + "user_account_identity_documents_legal_info2": "über die Informationstechnologie in Bezug auf Praktiken, Verfahren, Prävention, Intervention und Meldung von Cybersicherheitsvorfällen und Vorfällen in Zusammenhang mit dem Vertrauen im Internet veröffentlicht hat.", + "user_account_identity_documents_legal_info3": "Weitere Informationen zur Verarbeitung Ihrer Daten und zu Ihren Rechten finden Sie in unseren Richtlinien zur Nutzung personenbezogener Daten.", + "user_account_identity_documents_verification_in_progress_info": "Die Verarbeitung Ihrer Dokumente wird derzeit von unserem Team analysiert.", + "user_account_identity_documents_verification_waiting_info": "Ihre Anfrage wurde analysiert, es werden jedoch weitere Dokumente benötigt. Bitte sehen Sie sich Ihr Support-Ticket an." +} diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_en_GB.json b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_en_GB.json new file mode 100644 index 000000000000..4c4bbc509504 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_en_GB.json @@ -0,0 +1,26 @@ +{ + "user_account_identity_documents": "My identity documents", + "user_account_identity_documents_sub_title": "Upload your documents", + "user_account_identity_documents_intro": "You have created your account and you want to order from our Indian site. The regulations in force require that you verify your identity before ordering.", + "user_account_identity_documents_list_for_particular": "If you are an individual, the mandatory documents to provide are:", + "user_account_identity_documents_list_for_enterprise": "If you are a company, the mandatory documents to provide are:", + "user_account_identity_documents_list_for_association": "If you are an organisation, the mandatory documents to provide are:", + "user_account_identity_documents_list_for_institution": "If you are a public authority, the mandatory documents to provide are:", + "user_account_identity_documents_list_for_others": "The following documents are mandatory:", + "user_account_identity_documents_list_doc1": "ID card or passport (or driver's licence, voter registration card, proof of possession of Aadhaar number)", + "user_account_identity_documents_list_doc2": "Proof of address", + "user_account_identity_documents_list_doc3": "GST certificate", + "user_account_identity_documents_list_doc3_optional": "GST certificate (optional)", + "user_account_identity_documents_description": "The documents will be retained for 5 years after the end of the contract.", + "user_account_identity_documents_selection_file_format": "Format: jpg, jpeg, pdf, png\nMaximum size: 10 MB.", + "user_account_identity_documents_submit": "Send my documents", + "user_account_identity_documents_submit_success_message_title": "Thank you, we have received your documents!", + "user_account_identity_documents_submit_success_message_description": "We have received all of your documents. They will be submitted to our teams for validation. You will be notified of their validation by email, or you will be contacted if we need further information.", + "user_account_identity_documents_submit_error_message_description": "Your documents were not sent correctly. Please re-upload your documents.", + "user_account_identity_documents_go_back_to_dashboard": "View my dashboard", + "user_account_identity_documents_legal_info1": "OVH S.A.S is responsible for processing your personal data. The data collected via this form is processed in order to comply with the Cybersecurity Guidelines of 28.04.2022 published by CERT-IN under the provisions of subsection (6) of section 70B of The ", + "user_account_identity_documents_legal_info2": "Information Technology Act, 2000, relating to information security practices, procedures, prevention, response and reporting of cyber incidents.", + "user_account_identity_documents_legal_info3": "To find out more about how your data is processed, along with your rights, please refer to our Policy on the Use of Personal Data.", + "user_account_identity_documents_verification_in_progress_info": "Your documents are currently being processed by our team.", + "user_account_identity_documents_verification_waiting_info": "Your request has been processed but we require additional documents. Please consult your support ticket." +} diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_es_ES.json b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_es_ES.json new file mode 100644 index 000000000000..58ea63d10d99 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_es_ES.json @@ -0,0 +1,26 @@ +{ + "user_account_identity_documents": "Mis documentos de identidad", + "user_account_identity_documents_sub_title": "Añada sus documentos", + "user_account_identity_documents_intro": "Ha creado su cuenta y quiere realizar un pedido desde nuestro sitio web en India. Según la normativa vigente, es necesario verificar su identidad para poder realizar un pedido.", + "user_account_identity_documents_list_for_particular": "Como particular, los documentos que deben presentarse de manera obligatoria son los siguientes:", + "user_account_identity_documents_list_for_enterprise": "Como empresa, los documentos que deben presentarse de manera obligatoria son los siguientes:", + "user_account_identity_documents_list_for_association": "Como asociación, los documentos que deben presentarse de manera obligatoria son los siguientes:", + "user_account_identity_documents_list_for_institution": "Como administración, los documentos que deben presentarse de manera obligatoria son los siguientes:", + "user_account_identity_documents_list_for_others": "Los documentos que deben presentarse de manera obligatoria son los siguientes:", + "user_account_identity_documents_list_doc1": "Documento de identidad o pasaporte (o permiso de conducir, tarjeta censal, prueba de posesión de un número Aadhaar)", + "user_account_identity_documents_list_doc2": "Justificante de domicilio", + "user_account_identity_documents_list_doc3": "Certificado GST", + "user_account_identity_documents_list_doc3_optional": "Certificado GST (opcional)", + "user_account_identity_documents_description": "Los documentos se conservarán durante 5 años una vez finalizado el contrato.", + "user_account_identity_documents_selection_file_format": "Formato: jpg, jpeg, pdf, png Tamaño máximo: 10 MB.", + "user_account_identity_documents_submit": "Enviar mis documentos", + "user_account_identity_documents_submit_success_message_title": "Gracias, ¡hemos recibido sus documentos!", + "user_account_identity_documents_submit_success_message_description": "Le confirmamos que hemos recibido todos sus documentos. A continuación, deberán ser validados por nuestro equipo. Le enviaremos un mensaje de correo electrónico una vez que hayan sido validados. Si es necesaria alguna información adicional, nos pondremos en contacto con usted.", + "user_account_identity_documents_submit_error_message_description": "Sus documentos no se han enviado correctamente. Por favor, vuelva a cargarlos y a enviar sus documentos.", + "user_account_identity_documents_go_back_to_dashboard": "Ver mi panel de control", + "user_account_identity_documents_legal_info1": "OVH SAS es el responsable del tratamiento de sus datos personales. Los datos recopilados a través de este formulario son tratados para cumplir con las Directrices de Ciberseguridad del 28/04/2022 publicadas por el CERT-in en virtud de las disposiciones de la subsección (6) del artículo 70-B de la Ley de 2000 ", + "user_account_identity_documents_legal_info2": "sobre la tecnología de la información relativas a las prácticas, los procedimientos, la prevención, la intervención y la notificación de ciberincidentes de seguridad y de confianza en internet.", + "user_account_identity_documents_legal_info3": "Para más información sobre el tratamiento de sus datos y sus derechos, consulte la Política de uso de datos personales de OVHcloud.", + "user_account_identity_documents_verification_in_progress_info": "Nuestro equipo está analizando el tratamiento de sus documentos.", + "user_account_identity_documents_verification_waiting_info": "Su solicitud ha sido analizada, pero es necesaria información adicional. Consulte su tíquet de soporte." +} diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_fr_CA.json b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_fr_CA.json new file mode 100644 index 000000000000..3251a38a11a5 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_fr_CA.json @@ -0,0 +1,26 @@ +{ + "user_account_identity_documents": "Mes documents d'identité", + "user_account_identity_documents_sub_title": "Déposez vos documents", + "user_account_identity_documents_intro": "Vous avez créé votre compte et vous souhaitez faire une commande depuis notre site Indien. La règlementation en vigueur nécessite une vérification de votre identité avant toute commande.", + "user_account_identity_documents_list_for_particular": "Vous êtes un particulier, les documents obligatoires à fournir sont", + "user_account_identity_documents_list_for_enterprise": "Vous êtes une entreprise, les documents obligatoires à fournir sont", + "user_account_identity_documents_list_for_association": "Vous êtes une association, les documents obligatoires à fournir sont", + "user_account_identity_documents_list_for_institution": "Vous êtes une administration, les documents obligatoires à fournir sont", + "user_account_identity_documents_list_for_others": "Voici les documents obligatoires à fournir", + "user_account_identity_documents_list_doc1": "Carte d'identité ou passeport (ou permis de conduire, carte électorale, preuve de possession d'un nombre Aadhaar)", + "user_account_identity_documents_list_doc2": "Justificatif de domicile", + "user_account_identity_documents_list_doc3": "Certificat GST", + "user_account_identity_documents_list_doc3_optional": "Certificat GST (optionnel)", + "user_account_identity_documents_description": "Les documents seront conservés durant 5 ans après la fin du contrat.", + "user_account_identity_documents_selection_file_format": "Format: jpg, jpeg, pdf, png Taille maximale: 10 mo.", + "user_account_identity_documents_submit": "Envoyer mes documents", + "user_account_identity_documents_submit_success_message_title": "Merci, nous avons bien reçu vos documents!", + "user_account_identity_documents_submit_success_message_description": "Nous avons bien reçu l’ensemble de vos documents. Ils seront soumis à validation auprès de nos équipes. Vous serez informé par email de leur validation ou vous serez contacté si nous avons besoin d’informations complémentaires.", + "user_account_identity_documents_submit_error_message_description": "Vos documents n’ont pas été correctement envoyés. Veuillez refaire l’upload et l’envoi de vos documents", + "user_account_identity_documents_go_back_to_dashboard": "Voir mon tableau de bord", + "user_account_identity_documents_legal_info1": "OVH S.A.S est le responsable du traitement de vos données personnelles. Les données collectées via ce formulaire sont traitées afin de se conformer aux Directives de cybersécurité du 28.04.2022 publiées par le CERT-IN en vertu des dispositions de la sous-section (6) de l'article 70B de la Loi de 2000 ", + "user_account_identity_documents_legal_info2": "sur la technologie de l'information relatives aux pratiques, aux procédures, à la prévention, à l'intervention et au signalement de cyberincidents de sécurité et de confiance sur Internet.", + "user_account_identity_documents_legal_info3": "Pour en savoir plus sur le traitement de vos données personnelles et connaître vos droits, vous pouvez consulter notre Politique d’utilisation des données à caractère personnel.", + "user_account_identity_documents_verification_in_progress_info": "Le traitement de vos documents est actuellement en cours d'analyse par notre équipe.", + "user_account_identity_documents_verification_waiting_info": "Votre demande a été analysée mais nécessite des documents complémentaires. Veuillez consulter votre ticket de support." +} diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_fr_FR.json b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_fr_FR.json new file mode 100644 index 000000000000..3251a38a11a5 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_fr_FR.json @@ -0,0 +1,26 @@ +{ + "user_account_identity_documents": "Mes documents d'identité", + "user_account_identity_documents_sub_title": "Déposez vos documents", + "user_account_identity_documents_intro": "Vous avez créé votre compte et vous souhaitez faire une commande depuis notre site Indien. La règlementation en vigueur nécessite une vérification de votre identité avant toute commande.", + "user_account_identity_documents_list_for_particular": "Vous êtes un particulier, les documents obligatoires à fournir sont", + "user_account_identity_documents_list_for_enterprise": "Vous êtes une entreprise, les documents obligatoires à fournir sont", + "user_account_identity_documents_list_for_association": "Vous êtes une association, les documents obligatoires à fournir sont", + "user_account_identity_documents_list_for_institution": "Vous êtes une administration, les documents obligatoires à fournir sont", + "user_account_identity_documents_list_for_others": "Voici les documents obligatoires à fournir", + "user_account_identity_documents_list_doc1": "Carte d'identité ou passeport (ou permis de conduire, carte électorale, preuve de possession d'un nombre Aadhaar)", + "user_account_identity_documents_list_doc2": "Justificatif de domicile", + "user_account_identity_documents_list_doc3": "Certificat GST", + "user_account_identity_documents_list_doc3_optional": "Certificat GST (optionnel)", + "user_account_identity_documents_description": "Les documents seront conservés durant 5 ans après la fin du contrat.", + "user_account_identity_documents_selection_file_format": "Format: jpg, jpeg, pdf, png Taille maximale: 10 mo.", + "user_account_identity_documents_submit": "Envoyer mes documents", + "user_account_identity_documents_submit_success_message_title": "Merci, nous avons bien reçu vos documents!", + "user_account_identity_documents_submit_success_message_description": "Nous avons bien reçu l’ensemble de vos documents. Ils seront soumis à validation auprès de nos équipes. Vous serez informé par email de leur validation ou vous serez contacté si nous avons besoin d’informations complémentaires.", + "user_account_identity_documents_submit_error_message_description": "Vos documents n’ont pas été correctement envoyés. Veuillez refaire l’upload et l’envoi de vos documents", + "user_account_identity_documents_go_back_to_dashboard": "Voir mon tableau de bord", + "user_account_identity_documents_legal_info1": "OVH S.A.S est le responsable du traitement de vos données personnelles. Les données collectées via ce formulaire sont traitées afin de se conformer aux Directives de cybersécurité du 28.04.2022 publiées par le CERT-IN en vertu des dispositions de la sous-section (6) de l'article 70B de la Loi de 2000 ", + "user_account_identity_documents_legal_info2": "sur la technologie de l'information relatives aux pratiques, aux procédures, à la prévention, à l'intervention et au signalement de cyberincidents de sécurité et de confiance sur Internet.", + "user_account_identity_documents_legal_info3": "Pour en savoir plus sur le traitement de vos données personnelles et connaître vos droits, vous pouvez consulter notre Politique d’utilisation des données à caractère personnel.", + "user_account_identity_documents_verification_in_progress_info": "Le traitement de vos documents est actuellement en cours d'analyse par notre équipe.", + "user_account_identity_documents_verification_waiting_info": "Votre demande a été analysée mais nécessite des documents complémentaires. Veuillez consulter votre ticket de support." +} diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_it_IT.json b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_it_IT.json new file mode 100644 index 000000000000..085e45a8a12c --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_it_IT.json @@ -0,0 +1,26 @@ +{ + "user_account_identity_documents": "I miei documenti d'identità", + "user_account_identity_documents_sub_title": "Inserisci i tuoi documenti", + "user_account_identity_documents_intro": "Hai creato il tuo account e vuoi effettuare un ordine dal nostro sito indiano. La normativa vigente richiede una verifica dell'identità prima di effettuare qualsiasi ordine.", + "user_account_identity_documents_list_for_particular": "Se sei un privato, i documenti obbligatori da fornire sono", + "user_account_identity_documents_list_for_enterprise": "Se sei un'azienda, i documenti obbligatori da fornire sono", + "user_account_identity_documents_list_for_association": "Se sei un'associazione, i documenti obbligatori da fornire sono", + "user_account_identity_documents_list_for_institution": "Se sei un'amministrazione, i documenti obbligatori da fornire sono", + "user_account_identity_documents_list_for_others": "I documenti obbligatori da fornire", + "user_account_identity_documents_list_doc1": "Carta d'identità o passaporto (o patente di guida, scheda elettorale, dimostrazione di possesso di un numero Aadhaar)", + "user_account_identity_documents_list_doc2": "Giustificativo di domicilio", + "user_account_identity_documents_list_doc3": "Certificato GST", + "user_account_identity_documents_list_doc3_optional": "Certificato GST (facoltativo)", + "user_account_identity_documents_description": "I documenti saranno conservati per cinque anni dalla fine del contratto.", + "user_account_identity_documents_selection_file_format": "Formato: jpg, jpeg, pdf, png Dimensione massima: 10 MB.", + "user_account_identity_documents_submit": "Invia i documenti", + "user_account_identity_documents_submit_success_message_title": "Grazie, abbiamo ricevuto i tuoi documenti!", + "user_account_identity_documents_submit_success_message_description": "Abbiamo ricevuto tutti i documenti, che verranno verificati dai nostri team. Riceverai un'email di conferma di validazione oppure verrai contattato se avremo bisogno di maggiori informazioni.", + "user_account_identity_documents_submit_error_message_description": "I documenti non sono stati inviati correttamente. Ti preghiamo di procedere nuovamente all’upload e all’invio dei documenti.", + "user_account_identity_documents_go_back_to_dashboard": "Visualizza il pannello di controllo", + "user_account_identity_documents_legal_info1": "OVH S.A.S è il responsabile del trattamento dei tuoi dati personali. I dati raccolti tramite questo modulo sono trattati in conformità alle Direttive sulla cybersicurezza del 28.04.2022 pubblicate dal CERT-IN ai sensi delle disposizioni della sottosezione (6) dell'articolo 70B della legge del 2000 ", + "user_account_identity_documents_legal_info2": "sulla tecnologia dell'informazione relative alle pratiche, alle procedure, alla prevenzione, all'intervento e alla segnalazione di incidenti informatici di sicurezza e di fiducia su Internet.", + "user_account_identity_documents_legal_info3": "Per maggiori informazioni sul trattamento dei tuoi dati personali e per conoscere i tuoi diritti, consulta la nostra Politica di utilizzo dei dati personali.", + "user_account_identity_documents_verification_in_progress_info": "Il trattamento dei documenti è attualmente in fase di analisi da parte dei nostri team.", + "user_account_identity_documents_verification_waiting_info": "La tua richiesta è stata analizzata ma necessita di ulteriori documenti. Consulta il ticket di supporto." +} diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_pl_PL.json b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_pl_PL.json new file mode 100644 index 000000000000..ad27bbbf3fb4 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_pl_PL.json @@ -0,0 +1,26 @@ +{ + "user_account_identity_documents": "Moje dokumenty tożsamości", + "user_account_identity_documents_sub_title": "Prześlij dokumenty", + "user_account_identity_documents_intro": "Założyłaś/-eś konto i chcesz złożyć zamówienie na naszej hinduskiej stronie internetowej. Obowiązujące przepisy wymagają sprawdzenia Twojej tożsamości przed złożeniem zamówienia.", + "user_account_identity_documents_list_for_particular": "Jesteś osobą prywatną, wymagane dokumenty to", + "user_account_identity_documents_list_for_enterprise": "Reprezentujesz firmę, wymagane dokumenty to", + "user_account_identity_documents_list_for_association": "Reprezentujesz stowarzyszenie, wymagane dokumenty to", + "user_account_identity_documents_list_for_institution": "Reprezentujesz administrację, wymagane dokumenty są", + "user_account_identity_documents_list_for_others": "Poniżej zamieszczamy wymagane dokumenty, które należy złożyć", + "user_account_identity_documents_list_doc1": "Dowód osobisty lub paszport (lub prawo jazdy, karta wyborcy, dowód posiadania numeru Aadhaar)", + "user_account_identity_documents_list_doc2": "Dokument potwierdzający adres zamieszkania", + "user_account_identity_documents_list_doc3": "Certyfikat GST", + "user_account_identity_documents_list_doc3_optional": "Certyfikat GST (opcjonalnie)", + "user_account_identity_documents_description": "Dokumenty będą przechowywane przez okres 5 lat od zakończenia umowy.", + "user_account_identity_documents_selection_file_format": "Format: jpg, jpeg, pdf, png Maksymalny rozmiar: 10 MB.", + "user_account_identity_documents_submit": "Wyślij dokumenty", + "user_account_identity_documents_submit_success_message_title": "Dziękujemy, potwierdzamy, że otrzymaliśmy Twoje dokumenty!", + "user_account_identity_documents_submit_success_message_description": "Otrzymaliśmy wszystkie Twoje dokumenty. Przekażemy je naszym zespołom do zatwierdzenia. Wyślemy do Ciebie e-mail z informacją o ich zatwierdzeniu lub skontaktujemy się z Tobą, jeśli będziemy potrzebować dodatkowych informacji.", + "user_account_identity_documents_submit_error_message_description": "Twoje dokumenty nie zostały poprawnie wysłane. Prosimy o ponowne ich załadowanie i przesłanie.", + "user_account_identity_documents_go_back_to_dashboard": "Wyświetl mój dashboard", + "user_account_identity_documents_legal_info1": "Grupa OVH S.A.S jest odpowiedzialna za przetwarzanie Twoich danych osobowych. Dane zebrane za pomocą tego formularza są przetwarzane w celu zapewnienia zgodności z Wytycznymi w sprawie bezpieczeństwa cybernetycznego z dnia 28.04.2022 opublikowanymi przez CERT-IN zgodnie z przepisami podsekcji (6) art. 70B ustawy z 2000 r. ", + "user_account_identity_documents_legal_info2": "w sprawie technologii informacji związanych z praktykami, procedurami, zapobieganiem, interwencją i zgłaszaniem incydentów związanych z cyberbezpieczeństwem i zaufaniem w Internecie.", + "user_account_identity_documents_legal_info3": "Aby dowiedzieć się więcej o przetwarzaniu Twoich danych osobowych i przysługujących Ci prawach, zapoznaj się z naszą Polityką ochrony danych osobowych.", + "user_account_identity_documents_verification_in_progress_info": "Twoje dokumenty są obecnie przetwarzane przez nasz zespół.", + "user_account_identity_documents_verification_waiting_info": "Twój wniosek został przeanalizowany, ale wymaga dodatkowych dokumentów. Sprawdź Twoje zgłoszenie pomocy." +} diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_pt_PT.json b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_pt_PT.json new file mode 100644 index 000000000000..cfe494e0694f --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/translations/Messages_pt_PT.json @@ -0,0 +1,26 @@ +{ + "user_account_identity_documents": "Documentos de identificação", + "user_account_identity_documents_sub_title": "Apresente os seus documentos", + "user_account_identity_documents_intro": "Criou uma conta e deseja efetuar uma encomenda a partir do nosso site indiano. A regulamentação em vigor requer uma verificação da sua identidade antes de qualquer encomenda.", + "user_account_identity_documents_list_for_particular": "É um particular. Os documentos obrigatórios a fornecer são", + "user_account_identity_documents_list_for_enterprise": "É uma empresa. Os documentos obrigatórios a fornecer são", + "user_account_identity_documents_list_for_association": "É uma associação. Os documentos obrigatórios a fornecer são", + "user_account_identity_documents_list_for_institution": "Faz parte de uma administração. Os documentos obrigatórios a fornecer são", + "user_account_identity_documents_list_for_others": "Eis os documentos de fornecimento obrigatório", + "user_account_identity_documents_list_doc1": "Bilhete de identidade ou passaporte (ou carta de condução, cartão eleitoral, prova de posse de um número Aadhaar)", + "user_account_identity_documents_list_doc2": "Comprovativo de domicílio", + "user_account_identity_documents_list_doc3": "Certificado GST", + "user_account_identity_documents_list_doc3_optional": "Certificado GST (facultativo)", + "user_account_identity_documents_description": "Os documentos serão conservados durante cinco anos após o termo do contrato.", + "user_account_identity_documents_selection_file_format": "Formato: jpg, jpeg, pdf, png. Tamanho máximo: 10 MB.", + "user_account_identity_documents_submit": "Enviar os meus documentos", + "user_account_identity_documents_submit_success_message_title": "Obrigado. Recebemos com êxito os seus documentos!", + "user_account_identity_documents_submit_success_message_description": "Recebemos com êxito todos os seus documentos. Serão sujeitos a validação por parte das nossas equipas. Receberá por e-mail a confirmação da validação, ou será contactado caso seja necessário fornecer mais informações.", + "user_account_identity_documents_submit_error_message_description": "Os seus documentos não foram corretamente enviados. Repita o upload e o envio dos seus documentos", + "user_account_identity_documents_go_back_to_dashboard": "Ver o painel de controlo", + "user_account_identity_documents_legal_info1": "A OVH S.A.S é a responsável pelo tratamento dos seus dados pessoais. Os dados recolhidos através deste formulário são tratados de modo a cumprir as Diretrizes de Cibersegurança de 28/04/2022, publicadas pelo CERT-IN, em conformidade com o disposto na subsecção (6) do artigo 70B da Lei de 2000 ", + "user_account_identity_documents_legal_info2": "sobre as tecnologias da informação relativas às práticas, aos procedimentos, à prevenção, à intervenção e à comunicação de ciberincidentes de segurança e de confiança na Internet.", + "user_account_identity_documents_legal_info3": "Para saber mais sobre o tratamento dos seus dados pessoais e conhecer os seus direitos, pode consultar a nossa Política de Utilização de Dados Pessoais.", + "user_account_identity_documents_verification_in_progress_info": "O tratamento dos seus documentos está a ser analisado pela nossa equipa.", + "user_account_identity_documents_verification_waiting_info": "O seu pedido foi analisado, mas necessita de documentos complementares. Consulte o seu ticket de assistência." +} diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identitiy-documents.component.js b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identitiy-documents.component.js new file mode 100644 index 000000000000..52c1f3919879 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identitiy-documents.component.js @@ -0,0 +1,10 @@ +import controller from './user-identity-documents.controller'; +import template from './user-identity-documents.html'; + +export default { + controller, + template, + bindings: { + kycStatus: '<', + }, +}; diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.constant.js b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.constant.js new file mode 100644 index 000000000000..6d384b52638b --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.constant.js @@ -0,0 +1,49 @@ +export const USER_TYPE = { + corporation: 'enterprise', + association: 'association', + individual: 'particular', + institution: 'institution', + default: 'others', +}; + +export const LEGAL_LINK1 = + 'https://www.cert-in.org.in/PDF/CERT-In_Directions_70B_28.04.2022.pdf'; +export const LEGAL_LINK2 = + 'https://www.cert-in.org.in/PDF/CERT-In_Directions_70B_28.04.2022.pdf'; +export const LEGAL_LINK3 = { + FR: 'https://www.ovhcloud.com/fr/terms-and-conditions/privacy-policy/', + DE: 'https://www.ovhcloud.com/de/terms-and-conditions/privacy-policy/', + ES: 'https://www.ovhcloud.com/es-es/terms-and-conditions/privacy-policy/', + IT: 'https://www.ovhcloud.com/it/terms-and-conditions/privacy-policy/', + PL: 'https://www.ovhcloud.com/pl/terms-and-conditions/privacy-policy/', + PT: 'https://www.ovhcloud.com/pt/terms-and-conditions/privacy-policy/', + IN: 'https://www.ovhcloud.com/en-in/terms-and-conditions/privacy-policy/', + OTHERS: 'https://www.ovhcloud.com/en-gb/terms-and-conditions/privacy-policy/', +}; + +export const MAX_SIZE = 10000000; + +export const TRACKING_PREFIX = 'dedicated::account::identity-files'; + +export const TRACKING_TASK_TAG = { + upload: `${TRACKING_PREFIX}::upload`, + uploadSuccess: `${TRACKING_PREFIX}::upload-success`, + uploadError: `${TRACKING_PREFIX}::upload-error`, + gotToHub: `${TRACKING_PREFIX}::goto-hub`, +}; + +export const KYC_STATUS = { + OPEN: 'open', + REQUIRED: 'required', +}; + +export default { + USER_TYPE, + MAX_SIZE, + TRACKING_PREFIX, + TRACKING_TASK_TAG, + LEGAL_LINK1, + LEGAL_LINK2, + LEGAL_LINK3, + KYC_STATUS, +}; diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.controller.js b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.controller.js new file mode 100644 index 000000000000..b99823a71819 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.controller.js @@ -0,0 +1,111 @@ +import { + USER_TYPE, + MAX_SIZE, + TRACKING_TASK_TAG, + LEGAL_LINK1, + LEGAL_LINK2, + LEGAL_LINK3, + KYC_STATUS, +} from './user-identity-documents.constant'; + +export default class AccountUserIdentityDocumentsController { + /* @ngInject */ + constructor($q, $http, coreConfig, coreURLBuilder, atInternet) { + this.$q = $q; + this.$http = $http; + this.coreConfig = coreConfig; + this.coreURLBuilder = coreURLBuilder; + this.maximum_size = MAX_SIZE; + this.atInternet = atInternet; + this.LEGAL_LINK1 = LEGAL_LINK1; + this.LEGAL_LINK2 = LEGAL_LINK2; + this.LEGAL_LINK3 = + LEGAL_LINK3[coreConfig.getUser().ovhSubsidiary] || LEGAL_LINK3.OTHERS; + this.KYC_STATUS = KYC_STATUS; + this.TRACKING_TASK_TAG = TRACKING_TASK_TAG; + this.USER_TYPE = USER_TYPE; + } + + $onInit() { + this.currentUser = this.coreConfig.getUser().legalform; + this.files = []; + this.loading = false; + this.showUploadOption = true; + this.displayError = false; + this.dashboardRedirectURL = this.coreURLBuilder.buildURL('hub', ''); + this.user_type = USER_TYPE[this.currentUser] + ? USER_TYPE[this.currentUser] + : USER_TYPE.default; + } + + uploadIdentityDocuments() { + this.loading = true; + this.displayError = false; + this.trackClick(TRACKING_TASK_TAG.upload); + if (!this.form.$invalid) { + this.getUploadDocumentsLinks(this.files.length) + .then(() => { + this.loading = false; + this.kycStatus.status = KYC_STATUS.OPEN; + this.trackPage(TRACKING_TASK_TAG.uploadSuccess); + }) + .catch(() => { + this.displayErrorBanner(); + }); + } else { + this.files = null; + this.displayErrorBanner(); + } + } + + getUploadDocumentsLinks(count) { + return this.$http + .post(`/me/procedure/identity`, { + numberOfDocuments: count, + }) + .then(({ data: response }) => { + const { uploadLinks } = response; + return this.$q.all( + uploadLinks.map((uploadLink, index) => + this.uploadDocumentsToS3usingLinks(uploadLink, this.files[index]), + ), + ); + }) + .then(() => { + this.$http.post(`/me/procedure/identity/finalize`); + this.showUploadOption = false; + }) + .catch(() => { + this.displayErrorBanner(); + }); + } + + uploadDocumentsToS3usingLinks(uploadLink, uploadedfile) { + return this.$http + .put(uploadLink.link, uploadedfile, { + headers: { ...uploadLink.headers }, + }) + .catch(() => { + this.displayErrorBanner(); + }); + } + + displayErrorBanner() { + this.loading = false; + this.displayError = true; + this.trackPage(TRACKING_TASK_TAG.uploadError); + } + + trackClick(hit, type = 'action') { + this.atInternet.trackClick({ + name: hit, + type, + }); + } + + trackPage(hit) { + this.atInternet.trackPage({ + name: hit, + }); + } +} diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.html b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.html new file mode 100644 index 000000000000..904a4ffeaae0 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.html @@ -0,0 +1,163 @@ + +
+

+ + + + + + + + + + +

+ +

+ +

+ + + + : +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+ + + +
+ +
+ + + +
+
+ + + +
+ + +
+ + + +
+
+ + + +
+ +

+

+
+ + + + + +
+ + +
+ + + + + +
+ diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.module.js b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.module.js new file mode 100644 index 000000000000..8ea87d688668 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.module.js @@ -0,0 +1,21 @@ +import ngAtInternet from '@ovh-ux/ng-at-internet'; +import ngOvhHttp from '@ovh-ux/ng-ovh-http'; + +import component from './user-identitiy-documents.component'; +import routing from './user-identity-documents.routes'; + +const moduleName = 'DedicatedUserAccountIdentityDocuments'; + +angular + .module(moduleName, [ + ngAtInternet, + ngOvhHttp, + 'oui', + 'pascalprecht.translate', + 'ui.router', + ]) + .component('dedicatedAccountUserIdentityDocuments', component) + .config(routing) + .run(/* @ngTranslationsInject:json ./translations */); + +export default moduleName; diff --git a/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.routes.js b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.routes.js new file mode 100644 index 000000000000..0ec2ce5b14b1 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/account/identity-documents/user-identity-documents.routes.js @@ -0,0 +1,47 @@ +import { TRACKING_PREFIX } from './user-identity-documents.constant'; + +export default /* @ngInject */ ($stateProvider) => { + const name = 'app.account.identity-documents'; + + $stateProvider.state(name, { + url: '/identity-documents', + component: 'dedicatedAccountUserIdentityDocuments', + translations: { + format: 'json', + value: ['.'], + }, + resolve: { + isKycFeatureAvailable: /* @ngInject */ ($http) => { + return $http + .get(`/feature/identity-documents/availability`, { + serviceType: 'aapi', + }) + .then( + ({ data: featureAvailability }) => + featureAvailability['identity-documents'], + ); + }, + kycStatus: /* @ngInject */ ($http, isKycFeatureAvailable) => { + if (isKycFeatureAvailable) { + return $http.get(`/me/procedure/identity`).then(({ data }) => data); + } + return false; + }, + needkyc: /* @ngInject */ (isKycFeatureAvailable, kycStatus) => { + if (isKycFeatureAvailable) { + return ['required', 'open'].includes(kycStatus.status); + } + return false; + }, + breadcrumb: /* @ngInject */ () => null, + }, + atInternet: { + rename: TRACKING_PREFIX, + }, + redirectTo: (transition) => + transition + .injector() + .getAsync('needkyc') + .then((needkyc) => (needkyc ? false : { state: 'app.account' })), + }); +}; diff --git a/packages/manager/apps/dedicated/client/app/account/index.js b/packages/manager/apps/dedicated/client/app/account/index.js index ce87b7ca743d..5939c88a184c 100644 --- a/packages/manager/apps/dedicated/client/app/account/index.js +++ b/packages/manager/apps/dedicated/client/app/account/index.js @@ -3,6 +3,7 @@ import contactUpdate from './contacts/update'; import redirection from './account.redirection'; import routing from './account.routing'; import user from './user'; +import identityDocuments from './identity-documents'; const moduleName = 'ovhManagerDedicatedAccount'; @@ -15,6 +16,7 @@ angular 'ui.bootstrap', 'ui.router', user, + identityDocuments, ]) .config(redirection) .config(routing); diff --git a/packages/manager/apps/hub/src/dashboard/dashboard.constant.js b/packages/manager/apps/hub/src/dashboard/dashboard.constant.js index 669a8c0853d4..14ec205a8932 100644 --- a/packages/manager/apps/hub/src/dashboard/dashboard.constant.js +++ b/packages/manager/apps/hub/src/dashboard/dashboard.constant.js @@ -1,13 +1,20 @@ -export const TRACKING_PREFIX = 'hub::add-siret-banner'; +export const SIRET_TRACKING_PREFIX = 'hub::add-siret-banner'; + +export const SIRET_HIT_PREFIX = `${SIRET_TRACKING_PREFIX}::goto-edit-profile`; -export const HIT_PREFIX = 'goto-edit-profile'; export const TRACKING_PREFIX_EDIT = 'edit-profil-confirm-banner'; export const TRACKING_PREFIX_POPUP = 'hub::add-siret-popup'; +export const KYC_TRACKING_PREFIX = 'alert::kyc-india'; + +export const KYC_HIT_PREFIX = `${KYC_TRACKING_PREFIX}::verify-identity`; + export default { - TRACKING_PREFIX, - HIT_PREFIX, + SIRET_TRACKING_PREFIX, + SIRET_HIT_PREFIX, TRACKING_PREFIX_POPUP, TRACKING_PREFIX_EDIT, + KYC_TRACKING_PREFIX, + KYC_HIT_PREFIX, }; diff --git a/packages/manager/apps/hub/src/dashboard/dashboard.controller.js b/packages/manager/apps/hub/src/dashboard/dashboard.controller.js index 2d7f55c28889..230b32e7d9b4 100644 --- a/packages/manager/apps/hub/src/dashboard/dashboard.controller.js +++ b/packages/manager/apps/hub/src/dashboard/dashboard.controller.js @@ -1,7 +1,9 @@ import { - TRACKING_PREFIX, - HIT_PREFIX, + SIRET_TRACKING_PREFIX, + SIRET_HIT_PREFIX, TRACKING_PREFIX_POPUP, + KYC_TRACKING_PREFIX, + KYC_HIT_PREFIX, } from './dashboard.constant'; export default class DashboardController { @@ -10,15 +12,37 @@ export default class DashboardController { this.coreURLBuilder = coreURLBuilder; this.atInternet = atInternet; this.$window = $window; - this.TRACKING_PREFIX = TRACKING_PREFIX; - this.HIT_PREFIX = HIT_PREFIX; + this.SIRET_TRACKING_PREFIX = SIRET_TRACKING_PREFIX; + this.SIRET_HIT_PREFIX = SIRET_HIT_PREFIX; this.TRACKING_PREFIX_POPUP = TRACKING_PREFIX_POPUP; + this.KYC_HIT_PREFIX = KYC_HIT_PREFIX; this.$http = $http; + this.myIdentitySectionLink = coreURLBuilder.buildURL( + 'dedicated', + '#/identity-documents', + ); } $onInit() { this.availableSiretBanner = false; this.availableSiretPopup = false; + this.showKycBanner = false; + this.$http + .get(`/feature/identity-documents/availability`, { + serviceType: 'aapi', + }) + .then(({ data: featureAvailability }) => { + if (featureAvailability['identity-documents']) { + this.$http.get(`/me/procedure/identity`).then(({ data }) => { + this.showKycBanner = ['required', 'open'].includes(data.status); + if (this.showKycBanner) + this.atInternet.trackPage({ + name: KYC_TRACKING_PREFIX, + type: 'navigation', + }); + }); + } + }); this.$http .get('/me') @@ -34,14 +58,14 @@ export default class DashboardController { }) .then((data) => { this.availableSiretBanner = - data.isFeatureAvailable('hub:banner-hub-invite-customer-siret') && + data?.isFeatureAvailable('hub:banner-hub-invite-customer-siret') && this.userSiretFR; this.availableSiretPopup = - data.isFeatureAvailable('hub:popup-hub-invite-customer-siret') && + data?.isFeatureAvailable('hub:popup-hub-invite-customer-siret') && this.userSiretFR; if (this.availableSiretBanner) { this.atInternet.trackPage({ - name: TRACKING_PREFIX, + name: SIRET_TRACKING_PREFIX, type: 'navigation', }); } @@ -79,9 +103,9 @@ export default class DashboardController { this.availableSiretPopup = false; } - trackClick() { + trackClick(hit) { this.atInternet.trackClick({ - name: `${TRACKING_PREFIX}::${HIT_PREFIX}`, + name: hit, type: 'action', }); } diff --git a/packages/manager/apps/hub/src/dashboard/dashboard.html b/packages/manager/apps/hub/src/dashboard/dashboard.html index b9cebcb0e5cb..4129287ac6d5 100644 --- a/packages/manager/apps/hub/src/dashboard/dashboard.html +++ b/packages/manager/apps/hub/src/dashboard/dashboard.html @@ -16,16 +16,16 @@ > + + + + + + + +