-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3266 from ovh/feat/account-migration-uikit
feat: fi migration
- Loading branch information
Showing
71 changed files
with
1,540 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...ted/client/app/billing/autoRenew/actions/autorenew-blocked/autorenew-blocked.component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import template from './autorenew-blocked.html'; | ||
|
||
export default { | ||
bindings: { | ||
goToAutorenew: '<', | ||
gotoContracts: '<', | ||
}, | ||
template, | ||
}; |
9 changes: 9 additions & 0 deletions
9
...s/dedicated/client/app/billing/autoRenew/actions/autorenew-blocked/autorenew-blocked.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<oui-modal | ||
data-heading="{{:: 'autorenew_service_autorenew_blocked_title' | translate }}" | ||
data-primary-action="$ctrl.gotoContracts()" | ||
data-primary-label="{{:: 'autorenew_service_autorenew_blocked_confirm' | translate }}" | ||
data-on-dismiss="$ctrl.goToAutorenew()" | ||
data-type="warning" | ||
> | ||
<p data-translate="autorenew_service_autorenew_blocked_description"></p> | ||
</oui-modal> |
23 changes: 23 additions & 0 deletions
23
...icated/client/app/billing/autoRenew/actions/autorenew-blocked/autorenew-blocked.module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
25 changes: 25 additions & 0 deletions
25
...cated/client/app/billing/autoRenew/actions/autorenew-blocked/autorenew-blocked.routing.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
}, | ||
}, | ||
}, | ||
); | ||
}; |
5 changes: 5 additions & 0 deletions
5
...d/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_cs_CZ.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
5 changes: 5 additions & 0 deletions
5
...d/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_en_GB.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
5 changes: 5 additions & 0 deletions
5
...d/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_fi_FI.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
5 changes: 5 additions & 0 deletions
5
...d/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_fr_FR.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
5 changes: 5 additions & 0 deletions
5
...d/client/app/billing/autoRenew/actions/autorenew-blocked/translations/Messages_lt_LT.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import controller from './popup-agreement.controller'; | ||
import template from './popup-agreement.html'; | ||
|
||
export default { | ||
bindings: { | ||
agreements: '<', | ||
goBack: '<', | ||
}, | ||
controller, | ||
template, | ||
}; |
54 changes: 54 additions & 0 deletions
54
...ted/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
), | ||
); | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
...ps/dedicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<oui-modal | ||
data-primary-action=":: $ctrl.acceptAndNext()" | ||
data-primary-label="{{ ( | ||
($ctrl.currentAgreementIndex === ($ctrl.agreements.length - 1)) | ||
? 'user_agreements_accept' | ||
: 'user_agreements_accept_all_accept_and_next' | ||
) | translate }}" | ||
data-primary-disabled="!$ctrl.currentAgreement.accepted" | ||
data-secondary-action=":: $ctrl.goBack(false, 'success', true)" | ||
data-secondary-label="{{:: 'wizard_cancel' | translate }}" | ||
data-loading="$ctrl.AgreementUnderProcess" | ||
data-on-dismiss=":: $ctrl.goBack(false, 'success', true)" | ||
> | ||
<strong | ||
data-ng-bind="'user_agreements_accept_all_count' | translate: { | ||
current: $ctrl.currentAgreementIndex + 1, | ||
total: $ctrl.agreements.length | ||
}" | ||
></strong> | ||
<h3 data-ng-bind=":: $ctrl.currentAgreement.name"></h3> | ||
<oui-textarea | ||
data-name="agreement" | ||
data-model="$ctrl.currentAgreement.text" | ||
data-rows="10" | ||
data-readonly | ||
></oui-textarea> | ||
<div class="oui-checkbox mt-3"> | ||
<input | ||
class="oui-checkbox__input" | ||
id="agreement-checkbox" | ||
name="agreement-checkbox" | ||
type="checkbox" | ||
data-ng-model="$ctrl.currentAgreement.accepted" | ||
/> | ||
<label class="oui-checkbox__label-container" for="agreement-checkbox"> | ||
<span class="oui-checkbox__label"> | ||
<span class="oui-checkbox__icon"></span> | ||
<span | ||
class="oui-checkbox__text" | ||
data-translate="user_agreements_accept_all_read_and_accepted" | ||
data-translate-values="{ | ||
contractTitle: $ctrl.currentAgreement.name | ||
}" | ||
></span> | ||
</span> | ||
<span | ||
class="oui-checkbox__description" | ||
data-ng-bind-html="'user_agreements_accept_all_annexes' | translate: { url: $ctrl.currentAgreement.pdfUrl }" | ||
></span> | ||
</label> | ||
</div> | ||
</oui-modal> |
23 changes: 23 additions & 0 deletions
23
...dicated/client/app/billing/autoRenew/agreements/popup-agreement/popup-agreement.module.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
Oops, something went wrong.