Skip to content

Commit

Permalink
feat(dedicated): add vrack to my services page (#12440)
Browse files Browse the repository at this point in the history
ref: MANAGER-12690

Signed-off-by: soufien mhelhali <[email protected]>
  • Loading branch information
mhelhali-soufien authored and qpavy committed Oct 21, 2024
1 parent 52d281b commit a66d8b2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const SERVICE_TYPE = {
ALL_DOM: 'ALL_DOM',
OKMS: 'OKMS_RESOURCE',
VRACK_SERVICES: 'VRACK_SERVICES_RESOURCE',
VRACK: 'VRACK',
};

export const RENEW_URL = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export default class ServicesActionsCtrl {
return fetchAutoRenewLink.promise.then((link) => {
this.autorenewLink = link;
this.isLoading = false;
this.initLinks();
if (this.service.SERVICE_TYPE !== this.SERVICE_TYPE.VRACK) {
this.initLinks();
}
});
}

Expand Down Expand Up @@ -131,6 +133,12 @@ export default class ServicesActionsCtrl {
}`;
}

canResiliate() {
return ![this.SERVICE_TYPE.PACK_XDSL, this.SERVICE_TYPE.VRACK].includes(
this.service.serviceType,
);
}

getExchangeBilling() {
if (/\/service\//.test(this.service.serviceId)) {
const [organization, exchangeName] = this.service.serviceId.split(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<!-- /Pack XDSL -->

<div
data-ng-if="$ctrl.service.serviceType !== $ctrl.SERVICE_TYPE.PACK_XDSL && (!$ctrl.service.shouldDeleteAtExpiration() || !$ctrl.service.isResiliated()) && !$ctrl.service.hasDebt() && !$ctrl.service.hasPendingResiliation()"
data-ng-if="$ctrl.canResiliate() && (!$ctrl.service.shouldDeleteAtExpiration() || !$ctrl.service.isResiliated()) && !$ctrl.service.hasDebt() && !$ctrl.service.hasPendingResiliation()"
>
<oui-action-menu-item
ng-if="$ctrl.resiliateLink && ($ctrl.service.hasAdminRights($ctrl.user.auth.account) || $ctrl.service.hasAdminRights($ctrl.user.nichandle))"
Expand Down Expand Up @@ -196,7 +196,7 @@

<!-- Service with termination asked by the customer -->
<oui-action-menu-item
ng-if="$ctrl.cancelResiliationLink && ($ctrl.service.canBeUnresiliated($ctrl.user.nichandle) || $ctrl.service.canCancelResiliationByEndRule())"
ng-if="$ctrl.service.serviceType !== $ctrl.SERVICE_TYPE.VRACK && $ctrl.cancelResiliationLink && ($ctrl.service.canBeUnresiliated($ctrl.user.nichandle) || $ctrl.service.canCancelResiliationByEndRule())"
href="{{:: $ctrl.cancelResiliationLink }}"
on-click="$ctrl.trackAction('go-to-cancel-resiliation')"
data-navi-id="go-to-cancel-resiliation"
Expand Down

0 comments on commit a66d8b2

Please sign in to comment.