diff --git a/packages/manager/apps/cloud/client/app/app.js b/packages/manager/apps/cloud/client/app/app.js index d99483dd1311..027234fc5677 100644 --- a/packages/manager/apps/cloud/client/app/app.js +++ b/packages/manager/apps/cloud/client/app/app.js @@ -9,6 +9,7 @@ import { detach as detachPreloader } from '@ovh-ux/manager-preloader'; import ovhManagerCore from '@ovh-ux/manager-core'; import ngAtInternet from '@ovh-ux/ng-at-internet'; import ngAtInternetUiRouterPlugin from '@ovh-ux/ng-at-internet-ui-router-plugin'; +import ovhManagerAccountMigration from '@ovh-ux/manager-account-migration'; import ngOvhApiWrappers from '@ovh-ux/ng-ovh-api-wrappers'; import ngOvhBrowserAlert from '@ovh-ux/ng-ovh-browser-alert'; import ngOvhCheckboxTable from '@ovh-ux/ng-ovh-checkbox-table'; @@ -80,6 +81,7 @@ angular ngOvhUserPref, ngOvhUiRouterLayout, ngOvhUiRouterLineProgress, + ovhManagerAccountMigration, 'ovh-api-services', 'ovh-common-style', ngQAllSettled, diff --git a/packages/manager/apps/cloud/client/index.html b/packages/manager/apps/cloud/client/index.html index 74453f3c7d79..cc4b6e5bba2d 100644 --- a/packages/manager/apps/cloud/client/index.html +++ b/packages/manager/apps/cloud/client/index.html @@ -87,7 +87,7 @@ - + +

+ diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/autorenew-blocked.module.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/autorenew-blocked.module.js new file mode 100644 index 000000000000..27ab9512bcd3 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/autorenew-blocked.module.js @@ -0,0 +1,23 @@ +import angular from 'angular'; +import 'angular-translate'; +import atInternet from '@ovh-ux/ng-at-internet'; +import '@ovh-ux/ng-translate-async-loader'; +import '@ovh-ux/ui-kit'; + +import component from './autorenew-blocked.component'; +import routing from './autorenew-blocked.routing'; + +const moduleName = 'ovhManagerBillingAutorenewBlocked'; + +angular + .module(moduleName, [ + 'ui.router', + 'oui', + 'ngTranslateAsyncLoader', + 'pascalprecht.translate', + atInternet, + ]) + .config(routing) + .component('billingAutorenewBlocked', component); + +export default moduleName; diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/autorenew-blocked.routing.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/autorenew-blocked.routing.js new file mode 100644 index 000000000000..ba8d86bbb87e --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/autorenew-blocked.routing.js @@ -0,0 +1,25 @@ +export default /* @ngInject */ ($stateProvider) => { + $stateProvider.state( + 'app.account.billing.autorenew.configure-renew-impossible', + { + url: '/configure-renew-impossible', + views: { + modal: { + component: 'billingAutorenewBlocked', + }, + }, + layout: 'modal', + translations: { value: ['.'], format: 'json' }, + resolve: { + gotoContracts: /* @ngInject */ ($state, atInternet) => () => { + atInternet.trackClick({ + name: + 'dedicated::account::billing::autorenew::configure-renew-impossible::go-to-agreements', + type: 'action', + }); + return $state.go('app.account.billing.autorenew.agreements'); + }, + }, + }, + ); +}; diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_cs_CZ.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_cs_CZ.json new file mode 100644 index 000000000000..e68e7d7800d3 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_cs_CZ.json @@ -0,0 +1,5 @@ +{ + "autorenew_service_autorenew_blocked_title": "Konfigurace obnovení není dostupná", + "autorenew_service_autorenew_blocked_description": "U našich starých smluv již není automatické obnovení možné. Přečtěte si a přijměte nové smlouvy, abyste mohli automaticky obnovovat své produkty.", + "autorenew_service_autorenew_blocked_confirm": "Přečtěte si a přijměte nové VOP" +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_en_GB.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_en_GB.json new file mode 100644 index 000000000000..41346c5642c7 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_en_GB.json @@ -0,0 +1,5 @@ +{ + "autorenew_service_autorenew_blocked_title": "Renewal configuration unavailable", + "autorenew_service_autorenew_blocked_description": "Automatic renewal is no longer available for older contracts. Please read and accept the new contracts in order to renew your products automatically.", + "autorenew_service_autorenew_blocked_confirm": "Read and accept the new General Terms & Conditions" +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_fi_FI.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_fi_FI.json new file mode 100644 index 000000000000..9c130e987d41 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_fi_FI.json @@ -0,0 +1,5 @@ +{ + "autorenew_service_autorenew_blocked_title": "Uusimisen määrittely ei ole saatavilla", + "autorenew_service_autorenew_blocked_description": "Vanhojen sopimustemme automaattinen uusiminen ei ole enää mahdollista. Lue ja hyväksy uudet sopimukset, jotta voit uusia tuotteesi automaattisesti.", + "autorenew_service_autorenew_blocked_confirm": "Lue ja hyväksy uudet yleiset myyntiehdot" +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_fr_FR.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_fr_FR.json new file mode 100644 index 000000000000..cf210ac68388 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_fr_FR.json @@ -0,0 +1,5 @@ +{ + "autorenew_service_autorenew_blocked_title": "Configuration du renouvellement indisponible", + "autorenew_service_autorenew_blocked_description": "Le renouvellement automatique n'est plus possible sur nos anciens contrats. Veuillez lire et accepter les nouveaux contrats pour pouvoir renouveler vos produits automatiquement.", + "autorenew_service_autorenew_blocked_confirm": "Lire et accepter les nouvelles CGV" +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_lt_LT.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_lt_LT.json new file mode 100644 index 000000000000..1f2b2f78e16a --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_lt_LT.json @@ -0,0 +1,5 @@ +{ + "autorenew_service_autorenew_blocked_title": "Atnaujinimo konfigūracija negalima", + "autorenew_service_autorenew_blocked_description": "Pagal senas sutartis automatinis atnaujinimas nebeįmanomas. Perskaitykite ir sutikite su naujomis sutartimis, kad galėtumėte automatiškai atnaujinti savo gaminius.", + "autorenew_service_autorenew_blocked_confirm": "Perskaitykite ir priimkite naujas pardavimo sąlygas" +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/update/update.routing.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/update/update.routing.js index a559bc4d4398..a54e81670a64 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/update/update.routing.js +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/actions/update/update.routing.js @@ -2,6 +2,21 @@ export default /* @ngInject */ ($stateProvider) => { $stateProvider.state('app.account.billing.autorenew.update', { url: '/update?serviceId&serviceType', component: 'billingAutorenewUpdate', + redirectTo: (transition) => + transition + .injector() + .getAsync('accountMigrationService') + .then((accountMigrationService) => + accountMigrationService.getMigrationDates(), + ) + .then((migrationDates) => { + if (migrationDates) { + return moment().isBefore(moment(migrationDates.START, 'MM/DD/YYYY')) + ? null + : 'app.account.billing.autorenew.configure-renew-impossible'; + } + return null; + }), translations: { value: ['.'], format: 'json' }, resolve: { addPaymentMean: /* @ngInject */ ($state) => () => diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/details/details.routing.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/details/details.routing.js index 56f4d8a211ea..6995f5abbf3f 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/details/details.routing.js +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/details/details.routing.js @@ -7,10 +7,13 @@ export default /* @ngInject */ ( ) => { if (coreConfigProvider.isRegion(['EU', 'CA'])) { $stateProvider.state('app.account.billing.autorenew.agreements.agreement', { - url: '/details/:id', + url: '/details/{id:int}', template, controller: 'UserAccount.controllers.agreements.details', controllerAs: 'ctrl', + resolve: { + agreementId: /* @ngInject */ ($transition$) => $transition$.params().id, + }, }); // ensure compatibility with links sended by emails diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/details/user-agreements-details.controller.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/details/user-agreements-details.controller.js index f61031220a00..83ac02c1dfa4 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/details/user-agreements-details.controller.js +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/details/user-agreements-details.controller.js @@ -4,19 +4,19 @@ import get from 'lodash/get'; angular .module('UserAccount') .controller('UserAccount.controllers.agreements.details', [ - '$stateParams', '$q', - 'UserAccount.services.agreements', + 'UserAccountServicesAgreements', 'Alerter', + 'agreementId', '$translate', 'User', 'GDPR_AGREEMENTS_INFOS', 'AGREEMENT_GENERIC_MORE_INFORMATIONS_URL', function UserAccountAgreementsDtailsController( - $stateParams, $q, Service, Alerter, + agreementId, $translate, User, GDPR_AGREEMENTS_INFOS, @@ -31,8 +31,8 @@ angular this.alreadyAccepted = false; $q.all([ - Service.getAgreement($stateParams.id), - Service.getContract($stateParams.id), + Service.getAgreement(agreementId), + Service.getContract(agreementId), User.getUser(), ]) .then(([agreement, contract, user]) => { @@ -66,7 +66,10 @@ angular }; this.accept = () => { - Service.accept($stateParams.id) + Service.accept({ + ...this.agreement, + ...this.contract, + }) .then(() => { this.accepted = true; Alerter.success( diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.component.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.component.js new file mode 100644 index 000000000000..114d2b6c0e31 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.component.js @@ -0,0 +1,11 @@ +import controller from './popup-agreement.controller'; +import template from './popup-agreement.html'; + +export default { + bindings: { + agreements: '<', + goBack: '<', + }, + controller, + template, +}; diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.controller.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.controller.js new file mode 100644 index 000000000000..ed70f16b57c6 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.controller.js @@ -0,0 +1,54 @@ +import get from 'lodash/get'; + +export default class { + /* @ngInject */ + constructor( + $translate, + accountMigrationService, + atInternet, + UserAccountServicesAgreements, + ) { + this.$translate = $translate; + this.accountMigrationService = accountMigrationService; + this.atInternet = atInternet; + this.UserAccountServicesAgreements = UserAccountServicesAgreements; + } + + $onInit() { + this.currentAgreementIndex = 0; + this.currentAgreement = this.agreements[this.currentAgreementIndex]; + this.AgreementUnderProcess = false; + } + + acceptAndNext() { + if (this.currentAgreementIndex === this.agreements.length - 1) { + this.atInternet.trackClick({ + name: + 'dedicated::account::billing::autorenew::agreements::popup-agreement::accept-all', + type: 'action', + }); + } + this.AgreementUnderProcess = true; + this.UserAccountServicesAgreements.accept(this.currentAgreement) + .then(() => { + if (this.currentAgreementIndex !== this.agreements.length - 1) { + this.currentAgreementIndex += 1; + this.currentAgreement = this.agreements[this.currentAgreementIndex]; + this.AgreementUnderProcess = false; + } else { + this.accountMigrationService.refreshMigrationDetails().then(() => { + this.goBack(false, 'success', true); + }); + } + }) + .catch((error) => + this.goBack( + this.$translate.instant('user_agreements_accept_all_error', { + message: get(error, 'data.message'), + }), + 'danger', + true, + ), + ); + } +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.html b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.html new file mode 100644 index 000000000000..33a193800674 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.html @@ -0,0 +1,52 @@ + + +

+ +
+ + +
+
diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.module.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.module.js new file mode 100644 index 000000000000..c01d1fb0e3b5 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.module.js @@ -0,0 +1,23 @@ +import angular from 'angular'; +import 'angular-translate'; +import atInternet from '@ovh-ux/ng-at-internet'; +import '@ovh-ux/ng-translate-async-loader'; +import '@ovh-ux/ui-kit'; + +import component from './popup-agreement.component'; +import routing from './popup-agreement.routes'; + +const moduleName = 'ovhManagerBillingAutorenewActivation'; + +angular + .module(moduleName, [ + 'ngTranslateAsyncLoader', + 'oui', + 'pascalprecht.translate', + 'ui.router', + atInternet, + ]) + .config(routing) + .component('billingAutorenewActivation', component); + +export default moduleName; diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.routes.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.routes.js new file mode 100644 index 000000000000..1033982ee835 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.routes.js @@ -0,0 +1,54 @@ +import head from 'lodash/head'; + +export default /* @ngInject */ ($stateProvider) => { + $stateProvider.state( + 'app.account.billing.autorenew.agreements.popup-agreement', + { + url: '/popup-agreement', + views: { + modal: { + component: 'billingAutorenewActivation', + }, + }, + params: { + agreements: null, + }, + layout: 'modal', + translations: { value: ['.'], format: 'json' }, + resolve: { + activateAutorenew: /* @ngInject */ (BillingAutoRenew, nicRenew) => () => + BillingAutoRenew.enableAutorenew(head(nicRenew.renewDays)), + agreements: /* @ngInject */ ($transition$) => + $transition$.params().agreements, + goBack: /* @ngInject */ ($state, $timeout, Alerter) => ( + message = false, + type = 'success', + reload = false, + ) => { + const promise = $state.go( + 'app.account.billing.autorenew.agreements', + {}, + { + reload, + }, + ); + + if (message) { + promise.then(() => + $timeout(() => + Alerter.set( + `alert-${type}`, + message, + null, + 'agreements_alerter', + ), + ), + ); + } + + return promise; + }, + }, + }, + ); +}; diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_cs_CZ.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_cs_CZ.json new file mode 100644 index 000000000000..434a3a296cf5 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_cs_CZ.json @@ -0,0 +1,7 @@ +{ + "user_agreements_accept_all_count": "Smlouva {{current}}/{{total}}", + "user_agreements_accept_all_accept_and_next": "Přijmout a přejít na další", + "user_agreements_accept_all_read_and_accepted": "Přečetl(a) jsem a přijímám {{contractTitle}}", + "user_agreements_accept_all_annexes": "Chcete-li nahlédnout do příloh, které jsou nedílnou součástí smlouvy (zejména všeobecné obchodní podmínky, zvláštní podmínky, dodatek ke zpracování osobních údajů), klikněte na tento odkaz", + "user_agreements_accept_all_error": "Při zpracování smlouvy došlo k chybě: {{message}}" +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_en_GB.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_en_GB.json new file mode 100644 index 000000000000..c5988a47760e --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_en_GB.json @@ -0,0 +1,7 @@ +{ + "user_agreements_accept_all_count": "Contract {{current}}/{{total}}", + "user_agreements_accept_all_accept_and_next": "Accept and continue", + "user_agreements_accept_all_read_and_accepted": "I have read and accepted {{contractTitle}}", + "user_agreements_accept_all_annexes": "To read the appendices, which are an integral part of the contract (namely the General Conditions, Special Conditions, and the Data Processing Agreement (DPA)), click here", + "user_agreements_accept_all_error": "An error has occurred processing the contract: {{message}}" +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_fi_FI.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_fi_FI.json new file mode 100644 index 000000000000..1288ad6df5c9 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_fi_FI.json @@ -0,0 +1,7 @@ +{ + "user_agreements_accept_all_count": "Sopimus {{current}}/{{total}}", + "user_agreements_accept_all_accept_and_next": "Hyväksy ja siirry seuraavaan", + "user_agreements_accept_all_read_and_accepted": "Olen lukenut ja hyväksyn sopimuksen {{contractTitle}}", + "user_agreements_accept_all_annexes": "Tutustu liitteisiin, jotka muodostavat olennaisen osan sopimuksesta (yleiset ehdot, erityiset ehdot, liite henkilötietojen käsittelystä), napsauttamalla tätä linkkiä", + "user_agreements_accept_all_error": "Sopimuksen käsittelyssä tapahtui virhe: {{message}}" +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_fr_FR.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_fr_FR.json new file mode 100644 index 000000000000..15386633d567 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_fr_FR.json @@ -0,0 +1,7 @@ +{ + "user_agreements_accept_all_count": "Contrat {{current}}/{{total}}", + "user_agreements_accept_all_accept_and_next": "Accepter et passer au suivant", + "user_agreements_accept_all_read_and_accepted": "J'ai lu et j'accepte {{contractTitle}}", + "user_agreements_accept_all_annexes": "Pour consulter les annexes, partie intégrante du contrat (notamment les Conditions Générales, Conditions Particulières, l'annexe Traitement de données a caractère personnel (DPA)), consulter ce lien", + "user_agreements_accept_all_error": "Une erreur s'est produite lors du traitement du contrat: {{message}}" +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_lt_LT.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_lt_LT.json new file mode 100644 index 000000000000..bf34d737570b --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/translations/Messages_lt_LT.json @@ -0,0 +1,7 @@ +{ + "user_agreements_accept_all_count": "Sutartis {{current}}/{{total}}", + "user_agreements_accept_all_accept_and_next": "Sutikti ir pereiti prie kito", + "user_agreements_accept_all_read_and_accepted": "Aš perskaičiau ir sutinku su {{contractTitle}}", + "user_agreements_accept_all_annexes": "Norėdami susipažinti su priedais, kurie yra neatsiejama sutarties dalimi (ypač Bendrosios sąlygos, Specialiosios sąlygos, Asmens duomenų tvarkymo priedas (DPA)), žiūrėkite šią nuorodą ", + "user_agreements_accept_all_error": "Apdorojant sutartį įvyko klaida: {{message}}" +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_cs_CZ.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_cs_CZ.json new file mode 100644 index 000000000000..c731d8a3b308 --- /dev/null +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_cs_CZ.json @@ -0,0 +1,49 @@ +{ + "user_agreements_title": "Moje smlouvy", + "user_agreements_list_title": "Seznam smluv", + "user_agreements_name": "Název", + "user_agreements_status": "Stav", + "user_agreements_status_KO": "Ke schválení", + "user_agreements_status_OBSOLETE": "Zastaralé", + "user_agreements_status_OK": "Platné", + "user_agreements_status_TODO": "Ke schválení", + "user_agreements_date": "Datum", + "user_agreements_table_empty": "Žádná smlouva k zobrazení", + "user_agreements_error": "Při načítání informací došlo k chybě.", + "user_agreements_to_validate": "Moje smlouvy ke schválení", + "user_agreements_agreed": "Přečetl(a) jsem a přijímám \"{{t0}}\"", + "user_agreements_accept": "Přijmout", + "user_agreements_accept_all": "Přijmout všechny smlouvy", + "user_agreements_accept_title": "{{t0}}: přijmout smlouvu", + "user_agreements_accepting": "Probíhá…", + "user_agreements_download_pdf": "Stáhnout", + "user_agreements_download_pdf_title": "{{t0}}: stáhnout ve formátu pdf", + "user_agreements_alert_close": "Zavřít upozornění", + "user_agreement_GDPR_title": "Obecné nařízení o ochraně údajů", + "user_agreement_GDPR_helper_text": "Další informace o nových předpisech naleznete v naší příloze ke zpracování osobních údajů .", + "user_agreement_details_accept": "Přijmout", + "user_agreement_details_return": "Zpět k mým smlouvám", + "user_agreement_details_title": "Podrobnosti smlouvy", + "user_agreement_details_agreed": "Přečetl(a) jsem a přijímám \"{{t0}}\"", + "user_agreement_details_title1": "Změna všeobecných obchodních podmínek", + "user_agreement_details_subtitle1": "Všeobecné obchodní podmínky OVH se mění!", + "user_agreement_details_paragraph1": "Prostřednictvím této změny sledujeme čtyři hlavní cíle:", + "user_agreement_details_paragraph1_point1": "Zohlednit změny v předpisech, zejména pokud jde o spotřebitelské právo, závazkové právo a ochranu osobních údajů;", + "user_agreement_details_paragraph1_point2": "Poskytnout odpovědi na vaše žádosti a dotazy;", + "user_agreement_details_paragraph1_point3": "Upřesnit náš způsob fungování a naši organizaci v souvislosti s internacionalizací našich aktivit;", + "user_agreement_details_paragraph1_point4": "Zlepšit čitelnost dokumentu.", + "user_agreement_details_subtitle2": "Mezi provedenými změnami si všimnete:", + "user_agreement_details_paragraph2_point1": "Vytvoření článku, který seskupuje všechna ustanovení platná pro spotřebitele, tj. klienty využívající naše služby v neprofesionálním kontextu, jako je právo na odstoupení od smlouvy nebo mediační řízení (článek 12);", + "user_agreement_details_paragraph2_point2": "Náš závazek vás upozornit minimálně 30 dní před jakoukoli změnou, která by mohla zhoršit vaše podmínky služby (článek 3.8);", + "user_agreement_details_paragraph2_point3": "Připomínáme, že každý klient zůstává vlastníkem obsahu (dat, informací atd.), který hostuje v rámci našich služeb (článek 3.9);", + "user_agreement_details_paragraph2_point4": "Vyjasnění oblastí odpovědnosti každé ze stran, zejména s ohledem na třetí strany, a podmínek, za kterých může být společnost OVH odpovědná (článek 6);", + "user_agreement_details_paragraph2_point5": "Posílení závazků společnosti OVH v oblasti bezpečnosti a ochrany osobních údajů, zejména v souvislosti s novými obecným nařízením o ochraně údajů (článek 8);", + "user_agreement_details_paragraph2_point6": "Náš závazek neměnit, v závislosti na typu služby, dohodnuté umístění nebo geografické zóny datových center, ve kterých hostujete svůj obsah (článek 8.2.3);", + "user_agreement_details_paragraph2_point7": "Náš závazek nezajišťovat externě mimo skupinu OVH služby zahrnující přístup k datům, které ukládáte v rámci našich služeb, bez vašeho souhlasu nebo v rozporu s ustanovením příslušných zvláštních podmínek služby (článek 2);", + "user_agreement_details_paragraph2_point8": "Posílení povinností ohledně zachování důvěrnosti (články 9).", + "user_agreement_details_subtitle3": "Připomenutí klientům z řad spotřebitelů", + "user_agreement_details_paragraph3": "Pokud si nepřejete, aby se na vás vztahovala tato nová ustanovení, máte možnost ukončit vámi využívané služby od 20. července 2017 do maximálně 4 měsíců v souladu s článkem L224-33 francouzského zákonu o ochraně spotřebitele. Chcete-li to provést, vytvořte lístek ze svého klientského účtu a do předmětu uveďte: „Ukončení mých služeb“ a požadovaný čas ukončení (okamžitě nebo v den obnovení služeb).", + "user_agreement_details_success": "Vaše smlouva byla validována.", + "user_agreement_details_error": "Při schvalování vaší smlouvy došlo k chybě.", + "user_agreement_appendices": "Chcete-li nahlédnout do příloh, které jsou nedílnou součástí smlouvy (zejména všeobecné obchodní podmínky, zvláštní podmínky, dodatek ke zpracování osobních údajů), klikněte na tento odkaz." +} diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_en_GB.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_en_GB.json index 39b0f452be89..9a06b9833e68 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_en_GB.json +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_en_GB.json @@ -1,5 +1,4 @@ { - "user_agreement_appendices": "To consult the annexes, which are an integral part of the Contract (in particular the General Conditions, Specific Conditions, the Annex Data Prccessing Agreement (DPA), consult this link.", "user_agreements_title": "My contracts", "user_agreements_list_title": "Contract list", "user_agreements_name": "Name", @@ -9,40 +8,42 @@ "user_agreements_status_OK": "Confirmed", "user_agreements_status_TODO": "To confirm", "user_agreements_date": "Date", - "user_agreements_table_empty": "No contracts to display", + "user_agreements_table_empty": "No contract to display", "user_agreements_error": "An error has occurred loading the information.", - "user_agreements_to_validate": "My contracts to accept", - "user_agreements_agreed": "I have read and I accept \"{{t0}}\"", + "user_agreements_to_validate": "My contracts to confirm", + "user_agreements_agreed": "I have read and accepted \"{{t0}}\"", "user_agreements_accept": "Accept", + "user_agreements_accept_all": "Accept all contracts", "user_agreements_accept_title": "{{t0}}: accept contract", - "user_agreements_accepting": "In progress", + "user_agreements_accepting": "In progress...", "user_agreements_download_pdf": "Download", - "user_agreements_download_pdf_title": "{{t0}}: download in PDF format", + "user_agreements_download_pdf_title": "{{t0}}: Download in PDF format", "user_agreements_alert_close": "Close alert", "user_agreement_GDPR_title": "General Data Protection Regulation", "user_agreement_GDPR_helper_text": "For more information regarding this new regulation, please read our Appendix related to personal data processing.", "user_agreement_details_accept": "Accept", "user_agreement_details_return": "Go back to my contracts ", "user_agreement_details_title": "Contract details", - "user_agreement_details_agreed": "I have read and I accept \"{{t0}}\"", - "user_agreement_details_title1": "Change of general terms of service ", - "user_agreement_details_subtitle1": "OVH’s General Terms and Conditions of Service are changing.", + "user_agreement_details_agreed": "I have read and accepted \"{{t0}}\"", + "user_agreement_details_title1": "Change of General Terms of Service", + "user_agreement_details_subtitle1": "The OVHcloud General Terms of Service are changing!", "user_agreement_details_paragraph1": "With these changes, we aim to achieve four main objectives:", - "user_agreement_details_paragraph1_point1": "To adapt to changes in legislation, in particular with regard to consumer law, contract law and the protection of personal data.", - "user_agreement_details_paragraph1_point2": "Provide answers to your requests and questions.", + "user_agreement_details_paragraph1_point1": "Adapt to changes in legislation, particularly with regard to consumer law, contract law and personal data protection.", + "user_agreement_details_paragraph1_point2": "Provide answers to your questions and requests.", "user_agreement_details_paragraph1_point3": "Explain our working practices and our organisation, as our business develops internationally.", "user_agreement_details_paragraph1_point4": "Improve the document’s readability.", "user_agreement_details_subtitle2": "These changes include:", - "user_agreement_details_paragraph2_point1": "The creation of an article that includes all clauses applicable to consumers - i.e. customers using our services for non-professional purposes. For example, it includes the right to withdraw, and the mediation process (article 12).", - "user_agreement_details_paragraph2_point2": "Our commitment to providing you with at least 30 days’ notice before making any changes that are likely to reduce the quality of your service’s conditions (article 3.8).", - "user_agreement_details_paragraph2_point3": "A reminder that each customer remains the owner of content (data, information, etc.) that they host using our services (article 3.9).", - "user_agreement_details_paragraph2_point4": "A clarification of the scope of each person’s responsibility, namely regarding third parties, as well as the conditions under which the liability of OVH may be invoked (article 6).", - "user_agreement_details_paragraph2_point5": "A strengthening of OVH commitments in relation to data protection and security, especially in the context of the GDPR, the new General Data Protection Regulation on personal data (article 8).", - "user_agreement_details_paragraph2_point6": "Our commitment not to change the location or geographical region of the datacentres in which you have chosen to host your data, depending on the type of service used (article 8.2.3).", - "user_agreement_details_paragraph2_point7": "Our commitment not to subcontract any services outside of OVH that would involve accessing the data you store using our Services, unless we receive your express agreement, or if otherwise specified in the applicable Terms of Service (article 2).", - "user_agreement_details_paragraph2_point8": "A strengthening of our confidentiality obligations (article 9).", + "user_agreement_details_paragraph2_point1": "The creation of an article that includes all clauses applicable to consumers - i.e. customers using our services for non-professional purposes. For example, it includes the right to withdraw, and the mediation process (article 12).", + "user_agreement_details_paragraph2_point2": "Our commitment to providing you with at least 30 days’ notice before making any changes that are likely to reduce the quality of your service’s conditions (article 3.8).", + "user_agreement_details_paragraph2_point3": "A reminder that each customer remains the owner of content (data, information, etc.) that they host using our services (article 3.9).", + "user_agreement_details_paragraph2_point4": "A clarification of the scope of each person’s responsibility, namely regarding third parties, as well as the conditions under which the liability of OVHcloud may be invoked (article 6).", + "user_agreement_details_paragraph2_point5": "A strengthening of OVHcloud’s commitments in relation to data protection and security, especially in the context of the GDPR, the new General Data Protection Regulation on personal data (article 8).", + "user_agreement_details_paragraph2_point6": "Our commitment not to change the location or geographical region of the datacentres in which you have chosen to host your data, depending on the type of service used (article 8.2.3).", + "user_agreement_details_paragraph2_point7": "Our commitment not to subcontract any services outside of OVHcloud that would involve accessing the data you store using our Services, unless we receive your express agreement, or if otherwise specified in the applicable Terms of Service (article 2).", + "user_agreement_details_paragraph2_point8": "A strengthening of our confidentiality obligations (article 9).", "user_agreement_details_subtitle3": "Notice to customers ", - "user_agreement_details_paragraph3": "If you do not wish to be subject to these new changes, you can cancel the services you are currently using from 20 July 2017 within a maximum period of 4 months, in accordance with article L224-4 of the French consumer code. To do this, please create a ticket via the OVH Control Panel, with the following as a subject: “Cancellation of my services”, as well as an indication of when you would like your services to be cancelled (immediately or on the renewal date).", - "user_agreement_details_success": "Your contract has been approved.", - "user_agreement_details_error": "An error has occurred accepting your contract." + "user_agreement_details_paragraph3": "If you do not wish to be subject to these new changes, you can cancel the services you are currently using from 20th July 2017, within a maximum period of 4 months, in accordance with article L224-4 of the French consumer code. To do this, open a ticket via the OVHcloud Control Panel with the following subject: “Cancel my services”, as well as the time you would like to cancel (immediately, or on your service’s renewal date).", + "user_agreement_details_success": "Your contract has been confirmed.", + "user_agreement_details_error": "An error has occurred confirming the contract. ", + "user_agreement_appendices": "To read the appendices, which are an integral part of the contract (namely the General Conditions, Special Conditions, and the Data Processing Agreement (DPA)), click here." } diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_fi_FI.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_fi_FI.json index 39b0f452be89..f114786c2d1f 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_fi_FI.json +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_fi_FI.json @@ -1,48 +1,49 @@ { - "user_agreement_appendices": "To consult the annexes, which are an integral part of the Contract (in particular the General Conditions, Specific Conditions, the Annex Data Prccessing Agreement (DPA), consult this link.", - "user_agreements_title": "My contracts", - "user_agreements_list_title": "Contract list", - "user_agreements_name": "Name", - "user_agreements_status": "Status", - "user_agreements_status_KO": "To confirm", - "user_agreements_status_OBSOLETE": "Obsolete", - "user_agreements_status_OK": "Confirmed", - "user_agreements_status_TODO": "To confirm", - "user_agreements_date": "Date", - "user_agreements_table_empty": "No contracts to display", - "user_agreements_error": "An error has occurred loading the information.", - "user_agreements_to_validate": "My contracts to accept", - "user_agreements_agreed": "I have read and I accept \"{{t0}}\"", - "user_agreements_accept": "Accept", - "user_agreements_accept_title": "{{t0}}: accept contract", - "user_agreements_accepting": "In progress", - "user_agreements_download_pdf": "Download", - "user_agreements_download_pdf_title": "{{t0}}: download in PDF format", - "user_agreements_alert_close": "Close alert", - "user_agreement_GDPR_title": "General Data Protection Regulation", - "user_agreement_GDPR_helper_text": "For more information regarding this new regulation, please read our Appendix related to personal data processing.", - "user_agreement_details_accept": "Accept", - "user_agreement_details_return": "Go back to my contracts ", - "user_agreement_details_title": "Contract details", - "user_agreement_details_agreed": "I have read and I accept \"{{t0}}\"", - "user_agreement_details_title1": "Change of general terms of service ", - "user_agreement_details_subtitle1": "OVH’s General Terms and Conditions of Service are changing.", - "user_agreement_details_paragraph1": "With these changes, we aim to achieve four main objectives:", - "user_agreement_details_paragraph1_point1": "To adapt to changes in legislation, in particular with regard to consumer law, contract law and the protection of personal data.", - "user_agreement_details_paragraph1_point2": "Provide answers to your requests and questions.", - "user_agreement_details_paragraph1_point3": "Explain our working practices and our organisation, as our business develops internationally.", - "user_agreement_details_paragraph1_point4": "Improve the document’s readability.", - "user_agreement_details_subtitle2": "These changes include:", - "user_agreement_details_paragraph2_point1": "The creation of an article that includes all clauses applicable to consumers - i.e. customers using our services for non-professional purposes. For example, it includes the right to withdraw, and the mediation process (article 12).", - "user_agreement_details_paragraph2_point2": "Our commitment to providing you with at least 30 days’ notice before making any changes that are likely to reduce the quality of your service’s conditions (article 3.8).", - "user_agreement_details_paragraph2_point3": "A reminder that each customer remains the owner of content (data, information, etc.) that they host using our services (article 3.9).", - "user_agreement_details_paragraph2_point4": "A clarification of the scope of each person’s responsibility, namely regarding third parties, as well as the conditions under which the liability of OVH may be invoked (article 6).", - "user_agreement_details_paragraph2_point5": "A strengthening of OVH commitments in relation to data protection and security, especially in the context of the GDPR, the new General Data Protection Regulation on personal data (article 8).", - "user_agreement_details_paragraph2_point6": "Our commitment not to change the location or geographical region of the datacentres in which you have chosen to host your data, depending on the type of service used (article 8.2.3).", - "user_agreement_details_paragraph2_point7": "Our commitment not to subcontract any services outside of OVH that would involve accessing the data you store using our Services, unless we receive your express agreement, or if otherwise specified in the applicable Terms of Service (article 2).", - "user_agreement_details_paragraph2_point8": "A strengthening of our confidentiality obligations (article 9).", - "user_agreement_details_subtitle3": "Notice to customers ", - "user_agreement_details_paragraph3": "If you do not wish to be subject to these new changes, you can cancel the services you are currently using from 20 July 2017 within a maximum period of 4 months, in accordance with article L224-4 of the French consumer code. To do this, please create a ticket via the OVH Control Panel, with the following as a subject: “Cancellation of my services”, as well as an indication of when you would like your services to be cancelled (immediately or on the renewal date).", - "user_agreement_details_success": "Your contract has been approved.", - "user_agreement_details_error": "An error has occurred accepting your contract." + "user_agreements_title": "Omat sopimukset", + "user_agreements_list_title": "Luettelo sopimuksista", + "user_agreements_name": "Nimi", + "user_agreements_status": "Tila", + "user_agreements_status_KO": "Vahvistettava", + "user_agreements_status_OBSOLETE": "Vanhentunut", + "user_agreements_status_OK": "Vahvistettu", + "user_agreements_status_TODO": "Vahvistettava", + "user_agreements_date": "Päivämäärä", + "user_agreements_table_empty": "Ei näytettäviä sopimuksia", + "user_agreements_error": "Tietoja ladattaessa tapahtui virhe.", + "user_agreements_to_validate": "Omat vahvistettavat sopimukset", + "user_agreements_agreed": "Olen lukenut ja vahvistan sopimuksen \"{{t0}}\"", + "user_agreements_accept": "Hyväksy", + "user_agreements_accept_all": "Hyväksy kaikki sopimukset", + "user_agreements_accept_title": "{{t0}}: hyväksy sopimus", + "user_agreements_accepting": "Käynnissä...", + "user_agreements_download_pdf": "Lataa", + "user_agreements_download_pdf_title": "{{t0}}: lataa PDF-muodossa", + "user_agreements_alert_close": "Sulje ilmoitus", + "user_agreement_GDPR_title": "Yleinen tietosuoja-asetus", + "user_agreement_GDPR_helper_text": "Jos haluat lisätietoa uudesta asetuksesta, tutustu liitteeseemme henkilötietojen käsittelystä", + "user_agreement_details_accept": "Hyväksy", + "user_agreement_details_return": "Takaisin omiin sopimuksiin", + "user_agreement_details_title": "Sopimustiedot", + "user_agreement_details_agreed": "Olen lukenut ja vahvistan sopimuksen \"{{t0}}\"", + "user_agreement_details_title1": "Palvelun yleisten ehtojen muutos", + "user_agreement_details_subtitle1": "OVH:n yleiset ehdot muuttuvat!", + "user_agreement_details_paragraph1": "Haluamme saavuttaa tällä muutoksella neljä tärkeintä tavoitetta:", + "user_agreement_details_paragraph1_point1": "Lainsäädännön muutosten, etenkin kuluttajalainsäädäntöön, velvoiteoikeuteen sekä henkilötietojen suojeluun tehtyjen muutosten huomiointi", + "user_agreement_details_paragraph1_point2": "Huomautuksiin ja tiedusteluihin vastaaminen", + "user_agreement_details_paragraph1_point3": "Toimintatapojemme ja organisaatiomme täsmentäminen toimintojemme kansainvälistymisen puitteissa", + "user_agreement_details_paragraph1_point4": "Asiakirjan luettavuuden parantaminen.", + "user_agreement_details_subtitle2": "Toteutettuja muutoksia ovat muun muassa seuraavat:", + "user_agreement_details_paragraph2_point1": "Olemme luoneet pykälän, joka kokoaa yhteen kuluttajiin – eli palvelujamme muihin kuin ammattiin liittyviin tarkoituksiin käyttäviin – liittyvät ehdot, esimerkiksi peruutusoikeuden tai välitysmenettelyt (pykälä 12)", + "user_agreement_details_paragraph2_point2": "Sitoudumme ilmoittamaan sinulle vähintään 30 päivää etukäteen kaikista muutoksista, jotka saattavat heikentää palvelujesi ehtoja (pykälä 3.8)", + "user_agreement_details_paragraph2_point3": "Muistutus siitä, että jokainen asiakas omistaa palveluissamme säilyttämänsä sisällön (datan, tiedot jne.) (pykälä 3.9)", + "user_agreement_details_paragraph2_point4": "Täsmennys kaikkien vastuista, etenkin kolmansiin osapuoliin nähden, sekä olosuhteista, joissa OVH:n vastuuvelvollisuutta voidaan soveltaa (pykälä 6)", + "user_agreement_details_paragraph2_point5": "OVH:n sitoumusten lujittaminen tietojen suojelussa etenkin uuden yleisen tietosuoja-asetuksen edellyttämällä tavalla (pykälä 8)", + "user_agreement_details_paragraph2_point6": "Sitoumuksemme olla muuttamatta, palvelun tyypin mukaan, sisältöjesi säilyttämiseen käyttämiesi datakeskusten sijaintia tai maantieteellistä aluetta (pykälä 8.2.3)", + "user_agreement_details_paragraph2_point7": "Sitoutuksemme olla hankkimatta alihankintana OVH-konsernin ulkopuolelta suorituksia, joihin liittyy pääsy palveluissamme säilyttämääsi dataan, ellet ole antanut suostumustasi tai elleivät sovellettavat palvelujen erityiset ehdot sitä edellytä (pykälä 2)", + "user_agreement_details_paragraph2_point8": "Luottamuksellisuuteen liittyvien velvoitteiden vahvistaminen (pykälä 9).", + "user_agreement_details_subtitle3": "Muistutus kuluttaja-asiakkaille", + "user_agreement_details_paragraph3": "Ellet halua sitoutua näihin uusiin ehtoihin, sinulla on enintään 4 kuukautta aikaa irtisanoa palvelusi, jotka ovat olleet käytössä 20.7.2017 alkaen, Ranskan kuluttajainsuojalain artiklan L224-33 nojalla. Voit tehdä niin luomalla tiketin eli palvelupyynnön omilla asiakassivuillasi ja ilmoittamalla aiheeksi: ”Palvelujen irtisanominen” sekä kertomalla, milloin haluat irtisanomisen tulevan voimaan (välittömästi vai palvelujen uusimisen päivänä).", + "user_agreement_details_success": "Sopimuksesi vahvistaminen onnistui.", + "user_agreement_details_error": "Sopimuksesi hyväksynnässä tapahtui virhe.", + "user_agreement_appendices": "Tutustu liitteisiin, jotka muodostavat olennaisen osan sopimuksesta (yleiset ehdot, erityiset ehdot, liite henkilötietojen käsittelystä), napsauttamalla tätä linkkiä." } diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_fr_FR.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_fr_FR.json index a1d9956163d6..95583211ffa5 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_fr_FR.json +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_fr_FR.json @@ -13,6 +13,7 @@ "user_agreements_to_validate": "Mes contrats à valider", "user_agreements_agreed": "J'ai lu et j'accepte \"{{t0}}\"", "user_agreements_accept": "Accepter", + "user_agreements_accept_all": "Accepter tous les contrats", "user_agreements_accept_title": "{{t0}} : accepter le contrat", "user_agreements_accepting": "En cours...", "user_agreements_download_pdf": "Télécharger", diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_lt_LT.json b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_lt_LT.json index 39b0f452be89..cd72e7f404ee 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_lt_LT.json +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/translations/Messages_lt_LT.json @@ -1,48 +1,49 @@ { - "user_agreement_appendices": "To consult the annexes, which are an integral part of the Contract (in particular the General Conditions, Specific Conditions, the Annex Data Prccessing Agreement (DPA), consult this link.", - "user_agreements_title": "My contracts", - "user_agreements_list_title": "Contract list", - "user_agreements_name": "Name", - "user_agreements_status": "Status", - "user_agreements_status_KO": "To confirm", - "user_agreements_status_OBSOLETE": "Obsolete", - "user_agreements_status_OK": "Confirmed", - "user_agreements_status_TODO": "To confirm", - "user_agreements_date": "Date", - "user_agreements_table_empty": "No contracts to display", - "user_agreements_error": "An error has occurred loading the information.", - "user_agreements_to_validate": "My contracts to accept", - "user_agreements_agreed": "I have read and I accept \"{{t0}}\"", - "user_agreements_accept": "Accept", - "user_agreements_accept_title": "{{t0}}: accept contract", - "user_agreements_accepting": "In progress", - "user_agreements_download_pdf": "Download", - "user_agreements_download_pdf_title": "{{t0}}: download in PDF format", - "user_agreements_alert_close": "Close alert", - "user_agreement_GDPR_title": "General Data Protection Regulation", - "user_agreement_GDPR_helper_text": "For more information regarding this new regulation, please read our Appendix related to personal data processing.", - "user_agreement_details_accept": "Accept", - "user_agreement_details_return": "Go back to my contracts ", - "user_agreement_details_title": "Contract details", - "user_agreement_details_agreed": "I have read and I accept \"{{t0}}\"", - "user_agreement_details_title1": "Change of general terms of service ", - "user_agreement_details_subtitle1": "OVH’s General Terms and Conditions of Service are changing.", - "user_agreement_details_paragraph1": "With these changes, we aim to achieve four main objectives:", - "user_agreement_details_paragraph1_point1": "To adapt to changes in legislation, in particular with regard to consumer law, contract law and the protection of personal data.", - "user_agreement_details_paragraph1_point2": "Provide answers to your requests and questions.", - "user_agreement_details_paragraph1_point3": "Explain our working practices and our organisation, as our business develops internationally.", - "user_agreement_details_paragraph1_point4": "Improve the document’s readability.", - "user_agreement_details_subtitle2": "These changes include:", - "user_agreement_details_paragraph2_point1": "The creation of an article that includes all clauses applicable to consumers - i.e. customers using our services for non-professional purposes. For example, it includes the right to withdraw, and the mediation process (article 12).", - "user_agreement_details_paragraph2_point2": "Our commitment to providing you with at least 30 days’ notice before making any changes that are likely to reduce the quality of your service’s conditions (article 3.8).", - "user_agreement_details_paragraph2_point3": "A reminder that each customer remains the owner of content (data, information, etc.) that they host using our services (article 3.9).", - "user_agreement_details_paragraph2_point4": "A clarification of the scope of each person’s responsibility, namely regarding third parties, as well as the conditions under which the liability of OVH may be invoked (article 6).", - "user_agreement_details_paragraph2_point5": "A strengthening of OVH commitments in relation to data protection and security, especially in the context of the GDPR, the new General Data Protection Regulation on personal data (article 8).", - "user_agreement_details_paragraph2_point6": "Our commitment not to change the location or geographical region of the datacentres in which you have chosen to host your data, depending on the type of service used (article 8.2.3).", - "user_agreement_details_paragraph2_point7": "Our commitment not to subcontract any services outside of OVH that would involve accessing the data you store using our Services, unless we receive your express agreement, or if otherwise specified in the applicable Terms of Service (article 2).", - "user_agreement_details_paragraph2_point8": "A strengthening of our confidentiality obligations (article 9).", - "user_agreement_details_subtitle3": "Notice to customers ", - "user_agreement_details_paragraph3": "If you do not wish to be subject to these new changes, you can cancel the services you are currently using from 20 July 2017 within a maximum period of 4 months, in accordance with article L224-4 of the French consumer code. To do this, please create a ticket via the OVH Control Panel, with the following as a subject: “Cancellation of my services”, as well as an indication of when you would like your services to be cancelled (immediately or on the renewal date).", - "user_agreement_details_success": "Your contract has been approved.", - "user_agreement_details_error": "An error has occurred accepting your contract." + "user_agreements_title": "Mano sutartys", + "user_agreements_list_title": "Mano sutarčių sąrašas", + "user_agreements_name": "Pavardė", + "user_agreements_status": "Valstybė", + "user_agreements_status_KO": "Norėdami patvirtinti", + "user_agreements_status_OBSOLETE": "Pasenęs", + "user_agreements_status_OK": "Galioja", + "user_agreements_status_TODO": "Norėdami patvirtinti", + "user_agreements_date": "Data", + "user_agreements_table_empty": "Nėra rodomų sutarčių", + "user_agreements_error": "Įkeliant informaciją įvyko klaida.", + "user_agreements_to_validate": "Mano sutartys laukiančios patvirtinimo", + "user_agreements_agreed": "Aš perskaičiau ir sutinku \"{{t0}}\"", + "user_agreements_accept": "Sutikti", + "user_agreements_accept_all": "Priimti visas sutartis", + "user_agreements_accept_title": "{{t0}} : priimti sutartį", + "user_agreements_accepting": "Vykdoma ...", + "user_agreements_download_pdf": "Parsisiųsti", + "user_agreements_download_pdf_title": "{{t0}} : parsisiųsti pdf formatu", + "user_agreements_alert_close": "Uždaryti perspėjimą", + "user_agreement_GDPR_title": "Bendrosios asmens duomenų apsaugos taisyklės", + "user_agreement_GDPR_helper_text": "Norėdami gauti daugiau informacijos apie naujus reglamentus, skaitykite mūsų Priedą dėl asmens duomenų tvarkymo.", + "user_agreement_details_accept": "Sutikti", + "user_agreement_details_return": "Grįžti prie mano sutarčių", + "user_agreement_details_title": "Informacija apie sutartį", + "user_agreement_details_agreed": "Aš perskaičiau ir sutinku \"{{t0}}\"", + "user_agreement_details_title1": "Bendrųjų paslaugų sąlygų pakeitimas", + "user_agreement_details_subtitle1": "Keičiasi bendrosios OVH paslaugų teikimo sąlygos!", + "user_agreement_details_paragraph1": "Šiuo pakeitimu mes siekiame keturių pagrindinių tikslų:", + "user_agreement_details_paragraph1_point1": "Atsižvelgti į reglamentų pakeitimus, ypač susijusius su vartotojų teisėmis, prievolių įstatymais ir asmens duomenų apsauga;", + "user_agreement_details_paragraph1_point2": "Pateikti atsakymus į jūsų prašymus ir klausimus;", + "user_agreement_details_paragraph1_point3": "Nurodyti mūsų veikimo režimą ir organizaciją, atsižvelgiant į mūsų veiklos internacionalizaciją;", + "user_agreement_details_paragraph1_point4": "Pagerinti dokumento skaitomumą.", + "user_agreement_details_subtitle2": "Tarp atliktų pakeitimų pastebėsite:", + "user_agreement_details_paragraph2_point1": "Sukurtas skyrius, pergrupuojant visas vartotojams taikomas nuostatas, tai yra klientams, kurie naudojasi mūsų paslaugomis neprofesionaliai, pavyzdžiui, atsisakymo teisei ar tarpininkavimo procedūrai (12 straipsnis); ", + "user_agreement_details_paragraph2_point2": "Mes įsipareigojame pranešti jums bent prieš 30 dienų prieš bet kokius pakeitimus, kurie gali pakenkti jūsų paslaugų teikimo sąlygoms (3.8 straipsnis); ", + "user_agreement_details_paragraph2_point3": "Priminimas, kad kiekvienas klientas tebėra turinio (duomenų, informacijos ir pan.), kurį priima kaip mūsų paslaugų dalį, savininkas (3.9 straipsnis);", + "user_agreement_details_paragraph2_point4": "Kiekvieno atsakomybės srities, ypač susijusios su trečiosiomis šalimis, paaiškinimas ir sąlygos, kuriomis gali būti prisiimta OVH atsakomybė (6 straipsnis);", + "user_agreement_details_paragraph2_point5": "OVH įsipareigojimų saugumo ir duomenų apsaugos srityje sustiprinimas, ypač atsižvelgiant į naujus Bendruosius asmens duomenų apsaugos reglamentus (8 straipsnis);", + "user_agreement_details_paragraph2_point6": "Mūsų įsipareigojimas nekeisti, atsižvelgiant į paslaugos tipą, duomenų centrų, kuriuose talpinate savo turinį, vietą ar sutartą geografinę zoną (8.2.3 straipsnis);", + "user_agreement_details_paragraph2_point7": "Mūsų įsipareigojimas neteikti subrangos paslaugų, susijusių su prieiga prie duomenų, kuriuos saugote kaip mūsų paslaugų dalį, neperduodant subrangos sutarčių be jūsų sutikimo ar priešingų sąlygų, nurodytų galiojančiose specialiosiose paslaugų sąlygose (2 straipsnis);", + "user_agreement_details_paragraph2_point8": "Konfidencialumo įsipareigojimų griežtinimas (9 straipsnis).", + "user_agreement_details_subtitle3": "Priminimas vartotojams", + "user_agreement_details_paragraph3": "Jei nenorite, kad jums būtų taikomos šios naujos nuostatos, turite galimybę nutraukti savo teikiamas paslaugas nuo 2017 m. liepos 20 d. ne ilgiau kaip per 4 mėnesius, remiantis Prancūzijos kodekso L224-33 straipsniu. vartojimas. Norėdami tai padaryti, sukurkite bilietą savo kliento zonoje, temoje nurodydami: „Mano paslaugų nutraukimas“, taip pat norimas nutraukimo laikas (nedelsiant arba paslaugų atnaujinimo dieną).", + "user_agreement_details_success": "Jūsų sutartis buvo patvirtinta.", + "user_agreement_details_error": "Priimant sutartį įvyko klaida.", + "user_agreement_appendices": "Norėdami susipažinti su priedais, kurie yra neatsiejama sutarties dalimi (ypač Bendrosios sąlygos, Specialiosios sąlygos, Asmens duomenų tvarkymo priedas (DPA), žiūrėkite šią nuorodą." } diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.controller.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.controller.js index b626b2a66959..4804b2968c60 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.controller.js +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.controller.js @@ -3,13 +3,17 @@ import get from 'lodash/get'; angular.module('UserAccount').controller('UserAccount.controllers.agreements', [ '$scope', '$translate', - 'UserAccount.services.agreements', 'Alerter', + 'atInternet', + 'gotoAcceptAllAgreements', + 'UserAccountServicesAgreements', function UserAccountAgreementsController( $scope, $translate, - Service, Alerter, + atInternet, + gotoAcceptAllAgreements, + Service, ) { function init() { $scope.loading = true; @@ -27,6 +31,8 @@ angular.module('UserAccount').controller('UserAccount.controllers.agreements', [ $scope.agreed = {}; + $scope.gotoAcceptAllAgreements = gotoAcceptAllAgreements; + $scope.loadAgreementsList = function loadAgreementsList(count, offset) { init(); @@ -67,18 +73,36 @@ angular.module('UserAccount').controller('UserAccount.controllers.agreements', [ ); }; - $scope.accept = function accept(contractId) { - $scope.loaders[`accept_${contractId}`] = true; + $scope.accept = function accept(contract) { + atInternet.trackClick({ + name: + 'dedicated::account::billing::autorenew::agreements::go-to-accept-agreement', + type: 'action', + }); + $scope.loaders[`accept_${contract.id}`] = true; - Service.accept(contractId).then( - () => { - $scope.getToValidate(); - $scope.$broadcast('paginationServerSide.reload', 'agreementsList'); - }, - (d) => { - Alerter.set('alert alert-danger', d, d, 'agreements_alerter'); - }, - ); + Service.accept(contract) + .then( + () => { + $scope.getToValidate(); + $scope.$broadcast('paginationServerSide.reload', 'agreementsList'); + }, + (d) => { + Alerter.set( + 'alert-danger', + `${$translate.instant('user_agreement_details_error')} ${get( + d, + 'data.message', + d, + )}`, + null, + 'agreements_alerter', + ); + }, + ) + .finally(() => { + $scope.loaders[`accept_${contract.id}`] = false; + }); }; $scope.resetMessages = function resetMessages() { diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.html b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.html index ba90e861c388..7e46a681584d 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.html +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.html @@ -16,7 +16,18 @@
-

+
+

+
+ + + +
+
@@ -67,7 +78,7 @@

@@ -77,10 +88,13 @@

target="_blank" class="btn btn-link" rel="noopener" + data-at-internet-click="{ name: 'dedicated::account::billing::autorenew::agreements::go-to-download-agreement' }" data-ng-href="{{agreement.pdfUrl}}" - data-translate="user_agreements_download_pdf" title="{{ 'user_agreements_download_pdf_title' | translate:{ t0: agreement.name } }}" > + diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.module.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.module.js index 3a4eaacd60f2..2f22c45b92f7 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.module.js +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.module.js @@ -1,9 +1,13 @@ -import details from './details/details.module'; +import atInternet from '@ovh-ux/ng-at-internet'; +import acceptAll from './popup-agreement/popup-agreement.module'; +import details from './details/details.module'; import routing from './user-agreements.routes'; const moduleName = 'ovhManagerBillingAgreements'; -angular.module(moduleName, ['ui.router', details]).config(routing); +angular + .module(moduleName, ['ui.router', acceptAll, atInternet, details]) + .config(routing); export default moduleName; diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.routes.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.routes.js index f5bec27744d1..160074619cd4 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.routes.js +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.routes.js @@ -11,6 +11,23 @@ export default /* @ngInject */ ( template, controller: 'UserAccount.controllers.agreements', translations: { value: ['.'], format: 'json' }, + resolve: { + gotoAcceptAllAgreements: /* @ngInject */ ($state, atInternet) => ( + agreements, + ) => { + atInternet.trackClick({ + name: + 'dedicated::account::billing::autorenew::agreements::go-to-accept-all', + type: 'action', + }); + return $state.go( + 'app.account.billing.autorenew.agreements.popup-agreement', + { + agreements, + }, + ); + }, + }, }); // ensure compatibility with links sended by emails diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.service.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.service.js index b51392228560..2ee01944c022 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.service.js +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/agreements/user-agreements.service.js @@ -1,19 +1,24 @@ +import filter from 'lodash/filter'; import find from 'lodash/find'; +import get from 'lodash/get'; +import map from 'lodash/map'; import set from 'lodash/set'; -angular.module('UserAccount').service('UserAccount.services.agreements', [ +angular.module('UserAccount').service('UserAccountServicesAgreements', [ + '$cacheFactory', '$http', '$q', '$translate', + 'accountMigrationService', 'UserAccount.constants', - '$cacheFactory', 'GDPR_AGREEMENTS_INFOS', function UserAccountAgreementsService( + cache, $http, $q, $translate, + accountMigrationService, constants, - cache, GDPR_AGREEMENTS_INFOS, ) { const userAgreementsCache = cache('USER_AGREEMENTS'); @@ -59,36 +64,50 @@ angular.module('UserAccount').service('UserAccount.services.agreements', [ .then(getSuccessDataOrReject); }; - this.getAgreement = function getAgreement(agreementId) { + this.getAgreementIds = function getAgreementIds() { return $http - .get(`${proxyPath}/agreements/${agreementId}`) - .then((response) => { - if (response.data && response.data.contractId) { - const gdprAgreement = find(GDPR_AGREEMENTS_INFOS, { - agreementId: response.data.contractId, - }); - if (gdprAgreement) { - response.data.title = $translate.instant( - 'user_agreement_GDPR_title', - ); - response.data.helperText = $translate.instant( - 'user_agreement_GDPR_helper_text', - { agreementLink: gdprAgreement.url }, - ); - } - } - return response; - }) - .then(getSuccessDataOrReject); + .get(`${proxyPath}/agreements`) + .then((response) => response.data); + }; + + this.getAgreement = function getAgreement(agreementId) { + return this.getAgreementIds().then((agreementIds) => + agreementIds.includes(agreementId) + ? $http + .get(`${proxyPath}/agreements/${agreementId}`) + .then((response) => { + if (response.data && response.data.contractId) { + const gdprAgreement = find(GDPR_AGREEMENTS_INFOS, { + agreementId: response.data.contractId, + }); + if (gdprAgreement) { + response.data.title = $translate.instant( + 'user_agreement_GDPR_title', + ); + response.data.helperText = $translate.instant( + 'user_agreement_GDPR_helper_text', + { agreementLink: gdprAgreement.url }, + ); + } + } + return response; + }) + .then(getSuccessDataOrReject) + : accountMigrationService.getAgreementDetails(agreementId), + ); }; this.getContract = function getContract(contractId) { - return $http - .get(`${proxyPath}/agreements/${contractId}/contract`) - .then(getSuccessDataOrReject); + return this.getAgreementIds().then((agreementIds) => + agreementIds.includes(contractId) + ? $http + .get(`${proxyPath}/agreements/${contractId}/contract`) + .then(getSuccessDataOrReject) + : accountMigrationService.getContractInfo(contractId), + ); }; - this.getToValidate = function getToValidate() { + this.getPendingAgreements = function getPendingAgreements() { return $http .get('/sws/agreements', { cache: userAgreementsCache, @@ -103,15 +122,59 @@ angular.module('UserAccount').service('UserAccount.services.agreements', [ .then(getSuccessDataOrReject); }; - this.accept = function accept(contractId) { - return $http - .post(`${proxyPath}/agreements/${contractId}/accept`) - .then(formatList) - .then(getSuccessDataOrReject) - .then((response) => { - userAgreementsCache.removeAll(); - return response; + this.getToValidate = function getToValidate() { + return $q + .all([ + this.getPendingAgreements(), + this.getPendingAccountMigrationAgreements(), + ]) + .then(([pendingAgreements, pendingAccountMigrationAgreements]) => { + const sortByDate = (a, b) => { + const dateA = new Date(a.date); + const dateB = new Date(b.date); + return dateB - dateA; + }; + pendingAccountMigrationAgreements.sort(sortByDate); + pendingAgreements.list.results.sort(sortByDate); + set( + pendingAgreements, + 'list.results', + pendingAgreements.list.results.concat( + pendingAccountMigrationAgreements, + ), + ); + set( + pendingAgreements, + 'count', + pendingAgreements.list.results.length, + ); + return pendingAgreements; }); }; + + this.getPendingAccountMigrationAgreements = function getAccountMigrationAgreements() { + return accountMigrationService + .getAllContracts() + .then((agreements) => filter(agreements, { agreed: 'todo' })) + .then((agreements) => + map(agreements, (agreement) => ({ + ...agreement, + pdfUrl: agreement.pdf, + })), + ); + }; + + this.accept = function accept(contract) { + return contract.migrationId + ? accountMigrationService.acceptAgreement(contract.contractId) + : $http + .post(`${proxyPath}/agreements/${contract.id}/accept`) + .then(formatList) + .then(getSuccessDataOrReject) + .then((response) => { + userAgreementsCache.removeAll(); + return response; + }); + }; }, ]); diff --git a/packages/manager/apps/dedicated/client/app/billing/autoRenew/autorenew.module.js b/packages/manager/apps/dedicated/client/app/billing/autoRenew/autorenew.module.js index 5cbf92264ffc..622fa81ba33f 100644 --- a/packages/manager/apps/dedicated/client/app/billing/autoRenew/autorenew.module.js +++ b/packages/manager/apps/dedicated/client/app/billing/autoRenew/autorenew.module.js @@ -2,6 +2,7 @@ import ovhManagerBilling from '@ovh-ux/manager-billing'; import activation from './actions/activation/activation.module'; import agreements from './agreements/user-agreements.module'; +import autorenewBlocked from './actions/autorenew-blocked/autorenew-blocked.module'; import cancelResiliation from './actions/cancel-resiliation/cancel-resiliation.module'; import debtBeforePaying from './actions/debtBeforePaying/debtBeforePaying.module'; import deleteModule from './actions/delete/delete.module'; @@ -31,6 +32,7 @@ angular 'ui.router', activation, agreements, + autorenewBlocked, cancelResiliation, debtBeforePaying, deleteModule, diff --git a/packages/manager/apps/dedicated/client/app/billing/main/history/debt/pay/billing-main-history-debt-pay.controller.js b/packages/manager/apps/dedicated/client/app/billing/main/history/debt/pay/billing-main-history-debt-pay.controller.js index 8685bf07f5ad..ae67dca82105 100644 --- a/packages/manager/apps/dedicated/client/app/billing/main/history/debt/pay/billing-main-history-debt-pay.controller.js +++ b/packages/manager/apps/dedicated/client/app/billing/main/history/debt/pay/billing-main-history-debt-pay.controller.js @@ -40,7 +40,8 @@ angular.module('Billing').controller( onDebtPayFormSubmit() { this.loading.pay = true; this.atInternet.trackClick({ - name: 'billing_pay_balance', + name: + 'dedicated::account::billing::main::history::pay-debt::pay::billing_pay_balance', type: 'action', }); let promise; diff --git a/packages/manager/apps/dedicated/client/app/index.html b/packages/manager/apps/dedicated/client/app/index.html index dc152dbf4a76..1bf8fb7df52e 100644 --- a/packages/manager/apps/dedicated/client/app/index.html +++ b/packages/manager/apps/dedicated/client/app/index.html @@ -85,7 +85,7 @@ - +
diff --git a/packages/manager/apps/dedicated/package.json b/packages/manager/apps/dedicated/package.json index b9bd7bedaf5c..019a72d3543c 100644 --- a/packages/manager/apps/dedicated/package.json +++ b/packages/manager/apps/dedicated/package.json @@ -19,6 +19,7 @@ "start:watch": "lerna exec --stream --parallel --scope='@ovh-ux/manager-dedicated' --include-dependencies -- npm run dev:watch --if-present" }, "dependencies": { + "@ovh-ux/manager-account-migration": "^0.0.0 || ^1.0.0", "@ovh-ux/manager-account-sidebar": "^2.0.0 || ^3.0.0", "@ovh-ux/manager-at-internet-configuration": "^0.0.0 || ^1.0.0", "@ovh-ux/manager-banner": "^1.1.3", diff --git a/packages/manager/apps/public-cloud/package.json b/packages/manager/apps/public-cloud/package.json index 7a6a0f20ee30..4b0d52cd8353 100644 --- a/packages/manager/apps/public-cloud/package.json +++ b/packages/manager/apps/public-cloud/package.json @@ -20,6 +20,7 @@ "start:watch": "lerna exec --stream --parallel --scope='@ovh-ux/manager-public-cloud' --include-dependencies -- npm run dev:watch --if-present" }, "dependencies": { + "@ovh-ux/manager-account-migration": "^0.0.0 || ^1.0.0", "@ovh-ux/manager-account-sidebar": "^2.0.0 || ^3.0.0", "@ovh-ux/manager-at-internet-configuration": "^0.0.0 || ^1.0.0", "@ovh-ux/manager-cloud-styles": "^0.4.0 || ^1.0.0", diff --git a/packages/manager/apps/telecom/package.json b/packages/manager/apps/telecom/package.json index 9461163e1b62..05d196530c57 100644 --- a/packages/manager/apps/telecom/package.json +++ b/packages/manager/apps/telecom/package.json @@ -19,6 +19,7 @@ "start:watch": "lerna exec --stream --parallel --scope='@ovh-ux/manager-telecom' --include-dependencies -- npm run dev --if-present" }, "dependencies": { + "@ovh-ux/manager-account-migration": "^0.0.0 || ^1.0.0", "@ovh-ux/manager-account-sidebar": "^2.0.0 || ^3.0.0", "@ovh-ux/manager-at-internet-configuration": "^0.0.0 || ^1.0.0", "@ovh-ux/manager-banner": "^1.1.3", diff --git a/packages/manager/apps/telecom/src/app/app.js b/packages/manager/apps/telecom/src/app/app.js index 2165829c9ec8..3814f8bd4859 100644 --- a/packages/manager/apps/telecom/src/app/app.js +++ b/packages/manager/apps/telecom/src/app/app.js @@ -15,6 +15,7 @@ import ovhManagerSms from '@ovh-ux/manager-sms'; import ovhManagerTelecomTask from '@ovh-ux/manager-telecom-task'; import ngAtInternet from '@ovh-ux/ng-at-internet'; import ngAtInternetUiRouterPlugin from '@ovh-ux/ng-at-internet-ui-router-plugin'; +import ovhManagerAccountMigration from '@ovh-ux/manager-account-migration'; import ngOvhCheckboxTable from '@ovh-ux/ng-ovh-checkbox-table'; import ngOvhUiConfirmModal from '@ovh-ux/ng-ovh-ui-confirm-modal'; import ngOvhApiWrappers from '@ovh-ux/ng-ovh-api-wrappers'; @@ -109,6 +110,7 @@ angular 'ovh-ng-input-password', ovhManagerAccountSidebar, ovhManagerAtInternetConfiguration, + ovhManagerAccountMigration, ovhManagerBetaPreference, ovhManagerCore, ovhManagerDashboard, diff --git a/packages/manager/apps/telecom/src/index.html b/packages/manager/apps/telecom/src/index.html index 0662256c417c..cb38cd294dcb 100644 --- a/packages/manager/apps/telecom/src/index.html +++ b/packages/manager/apps/telecom/src/index.html @@ -84,6 +84,7 @@ duration="600000" class="flash" > + - + + step.name === STEP_TYPES.ORDERS); + return order.status !== STEP_STATES.OK; + } + + hasDebtPending() { + const debt = find(this.steps, (step) => step.name === STEP_TYPES.DEBT); + return debt.status !== STEP_STATES.OK; + } + + getPendingDebt() { + const debt = find(this.steps, (step) => step.name === STEP_TYPES.DEBT); + const debtStr = + get(debt, 'debt.balanceAmount.value') !== 0 + ? get(debt, 'debt.balanceAmount.text') + : get(debt, 'debt.ovhAccountAmount.text'); + return trimStart(debtStr, '-'); + } + + hasNicPending() { + const nic = find(this.steps, (step) => step.name === STEP_TYPES.NIC); + return nic.status !== STEP_STATES.OK; + } + + hasContractsPending() { + const contracts = find( + this.steps, + (step) => step.name === STEP_TYPES.CONTRACTS, + ); + return contracts.status !== STEP_STATES.OK; + } + + hasOnlyContractsPending() { + return ( + this.hasContractsPending() && + !(this.hasOrderPending() || this.hasDebtPending() || this.hasNicPending()) + ); + } + + isPending() { + return this.status === MIGRATION_STATUS.TODO; + } +} diff --git a/packages/manager/modules/account-migration/src/notification/index.js b/packages/manager/modules/account-migration/src/notification/index.js new file mode 100644 index 000000000000..a0003cdc3d44 --- /dev/null +++ b/packages/manager/modules/account-migration/src/notification/index.js @@ -0,0 +1,21 @@ +import angular from 'angular'; +import translate from 'angular-translate'; + +import '@ovh-ux/ng-translate-async-loader'; +import '@ovh-ux/ui-kit'; + +import accountMigrationNotification from './notification.component'; + +const moduleName = 'accountMigrationNotification'; + +angular + .module(moduleName, [ + 'ngTranslateAsyncLoader', + 'oui', + 'pascalprecht.translate', + translate, + ]) + .component('accountMigrationNotification', accountMigrationNotification) + .run(/* @ngTranslationsInject:json ./translations */); + +export default moduleName; diff --git a/packages/manager/modules/account-migration/src/notification/notification.component.js b/packages/manager/modules/account-migration/src/notification/notification.component.js new file mode 100644 index 000000000000..34148df4dfa5 --- /dev/null +++ b/packages/manager/modules/account-migration/src/notification/notification.component.js @@ -0,0 +1,7 @@ +import controller from './notification.controller'; +import template from './notification.html'; + +export default { + controller, + template, +}; diff --git a/packages/manager/modules/account-migration/src/notification/notification.controller.js b/packages/manager/modules/account-migration/src/notification/notification.controller.js new file mode 100644 index 000000000000..da7006a3ea74 --- /dev/null +++ b/packages/manager/modules/account-migration/src/notification/notification.controller.js @@ -0,0 +1,85 @@ +import { FAQ_LINK } from '../constants'; + +export default class MigrationNotificationController { + /* @ngInject */ + constructor( + $q, + $translate, + $state, + atInternet, + accountMigrationService, + OvhApiMe, + RedirectionService, + ) { + this.$q = $q; + this.$state = $state; + this.$translate = $translate; + + this.atInternet = atInternet; + this.accountMigrationService = accountMigrationService; + this.OvhApiMe = OvhApiMe; + this.RedirectionService = RedirectionService; + + this.AGREEMENTS_URL = this.RedirectionService.getURL('agreements'); + this.CONTACTS_URL = this.RedirectionService.getURL('contacts'); + this.ORDERS_URL = this.RedirectionService.getURL('orders'); + + this.migrationDetail = null; + this.needMigration = false; + } + + $onInit() { + return this.$q + .all({ + migrations: this.accountMigrationService.getMigrationList(), + migrationDates: this.accountMigrationService.getFormattedDates(), + }) + .then(({ migrations: [migration], migrationDates }) => { + if (migration) { + this.faqLink = FAQ_LINK[migration.from]; + if (migrationDates) { + this.migrationStartDate = migrationDates.START; + this.migrationEndDate = migrationDates.END; + } + return this.accountMigrationService + .getMigrationDetails(migration.id) + .then((res) => { + this.migrationDetail = res; + }); + } + return null; + }); + } + + trackClick(type) { + let trackText = null; + switch (type) { + case 'billing': + trackText = + 'bills:server::dedicated::account::billing::alert::go-to-billing-link'; + break; + case 'debt': + trackText = 'alert::notifications::go-to-billing'; + break; + case 'agreements': + trackText = 'alert::notifications::go-to-agreements'; + break; + case 'faq': + trackText = 'alert::notifications::go-to-faq-agreement'; + break; + case 'order': + trackText = 'alert::notifications::go-to-orders'; + break; + case 'contact': + trackText = 'alert::notifications::go-to-contact-services'; + break; + default: + trackText = type; + } + + this.atInternet.trackClick({ + name: trackText, + type: 'action', + }); + } +} diff --git a/packages/manager/modules/account-migration/src/notification/notification.html b/packages/manager/modules/account-migration/src/notification/notification.html new file mode 100644 index 000000000000..90a9ded89d51 --- /dev/null +++ b/packages/manager/modules/account-migration/src/notification/notification.html @@ -0,0 +1,197 @@ + + + + + . + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + diff --git a/packages/manager/modules/account-migration/src/notification/translations/Messages_cs_CZ.json b/packages/manager/modules/account-migration/src/notification/translations/Messages_cs_CZ.json new file mode 100644 index 000000000000..5f0e92d3b4a9 --- /dev/null +++ b/packages/manager/modules/account-migration/src/notification/translations/Messages_cs_CZ.json @@ -0,0 +1,27 @@ +{ + "ovh_manager_account_migration_pending_contracts1": "Změnili jsme smluvní podmínky. Do {{date}} musíte", + "ovh_manager_account_migration_accept_contracts": "přijmout tyto nové smlouvy.", + "ovh_manager_account_migration_accept_all_contracts": "přijmout všechny své čekající smlouvy.", + "ovh_manager_account_migration_pending_contracts2": "Po tomto datu již nebudete moci své služby prodloužit. Další informace o provedených změnách", + "ovh_manager_account_migration_faq_text": "naleznete v nejčastějších dotazech", + "ovh_manager_account_migration_pending_contracts_success": "Aktualizace vašeho účtu byla uložena, po skončení této operace obdržíte e-mail. Vyčkejte prosím. Další informace o provedených změnách ", + "ovh_manager_account_migration_pending_debts1": "Nicméně, v současné době však máte dluh {{debt}}. Situaci prosím napravte v sekci", + "ovh_manager_account_migration_pending_debts2": "abyste mohli přijmout nové smlouvy.", + "ovh_manager_account_migration_pending_order": "Aktuálně však máte probíhající objednávku. Situaci prosím napravte v sekci", + "ovh_manager_account_migration_pending_contact": "Aktuálně však probíhá změna kontaktu u jedné z vašich služeb. Dokončete prosím operaci v části", + "ovh_manager_account_migration_pending_debts_and_order1": "Nicméně, v současné době však máte dluh {{debt}} a probíhající objednávku. Situaci prosím napravte v sekcích", + "ovh_manager_account_migration_and": "a", + "ovh_manager_account_migration_pending_debts_and_order2": ", abyste mohli přijmout nové smlouvy.", + "ovh_manager_account_migration_pending_debts_and_contact1": "Nicméně, v současné době však máte dluh {{debt}}. Situaci prosím napravte v sekcích", + "ovh_manager_account_migration_and": "a", + "ovh_manager_account_migration_pending_debts_and_contact2": ", abyste mohli přijmout nové smlouvy. ", + "ovh_manager_account_migration_pending_order_and_contact1": "Aktuálně však máte probíhající objednávku a změnu kontaktu. Tyto operace prosím uhraďte v sekcích", + "ovh_manager_account_migration_and": "a", + "ovh_manager_account_migration_pending_order_and_contact2": ", abyste mohli přijmout nové smlouvy", + "ovh_manager_account_migration_pending_debts_order_and_contact1": "Nicméně, v současné době však máte dluh {{debt}} a probíhající objednávku a změnu kontaktu. Situaci prosím napravte v sekcích", + "ovh_manager_account_migration_and": "a", + "ovh_manager_account_migration_pending_debts_order_and_contact2": ", abyste mohli přijmout nové smlouvy.", + "ovh_manager_account_migration_billing_link_text": "Fakturace", + "ovh_manager_account_migration_contacts_link_text": "Moje kontakty", + "ovh_manager_account_migration_order_link_text": "Moje objednávky" +} diff --git a/packages/manager/modules/account-migration/src/notification/translations/Messages_en_GB.json b/packages/manager/modules/account-migration/src/notification/translations/Messages_en_GB.json new file mode 100644 index 000000000000..8e6c7fe7e17e --- /dev/null +++ b/packages/manager/modules/account-migration/src/notification/translations/Messages_en_GB.json @@ -0,0 +1,27 @@ +{ + "ovh_manager_account_migration_pending_contracts1": "We have changed our Terms of Service. You have until {{date}} to", + "ovh_manager_account_migration_accept_contracts": "confirm these new contracts.", + "ovh_manager_account_migration_accept_all_contracts": "confirm all of your pending contracts.", + "ovh_manager_account_migration_pending_contracts2": "After this date, you will no longer be able to renew your services. For further information on the changes that have been made,", + "ovh_manager_account_migration_faq_text": "please refer to the FAQ", + "ovh_manager_account_migration_pending_contracts_success": "The update to your account has been processed. You will receive an email once this operation is complete. Please wait. For further information on the changes that have been made, ", + "ovh_manager_account_migration_pending_debts1": "However, you currently have an outstanding total of {{debt}}. Please settle it in the", + "ovh_manager_account_migration_pending_debts2": "section in order to accept the new contracts.", + "ovh_manager_account_migration_pending_order": "However, you currently have an order in progress. Please settle the amount in the section", + "ovh_manager_account_migration_pending_contact": "However, there is currently a contact change in progress on one of your services. Please complete this operation in the section", + "ovh_manager_account_migration_pending_debts_and_order1": "However, you currently have an outstanding total of {{debt}} and an order in progress. Please resolve these operations in the", + "ovh_manager_account_migration_and": "and", + "ovh_manager_account_migration_pending_debts_and_order2": "sections in order to accept the new contracts.", + "ovh_manager_account_migration_pending_debts_and_contact1": "However, you currently have an outstanding total of {{debt}}. Please resolve these operations in the", + "ovh_manager_account_migration_and": "and", + "ovh_manager_account_migration_pending_debts_and_contact2": "sections in order to accept the new contracts.", + "ovh_manager_account_migration_pending_order_and_contact1": "However, there is currently an order and contact change in progress. Please resolve these operations in the", + "ovh_manager_account_migration_and": "and", + "ovh_manager_account_migration_pending_order_and_contact2": "sections, in order to accept the new contracts", + "ovh_manager_account_migration_pending_debts_order_and_contact1": "However, there is currently an outstanding total of {{debt}}, an order and a contact change in progress. Please resolve these operations in the", + "ovh_manager_account_migration_and": "and", + "ovh_manager_account_migration_pending_debts_order_and_contact2": "sections in order to accept the new contracts.", + "ovh_manager_account_migration_billing_link_text": "Billing", + "ovh_manager_account_migration_contacts_link_text": "My contacts", + "ovh_manager_account_migration_order_link_text": "My orders" +} diff --git a/packages/manager/modules/account-migration/src/notification/translations/Messages_fi_FI.json b/packages/manager/modules/account-migration/src/notification/translations/Messages_fi_FI.json new file mode 100644 index 000000000000..ecf4787b1bf2 --- /dev/null +++ b/packages/manager/modules/account-migration/src/notification/translations/Messages_fi_FI.json @@ -0,0 +1,27 @@ +{ + "ovh_manager_account_migration_pending_contracts1": "Olemme muokanneet käyttöehtojamme. Sinulla on päivään {{date}} asti aikaa", + "ovh_manager_account_migration_accept_contracts": "vahvistaa nämä uudet sopimukset.", + "ovh_manager_account_migration_accept_all_contracts": "hyväksyä kaikki odottavat sopimuksesi.", + "ovh_manager_account_migration_pending_contracts2": "Tämän päivän jälkeen et voi enää uusia palvelujasi. Jos haluat lisätietoja tehdyistä muutoksista,", + "ovh_manager_account_migration_faq_text": "tutustu usein kysyttyihin kysymyksiin", + "ovh_manager_account_migration_pending_contracts_success": "Tilisi päivitys on rekisteröity. Saat sähköpostin, kun toimenpide on valmis. Odota hetkinen. Jos haluat lisätietoja tehdyistä muutoksista, ", + "ovh_manager_account_migration_pending_debts1": "Olet kuitenkin tällä hetkellä velkaa {{debt}}. Kehotamme hoitamaan velan osiossa", + "ovh_manager_account_migration_pending_debts2": "jotta voit hyväksyä uudet sopimukset.", + "ovh_manager_account_migration_pending_order": "Sinulla on kuitenkin tällä hetkellä keskeneräinen tilaus. Kehotamme käsittelemään asian osiossa", + "ovh_manager_account_migration_pending_contact": "Sinulla on kuitenkin sopimuksen muutos kesken jossakin palveluistasi. Kehotamme viimeistelemään toimenpiteen osiossa", + "ovh_manager_account_migration_pending_debts_and_order1": "Sinulla on kuitenkin tällä hetkellä velkaa {{debt}} sekä keskeneräinen tilaus. Kehotamme käsittelemään nämä toimenpiteet osioissa", + "ovh_manager_account_migration_and": "ja", + "ovh_manager_account_migration_pending_debts_and_order2": ", jotta voit hyväksyä uudet sopimukset.", + "ovh_manager_account_migration_pending_debts_and_contact1": "Olet kuitenkin tällä hetkellä velkaa {{debt}}. Kehotamme käsittelemään nämä toimenpiteet osioissa", + "ovh_manager_account_migration_and": "ja", + "ovh_manager_account_migration_pending_debts_and_contact2": ", jotta voit hyväksyä uudet sopimukset.", + "ovh_manager_account_migration_pending_order_and_contact1": "Sinulla on kuitenkin tällä hetkellä tilaus ja sopimuksen muutos kesken. Kehotamme käsittelemään nämä toimenpiteet osioissa", + "ovh_manager_account_migration_and": "ja", + "ovh_manager_account_migration_pending_order_and_contact2": ", jotta voit hyväksyä uudet sopimukset", + "ovh_manager_account_migration_pending_debts_order_and_contact1": "Sinulla on kuitenkin tällä hetkellä velkaa {{debt}}, tilaus ja sopimuksen muutos kesken. Kehotamme käsittelemään nämä toimenpiteet osioissa", + "ovh_manager_account_migration_and": "ja", + "ovh_manager_account_migration_pending_debts_order_and_contact2": ", jotta voit hyväksyä uudet sopimukset.", + "ovh_manager_account_migration_billing_link_text": "Laskutus", + "ovh_manager_account_migration_contacts_link_text": "Omat sopimukset", + "ovh_manager_account_migration_order_link_text": "Omat tilaukset" +} diff --git a/packages/manager/modules/account-migration/src/notification/translations/Messages_fr_FR.json b/packages/manager/modules/account-migration/src/notification/translations/Messages_fr_FR.json new file mode 100644 index 000000000000..1d925cf895ec --- /dev/null +++ b/packages/manager/modules/account-migration/src/notification/translations/Messages_fr_FR.json @@ -0,0 +1,24 @@ +{ + "ovh_manager_account_migration_pending_contracts1": "Nous avons modifié nos Conditions d’utilisation. Vous avez jusqu’au {{date}} pour", + "ovh_manager_account_migration_accept_contracts": "accepter ces nouveaux contrats.", + "ovh_manager_account_migration_accept_all_contracts": "accepter tous vos contrats en attente.", + "ovh_manager_account_migration_pending_contracts2": "Passé cette date vous ne pourrez plus renouveler vos services. Pour plus d’informations sur les changements apportés,", + "ovh_manager_account_migration_faq_text": "consultez la FAQ", + "ovh_manager_account_migration_pending_contracts_success": "La mise à jour de votre compte a été enregistrée, vous recevrez un email à la fin de cette opération, merci de patienter. Pour plus d’informations sur les changements apportés, ", + "ovh_manager_account_migration_pending_debts1": "Cependant, vous avez actuellement une dette de {{debt}}. Nous vous invitons à la régler dans la rubrique", + "ovh_manager_account_migration_pending_debts2": "pour pouvoir accepter les nouveaux contrats.", + "ovh_manager_account_migration_pending_order": "Cependant, vous avez actuellement une commande en cours. Nous vous invitons à la régulariser dans la rubrique", + "ovh_manager_account_migration_pending_contact": "Cependant, vous avez actuellement un changement de contact en cours sur l'un de vos services. Nous vous invitons à finaliser l'opération dans la rubrique", + "ovh_manager_account_migration_pending_debts_and_order1": "Cependant, vous avez actuellement une dette de {{debt}} et une commande en cours. Nous vous invitons à régler ces opérations dans les rubriques", + "ovh_manager_account_migration_pending_debts_and_order2": "pour pouvoir accepter les nouveaux contrats.", + "ovh_manager_account_migration_pending_debts_and_contact1": "Cependant, vous avez actuellement une dette de {{debt}}. Nous vous invitons à régler ces opérations dans les rubriques", + "ovh_manager_account_migration_pending_debts_and_contact2": "pour pouvoir accepter les nouveaux contrats.", + "ovh_manager_account_migration_pending_order_and_contact1": "Cependant, vous avez actuellement une commande et un changement de contact en cours. Nous vous invitons à régler ces opérations dans les rubriques", + "ovh_manager_account_migration_pending_order_and_contact2": "pour pouvoir accepter les nouveaux contrats", + "ovh_manager_account_migration_pending_debts_order_and_contact1": "Cependant, vous avez actuellement une dette de {{debt}}, une commande et un changement de contact en cours. Nous vous invitons à régler ces opérations dans les rubriques", + "ovh_manager_account_migration_pending_debts_order_and_contact2": "pour pouvoir accepter les nouveaux contrats.", + "ovh_manager_account_migration_and": "et", + "ovh_manager_account_migration_billing_link_text": "Facturation", + "ovh_manager_account_migration_contacts_link_text": "Mes contacts", + "ovh_manager_account_migration_order_link_text": "Mes commandes" +} diff --git a/packages/manager/modules/account-migration/src/notification/translations/Messages_lt_LT.json b/packages/manager/modules/account-migration/src/notification/translations/Messages_lt_LT.json new file mode 100644 index 000000000000..db3a6cda2608 --- /dev/null +++ b/packages/manager/modules/account-migration/src/notification/translations/Messages_lt_LT.json @@ -0,0 +1,27 @@ +{ + "ovh_manager_account_migration_pending_contracts1": "Pakeitėme paslaugų teikimo sąlygas. Iki {{date}} turite", + "ovh_manager_account_migration_accept_contracts": "priimti šias naujas sutartis.", + "ovh_manager_account_migration_accept_all_contracts": "priimti visas laukiančias patvirtinimo sutartis.", + "ovh_manager_account_migration_pending_contracts2": "Po šios datos nebegalėsite atnaujinti savo paslaugų. Norėdami gauti daugiau informacijos apie atliktus pakeitimus,", + "ovh_manager_account_migration_faq_text": "ieškokite DUK", + "ovh_manager_account_migration_pending_contracts_success": "Paskyros atnaujinimas buvo išsaugotas, šios operacijos pabaigoje gausite el. laišką, palaukite. Norėdami gauti daugiau informacijos apie atliktus pakeitimus, ", + "ovh_manager_account_migration_pending_debts1": "Tačiau šiuo metu turite {{debt}} skolą. Kviečiame sumokėti ją skyriuje,", + "ovh_manager_account_migration_pending_debts2": "kad galėtumėte priimti naujas sutartis.", + "ovh_manager_account_migration_pending_order": "Tačiau šiuo metu vykdote užsakymą. Kviečiame jus tai sutvarkyti skyriuje", + "ovh_manager_account_migration_pending_contact": "Tačiau šiuo metu keičiate kontaktinius duomenis apie vieną iš paslaugų. Siūlome užbaigti operaciją skyriuje", + "ovh_manager_account_migration_pending_debts_and_order1": "Tačiau šiuo metu turite {{debt}} skolą ir atliekate pavedimą. Siūlome susimokėti už šias operacijas skyriuose", + "ovh_manager_account_migration_and": "ir", + "ovh_manager_account_migration_pending_debts_and_order2": ", kad galėtumėte priimti naujas sutartis.", + "ovh_manager_account_migration_pending_debts_and_contact1": "Tačiau šiuo metu turite {{debt}} skolą. Siūlome susimokėti už šias operacijas skyriuose", + "ovh_manager_account_migration_and": "ir", + "ovh_manager_account_migration_pending_debts_and_contact2": ", kad galėtumėte priimti naujas sutartis.", + "ovh_manager_account_migration_pending_order_and_contact1": "Tačiau šiuo metu vykdomas užsakymas ir keičiamas kontaktas. Siūlome sumokėti už šias operacijas skyriuose", + "ovh_manager_account_migration_and": "ir", + "ovh_manager_account_migration_pending_order_and_contact2": ", kad galėtumėte priimti naujas sutartis", + "ovh_manager_account_migration_pending_debts_order_and_contact1": "Tačiau šiuo metu turite neapmokėtų {{debt}} skolų, užsakymų ir kontaktų pakeitimų. Siūlome susimokėti už šias operacijas skyriuose", + "ovh_manager_account_migration_and": "ir", + "ovh_manager_account_migration_pending_debts_order_and_contact2": ", kad būtų galima priimti naujas sutartis.", + "ovh_manager_account_migration_billing_link_text": "Atsiskaitymas", + "ovh_manager_account_migration_contacts_link_text": "Mano kontaktai", + "ovh_manager_account_migration_order_link_text": "Mano užsakymai" +} diff --git a/packages/manager/modules/account-migration/src/service.js b/packages/manager/modules/account-migration/src/service.js new file mode 100644 index 000000000000..6704f9ceb3f6 --- /dev/null +++ b/packages/manager/modules/account-migration/src/service.js @@ -0,0 +1,189 @@ +import find from 'lodash/find'; +import get from 'lodash/get'; +import map from 'lodash/map'; +import set from 'lodash/set'; + +import moment from 'moment'; + +import { + CACHED_OBJECT_LIST_PAGES, + MIGRATION_DATES, + MIGRATION_STATUS, + STEP_STATES, + STEP_TYPES, + X_PAGINATION_MODE, +} from './constants'; +import Migration from './migration.class'; + +export default class { + /* @ngInject */ + constructor($cacheFactory, $q, $http, $translate, OvhApiMe) { + this.$q = $q; + this.$http = $http; + this.$translate = $translate; + this.OvhApiMe = OvhApiMe; + this.migrationDetails = null; + this.cache = $cacheFactory('AccountMigrationCache'); + } + + getMigrationDates() { + return this.getMigrationList().then(([migration]) => + migration ? get(MIGRATION_DATES, migration.from, {}) : null, + ); + } + + getFormattedDates() { + return this.getMigrationDates().then((migrationDates) => { + if (migrationDates) { + let lang = this.$translate.use(); + if (['en_GB', 'es_US', 'fr_CA'].includes(lang)) { + lang = lang.toLowerCase().replace('_', '-'); + } else { + [lang] = lang.split('_'); + } + return { + START: moment(migrationDates.START, 'MM/DD/YYYY', lang).format('LL'), + END: moment(migrationDates.END, 'MM/DD/YYYY', lang).format('LL'), + }; + } + return null; + }); + } + + refreshMigrationDetails() { + this.cache.removeAll(); + return this.migrationDetails + ? this.getMigrationDetails(this.migrationDetails.id, true) + : this.$q.when(null); + } + + getPendingAgreements() { + return this.$http + .get('/me/agreements', { + params: { + agreed: 'todo', + }, + cache: this.cache, + }) + .then((res) => res.data); + } + + getMigrationDetails(migrationId, force) { + return this.migrationDetails && !force + ? this.$q.when(this.migrationDetails) + : this.$q + .all([ + this.getPendingAgreements(), + this.$http.get(`/me/migration/${migrationId}`, { + cache: this.cache, + }), + ]) + .then(([pendingAgreements, detail]) => { + if (pendingAgreements.length > 0) { + set( + find(detail.data.steps, { name: STEP_TYPES.CONTRACTS }), + 'status', + STEP_STATES.PENDING, + ); + set(detail, 'data.status', MIGRATION_STATUS.TODO); + } + if (this.migrationDetails) { + Object.assign(this.migrationDetails, detail.data); + } else { + this.migrationDetails = new Migration(detail.data); + } + return this.migrationDetails; + }); + } + + getMigrationList() { + return this.$http + .get('/me/migration', { + headers: { + [X_PAGINATION_MODE]: CACHED_OBJECT_LIST_PAGES, + }, + cache: this.cache, + }) + .then((res) => res.data); + } + + getPendingMigration() { + return this.getMigrationList().then((migrationList) => + find(migrationList, { status: MIGRATION_STATUS.TODO }), + ); + } + + getAgreementDetails(contractId) { + return this.getPendingMigration().then((migration) => { + return migration + ? this.$http + .get( + `/me/migration/${migration.id}/contract/${contractId}/agreement`, + { + cache: this.cache, + }, + ) + .then(({ data }) => data) + : null; + }); + } + + getMigrationContracts() { + return this.getPendingMigration().then((migration) => { + return migration + ? this.$http + .get(`/me/migration/${migration.id}/contract`, { + cache: this.cache, + }) + .then(({ data }) => data) + : []; + }); + } + + getContractInfo(contractId) { + return this.getPendingMigration().then((migration) => { + return migration + ? this.$http + .get(`/me/migration/${migration.id}/contract/${contractId}`, { + cache: this.cache, + }) + .then(({ data }) => ({ + ...data, + migrationId: migration.id, + })) + : null; + }); + } + + getContractDetails(contractId) { + return this.$q + .all([ + this.getContractInfo(contractId), + this.getAgreementDetails(contractId), + ]) + .then(([contract, agreement]) => ({ + ...agreement, + ...contract, + })); + } + + getAllContracts() { + return this.getMigrationContracts().then((contractIds) => + this.$q.all( + map(contractIds, (contractId) => this.getContractDetails(contractId)), + ), + ); + } + + acceptAgreement(contractId) { + return this.getPendingMigration().then((migration) => { + return migration + ? this.$http + .post(`/me/migration/${migration.id}/contract/${contractId}/accept`) + .then(() => { + this.cache.removeAll(); + }) + : null; + }); + } +} diff --git a/packages/manager/modules/core/src/redirection/redirection.constants.js b/packages/manager/modules/core/src/redirection/redirection.constants.js index 729b5aa80316..a64c85377fed 100644 --- a/packages/manager/modules/core/src/redirection/redirection.constants.js +++ b/packages/manager/modules/core/src/redirection/redirection.constants.js @@ -12,6 +12,7 @@ const universes = { }; const URI = { + agreements: '#/billing/autorenew/agreements', autorenew: '#/billing/autorenew', billing: '#/billing/history', catalog: '#/catalog', @@ -34,6 +35,7 @@ const URI = { export default { EU: { + agreements: `${managerRoot.EU}/${universes.dedicated}/${URI.agreements}`, autorenew: `${managerRoot.EU}/${universes.dedicated}/${URI.autorenew}`, billing: `${managerRoot.EU}/${universes.dedicated}/${URI.billing}`, catalog: `${managerRoot.EU}/${URI.catalog}`, @@ -86,6 +88,7 @@ export default { userEmails: `${managerRoot.EU}/${universes.dedicated}/${URI.userEmails}`, }, CA: { + agreements: `${managerRoot.CA}/${universes.dedicated}/${URI.agreements}`, autorenew: `${managerRoot.CA}/${universes.dedicated}/${URI.autorenew}`, billing: `${managerRoot.CA}/${universes.dedicated}/${URI.billing}`, catalog: `${managerRoot.CA}/${URI.catalog}`, @@ -125,6 +128,7 @@ export default { userEmails: `${managerRoot.CA}/${universes.dedicated}/${URI.userEmails}`, }, US: { + agreements: `${managerRoot.US}/${universes.dedicated}/${URI.agreements}`, billing: `${managerRoot.US}/${universes.dedicated}/${URI.billing}`, billingEnterprise: 'https://billing.us.ovhcloud.com/login', catalog: `${managerRoot.US}/${URI.catalog}`, diff --git a/packages/manager/modules/pci/package.json b/packages/manager/modules/pci/package.json index cbf67dac6211..1382a5994565 100644 --- a/packages/manager/modules/pci/package.json +++ b/packages/manager/modules/pci/package.json @@ -26,6 +26,7 @@ "xterm": "^3.14.5" }, "peerDependencies": { + "@ovh-ux/manager-account-migration": "^0.0.0 || ^1.0.0", "@ovh-ux/manager-catalog-price": "^1.2.0", "@ovh-ux/manager-cloud-styles": "^0.4.0 || ^1.0.0", "@ovh-ux/manager-config": "^0.4.0 || ^1.0.0", diff --git a/packages/manager/modules/pci/src/index.js b/packages/manager/modules/pci/src/index.js index ba941be56d26..f08242b19cbf 100644 --- a/packages/manager/modules/pci/src/index.js +++ b/packages/manager/modules/pci/src/index.js @@ -14,6 +14,7 @@ import '@ovh-ux/ng-ovh-api-wrappers'; // should be a peer dependency of ovh-api- import '@ovh-ux/ng-q-allsettled'; import 'ovh-api-services'; import '@ovh-ux/ui-kit'; +import '@ovh-ux/manager-account-migration'; import '@ovh-ux/ng-pagination-front'; import 'angular-ui-bootstrap'; @@ -70,6 +71,7 @@ angular 'ngAtInternet', 'ngPaginationFront', 'ngQAllSettled', + 'ovhManagerAccountMigration', 'ovh-api-services', 'oui', 'ui.bootstrap', diff --git a/packages/manager/modules/pci/src/projects/creating/index.html b/packages/manager/modules/pci/src/projects/creating/index.html index 01b31d2473bf..8cb0019b89c5 100644 --- a/packages/manager/modules/pci/src/projects/creating/index.html +++ b/packages/manager/modules/pci/src/projects/creating/index.html @@ -1,4 +1,5 @@
+
+
+

diff --git a/packages/manager/modules/pci/src/projects/project/project.html b/packages/manager/modules/pci/src/projects/project/project.html index 14279bbcf2fa..99347b39a869 100644 --- a/packages/manager/modules/pci/src/projects/project/project.html +++ b/packages/manager/modules/pci/src/projects/project/project.html @@ -16,6 +16,7 @@ class="pci-project-content w-100 h-100 pt-4 px-3 px-md-5" style="overflow: auto;" > +
diff --git a/packages/manager/modules/pci/src/projects/projects.html b/packages/manager/modules/pci/src/projects/projects.html index 8ccdfafe5c7a..2c8f459b7af8 100644 --- a/packages/manager/modules/pci/src/projects/projects.html +++ b/packages/manager/modules/pci/src/projects/projects.html @@ -1,4 +1,5 @@
+