Skip to content

Commit

Permalink
feat(pack.move): rework for pack move to add fiber offers
Browse files Browse the repository at this point in the history
- add the new eligibility search for copper and fiber offers
- add the fiber offers into the result of offers available

Ref: UXCT-193

Signed-off-by: Stephanie Moallic <[email protected]>
  • Loading branch information
Stephanie Moallic committed Aug 5, 2020
1 parent 8406ecc commit ef39f1b
Show file tree
Hide file tree
Showing 99 changed files with 5,219 additions and 1,891 deletions.
2 changes: 1 addition & 1 deletion packages/manager/apps/telecom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"ngSmoothScroll": "d-oliveros/angular-smooth-scroll#~1.7.1",
"oclazyload": "^1.1.0",
"ovh-angular-responsive-tabs": "^4.0.0",
"ovh-api-services": "^9.47.0",
"ovh-api-services": "^9.48.0",
"ovh-manager-webfont": "^1.2.0",
"ovh-ng-input-password": "^1.2.5",
"ovh-ngstrap": "^4.0.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/manager/apps/telecom/src/app/telecom/pack/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import angular from 'angular';

import internetAccess from './internet-access';
import packMove from './move';
import packVoipLineActivation from './slots/voipLine/activation/pack-voipLine-activation.module';
import hostedEmailDetail from './slots/hostedEmail/detail';
import xdsl from './xdsl';
Expand All @@ -18,6 +19,7 @@ angular
hostedEmailDetail,
packVoipLineActivation,
xdsl,
packMove,
])
.controller('PackCtrl', controller)
.config(routing)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import angular from 'angular';

import ngTranslateAsyncLoader from '@ovh-ux/ng-translate-async-loader';
import uiRouter from '@uirouter/angularjs';
import angularTranslate from 'angular-translate';

import addressCurrent from './move-address-current.component';

const moduleName = 'ovhManagerTelecomPackMoveAddressCurrent';

angular
.module(moduleName, [ngTranslateAsyncLoader, uiRouter, angularTranslate])
.component('packMoveAddressCurrent', addressCurrent);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import template from './move-address-current.html';

