Skip to content

Commit

Permalink
feat(web): add external link to contact changes
Browse files Browse the repository at this point in the history
ref: MANAGER-15958

Signed-off-by: Antony MARION <[email protected]>
  • Loading branch information
Antony MARION committed Nov 28, 2024
1 parent 9e743e8 commit 2a81b66
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { PRODUCT_TYPE } from '../list/list-domain-layout.constants';

export default /* @ngInject */ ($stateProvider) => {
$stateProvider.state('app.domain.product.contact', {
url: '/contact-management',
Expand All @@ -7,6 +9,13 @@ export default /* @ngInject */ ($stateProvider) => {
},
},
resolve: {
contactsManagementUrl: /* @ngInject */ (coreURLBuilder, $transition$) =>
coreURLBuilder.buildURL('dedicated', '#/contacts/services/edit', {
serviceName: $transition$.params().productId,
category: PRODUCT_TYPE,
service: $transition$.params().productId,
categoryType: PRODUCT_TYPE,
}),
breadcrumb: /* @ngInject */ ($translate) =>
$translate.instant('contact_management'),
goBack: /* @ngInject */ ($state) => () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default {
controller,
template,
bindings: {
contactsManagementUrl: '<',
goBack: '<',
domain: '<',
domainName: '<',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,8 @@ export default class DomainContactDashboardCtrl {
infoProperty.name !== this.INFO_PROPERTIES.ORGANISATION
);
}

openReassignContacts() {
window.open(this.contactsManagementUrl, '_blank');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ <h1 data-translate="domain_tab_CONTACT_title"></h1>
</div>
</div>

<oui-button
class="mb-3 mt-3"
data-variant="secondary"
data-ng-click="$ctrl.openReassignContacts()"
>
<span data-translate="domain_tab_CONTACT_reassign_contacts"></span>
</oui-button>

<div class="row d-flex align-items-stretch">
<oui-tile
class="col-md-3 m-1 align-self-stretch"
Expand All @@ -38,6 +46,7 @@ <h1 data-translate="domain_tab_CONTACT_title"></h1>
<div
class="oui-message oui-message_info oui-message_no-icon"
role="alert"
data-ng-if="!$ctrl.domainInfos.contactAdmin && ($ctrl.domainInfos.contactBilling || $ctrl.domainInfos.contactTech)"
>
<p
class="oui-message__body"
Expand All @@ -49,7 +58,7 @@ <h1 data-translate="domain_tab_CONTACT_title"></h1>
data-translate="domain_tab_CONTACT_description_owner"
></p>
<oui-button
data-ng-if="$ctrl.isNicAdmin"
data-disabled="!$ctrl.isNicAdmin"
data-variant="link"
data-icon-right="oui-icon-arrow-right"
class="mb-2"
Expand Down Expand Up @@ -90,7 +99,7 @@ <h1 data-translate="domain_tab_CONTACT_title"></h1>
></p>

<oui-button
data-ng-if="$ctrl.isNicAdmin"
data-disabled="!$ctrl.isNicAdmin"
data-variant="link"
data-icon-right="oui-icon-arrow-right"
class="mb-2"
Expand Down Expand Up @@ -123,7 +132,7 @@ <h1 data-translate="domain_tab_CONTACT_title"></h1>
data-translate="domain_tab_CONTACT_description_technical"
></p>
<oui-button
data-ng-if="$ctrl.domainInfos.contactTech === $ctrl.user.nichandle"
data-disabled="$ctrl.domainInfos.contactTech !== $ctrl.user.nichandle"
data-variant="link"
data-icon-right="oui-icon-arrow-right"
class="mb-2"
Expand Down Expand Up @@ -157,7 +166,7 @@ <h1 data-translate="domain_tab_CONTACT_title"></h1>

<p data-translate="domain_tab_CONTACT_description_billing"></p>
<oui-button
data-ng-if="$ctrl.domainInfos.contactBilling === $ctrl.user.nichandle"
data-disabled="$ctrl.domainInfos.contactBilling !== $ctrl.user.nichandle"
data-variant="link"
data-icon-right="oui-icon-arrow-right"
class="mb-2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"domain_tab_CONTACT_guide_text": "Guide",
"domain_tab_CONTACT_guide_manage_contact_and_services": "Gérer les contacts de ses services",
"domain_tab_CONTACT_view_more": "Voir plus",
"domain_tab_CONTACT_reassign_contacts": "Réassigner les contacts",
"domain_tab_CONTACT_edit_form_owner_infos": "Pour voir les informations du titulaire veuillez vous connecter avec le compte administrateur."
}

0 comments on commit 2a81b66

Please sign in to comment.