export default {
template,
bindings: {
address: '=?',
addressLoading: '=?',
portLineNumber: '=?',
portability: '=?',
lineNumber: '@',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -9,88 +9,68 @@
</div>
<div class="block-emphasis__column">
<h3 data-translate="pack_move_line_current_address"></h3>
<div
class="text-center"
data-ng-if="PackMoveAddressCurrent.loading"
>
<div class="text-center" data-ng-if="$ctrl.loading">
<oui-spinner></oui-spinner>
</div>
<div
data-ng-if="PackMoveAddressCurrent.address.address.floor && PackMoveAddressCurrent.address.address.door && PackMoveAddressCurrent.address.address.stairs"
data-ng-if="$ctrl.address.address.floor && $ctrl.address.address.door && $ctrl.address.address.stairs"
>
<span
data-ng-if="PackMoveAddressCurrent.address.address.door"
>
<span data-ng-if="$ctrl.address.address.door">
<span
data-translate="pack_move_line_address_door"
></span>
<span
data-ng-bind="PackMoveAddressCurrent.address.address.door"
></span>
<span data-ng-bind="$ctrl.address.address.door"></span>
</span>
<span
data-ng-if="PackMoveAddressCurrent.address.address.floor"
>
<span data-ng-if="$ctrl.address.address.floor">
<span
data-translate="pack_move_line_address_floor"
></span>
<span
data-ng-bind="PackMoveAddressCurrent.address.address.floor"
></span>
<span data-ng-bind="$ctrl.address.address.floor"></span>
</span>
<span
data-ng-if="PackMoveAddressCurrent.address.address.stairs"
>
<span data-ng-if="$ctrl.address.address.stairs">
<span
data-translate="pack_move_line_address_stairs"
></span>
<span
data-ng-bind="PackMoveAddressCurrent.address.address.stairs"
data-ng-bind="$ctrl.address.address.stairs"
></span>
</span>
</div>
<div
data-ng-if="PackMoveAddressCurrent.address.address.residence && PackMoveAddressCurrent.address.address.building"
data-ng-if="$ctrl.address.address.residence && $ctrl.address.address.building"
>
<span
data-ng-if="PackMoveAddressCurrent.address.address.building"
>
<span data-ng-if="$ctrl.address.address.building">
<span
data-translate="pack_move_line_address_building"
></span>
<span
data-ng-bind="PackMoveAddressCurrent.address.address.building"
data-ng-bind="$ctrl.address.address.building"
></span>
</span>
<span
data-ng-if="PackMoveAddressCurrent.address.address.residence"
>
<span data-ng-if="$ctrl.address.address.residence">
<span
data-translate="pack_move_line_address_residence"
></span>
<span
data-ng-bind="PackMoveAddressCurrent.address.address.residence"
data-ng-bind="$ctrl.address.address.residence"
></span>
</span>
</div>
<div>
<span
data-ng-bind="PackMoveAddressCurrent.address.address.numberStreet"
data-ng-bind="$ctrl.address.address.numberStreet"
></span>
<span
data-ng-if="PackMoveAddressCurrent.address.address.numberStreet"
<span data-ng-if="$ctrl.address.address.numberStreet"
>,</span
>
<span
data-ng-bind="PackMoveAddressCurrent.address.address.street"
data-ng-bind="$ctrl.address.address.street.toUpperCase()"
></span>
</div>
<div>
<span data-ng-bind="$ctrl.address.address.zipCode"></span>
<span
data-ng-bind="PackMoveAddressCurrent.address.address.zipCode"
></span>
<span
data-ng-bind="PackMoveAddressCurrent.address.address.city"
data-ng-bind="$ctrl.address.address.city.toUpperCase()"
></span>
</div>
</div>
Expand All @@ -101,36 +81,36 @@ <h3 data-translate="pack_move_line_current_address"></h3>
<input
id="portLine"
type="checkbox"
data-ng-disabled="!PackMoveAddressCurrent.portability"
data-ng-model="PackMoveAddressCurrent.portLineNumber"
data-ng-disabled="!$ctrl.portability"
data-ng-model="$ctrl.portLineNumber"
/>
<span
class="service-item"
data-translate="pack_move_portLine"
></span>
<strong
class="location__lineNumber"
data-ng-bind="PackMoveAddressCurrent.lineNumber"
data-ng-bind="$ctrl.lineNumber"
></strong>
</label>
</div>

<p
data-ng-if="PackMoveAddressCurrent.portLineNumber"
data-ng-if="$ctrl.portLineNumber"
class="mt-2"
data-translate="pack_move_portLine_cost"
></p>

<p
data-translate="pack_move_portLine_disabled"
class="mt-2"
data-ng-if="!PackMoveAddressCurrent.portability"
data-ng-if="!$ctrl.portability"
></p>

<div
class="alert alert-warning"
role="alert"
data-ng-if="PackMoveAddressCurrent.portLineNumber"
data-ng-if="$ctrl.portLineNumber"
data-translate="pack_move_portLine_warning"
></div>
<!-- END: port number -->
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import angular from 'angular';

import ngTranslateAsyncLoader from '@ovh-ux/ng-translate-async-loader';
import uiRouter from '@uirouter/angularjs';
import angularTranslate from 'angular-translate';

import addressFuture from './move-address-future.component';

const moduleName = 'ovhManagerTelecomPackMoveAddressFuture';

angular
.module(moduleName, [ngTranslateAsyncLoader, uiRouter, angularTranslate])
.component('packMoveAddressFuture', addressFuture);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import controller from './move-address-future.controller';
import template from './move-address-future.html';

export default {
controller,
template,
bindings: {
address: '=?',
addressLoading: '=?',
rio: '=?',
keepLineNumber: '=?',
lineNumber: '@',
canKeepLineNumber: '=?',
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default class MoveAddressFutureCtrl {
/* @ngInject */
constructor(tucValidator) {
this.tucValidator = tucValidator;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<div class="col-md-5 col-sm-12 col-xs-12 m-0 p-0">
<div class="block-emphasis">
<div class="block-emphasis__row">
<div class="block-emphasis__column block-emphasis__column--first">
<span
class="location__icon ovh-font ovh-font-home"
aria-hidden="true"
></span>
</div>
<div class="block-emphasis__column">
<h3 data-translate="pack_move_line_future_address"></h3>
<div class="text-center" data-ng-if="$ctrl.loading">
<oui-spinner></oui-spinner>
</div>
<div
data-ng-if="$ctrl.address.floor || $ctrl.address.door || $ctrl.address.stairs"
>
<span data-ng-if="$ctrl.address.door">
<span
data-translate="pack_move_line_address_door"
></span>
<span data-ng-bind="$ctrl.address.door"></span>
</span>
<span data-ng-if="$ctrl.address.floor">
<span
data-translate="pack_move_line_address_floor"
></span>
<span data-ng-bind="$ctrl.address.floor"></span>
</span>
<span data-ng-if="$ctrl.address.stairs">
<span
data-translate="pack_move_line_address_stairs"
></span>
<span data-ng-bind="$ctrl.address.stairs"></span>
</span>
</div>
<div
data-ng-if="$ctrl.address.residence || $ctrl.address.building"
>
<span data-ng-if="$ctrl.address.building">
<span
data-translate="pack_move_line_address_building"
></span>
<span data-ng-bind="$ctrl.address.building"></span>
</span>
<span data-ng-if="$ctrl.address.residence">
<span
data-translate="pack_move_line_address_residence"
></span>
<span
data-ng-bind="$ctrl.address.address.residence"
></span>
</span>
</div>
<div>
<span data-ng-bind="$ctrl.address.streetNumber"></span>
<span data-ng-bind="$ctrl.address.streetName"></span>
</div>
<div>
<span data-ng-bind="$ctrl.address.zipCode"></span>
<span data-ng-bind="$ctrl.address.city"></span>
</div>
</div>
</div>
<!-- BEGIN: keep new number -->
<div data-ng-if="$ctrl.lineNumber">
<div class="checkbox mt-3 ml-4 mr-2">
<label for="keepLine" class="pl-2">
<input
id="keepLine"
type="checkbox"
data-ng-disabled="!$ctrl.canKeepLineNumber"
data-ng-change="$ctrl.rio = null"
data-ng-model="$ctrl.keepLineNumber"
/>
<span
class="service-item"
data-translate="pack_move_keepLine"
></span>
<strong
class="location__lineNumber"
data-ng-bind="$ctrl.lineNumber"
></strong>
</label>
</div>
<p
data-translate="pack_move_keepLine_disabled"
class="mt-2"
data-ng-if="!$ctrl.canKeepLineNumber"
></p>
<!-- END: keep new number -->
<!-- BEGIN: rio -->
<div data-ng-if="$ctrl.keepLineNumber" class="input-group my-md-2">
<input
type="text"
name="rio"
class="form-control"
data-ui-validate="'$ctrl.validator.tucIsRio($value, $ctrl.lineNumber)'"
data-ng-model="$ctrl.rio"
placeholder="{{ 'pack_move_rio' | translate }}"
/>
</div>
</div>
<!-- END: rio -->
</div>
</div>

This file was deleted.

Loading

0 comments on commit ef39f1b

Please sign in to comment.